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 CFLAGS_WARNINGS_ARE_ERRORS
 694 DISABLE_WARNING_PREFIX
 695 HOTSPOT_SET_WARNINGS_AS_ERRORS
 696 WARNINGS_AS_ERRORS
 697 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 698 ZERO_ARCHFLAG
 699 LDFLAGS_TESTEXE
 700 LDFLAGS_TESTLIB
 701 LDFLAGS_CXX_JDK
 702 JDKEXE_LIBS
 703 JDKLIB_LIBS
 704 LDFLAGS_JDKEXE
 705 LDFLAGS_JDKLIB
 706 CXXFLAGS_TESTEXE
 707 CXXFLAGS_TESTLIB
 708 CFLAGS_TESTEXE
 709 CFLAGS_TESTLIB
 710 CXXFLAGS_JDKEXE
 711 CXXFLAGS_JDKLIB
 712 CFLAGS_JDKEXE
 713 CFLAGS_JDKLIB
 714 MACOSX_VERSION_MIN
 715 CXX_O_FLAG_NONE
 716 CXX_O_FLAG_DEBUG
 717 CXX_O_FLAG_NORM
 718 CXX_O_FLAG_HI
 719 CXX_O_FLAG_HIGHEST
 720 C_O_FLAG_NONE
 721 C_O_FLAG_DEBUG
 722 C_O_FLAG_NORM
 723 C_O_FLAG_HI
 724 C_O_FLAG_HIGHEST
 725 CXXFLAGS_DEBUG_SYMBOLS
 726 CFLAGS_DEBUG_SYMBOLS
 727 CXX_FLAG_DEPS
 728 C_FLAG_DEPS
 729 SET_SHARED_LIBRARY_MAPFILE
 730 SET_SHARED_LIBRARY_NAME
 731 SET_SHARED_LIBRARY_ORIGIN
 732 SET_EXECUTABLE_ORIGIN
 733 CXX_FLAG_REORDER
 734 C_FLAG_REORDER
 735 RC_FLAGS
 736 AR_OUT_OPTION
 737 LD_OUT_OPTION
 738 EXE_OUT_OPTION
 739 CC_OUT_OPTION
 740 STRIPFLAGS
 741 ARFLAGS
 742 COMPILER_TARGET_BITS_FLAG
 743 JT_HOME
 744 JTREGEXE
 745 USING_BROKEN_SUSE_LD
 746 PACKAGE_PATH
 747 USE_CLANG
 748 HOTSPOT_LD
 749 HOTSPOT_CXX
 750 HOTSPOT_RC
 751 HOTSPOT_MT
 752 BUILD_AS
 753 BUILD_LD
 754 BUILD_AR
 755 BUILD_NM
 756 BUILD_CXX
 757 BUILD_CC
 758 BUILD_SYSROOT_LDFLAGS
 759 BUILD_SYSROOT_CFLAGS
 760 ac_ct_OBJDUMP
 761 OBJDUMP
 762 ac_ct_OBJCOPY
 763 OBJCOPY
 764 ac_ct_NM
 765 ac_ct_STRIP
 766 GNM
 767 NM
 768 STRIP
 769 MSBUILD
 770 DUMPBIN
 771 RC
 772 MT
 773 LIPO
 774 ac_ct_AR
 775 AR
 776 AS
 777 LDCXX
 778 LD
 779 CXXCPP
 780 CPP
 781 ac_ct_CXX
 782 CXXFLAGS
 783 CXX
 784 ac_ct_PROPER_COMPILER_CXX
 785 PROPER_COMPILER_CXX
 786 TOOLCHAIN_PATH_CXX
 787 POTENTIAL_CXX
 788 OBJEXT
 789 EXEEXT
 790 ac_ct_CC
 791 CPPFLAGS
 792 LDFLAGS
 793 CFLAGS
 794 CC
 795 ac_ct_PROPER_COMPILER_CC
 796 PROPER_COMPILER_CC
 797 TOOLCHAIN_PATH_CC
 798 POTENTIAL_CC
 799 VS_LIB
 800 VS_INCLUDE
 801 VS_PATH
 802 CYGWIN_LINK
 803 SYSROOT_LDFLAGS
 804 SYSROOT_CFLAGS
 805 LEGACY_EXTRA_LDFLAGS
 806 LEGACY_EXTRA_CXXFLAGS
 807 LEGACY_EXTRA_CFLAGS
 808 EXE_SUFFIX
 809 OBJ_SUFFIX
 810 STATIC_LIBRARY
 811 SHARED_LIBRARY
 812 STATIC_LIBRARY_SUFFIX
 813 SHARED_LIBRARY_SUFFIX
 814 LIBRARY_PREFIX
 815 TOOLCHAIN_TYPE
 816 STATIC_BUILD
 817 BUILD_HOTSPOT
 818 HOTSPOT_DIST
 819 BUILD_OUTPUT
 820 JDK_TOPDIR
 821 NASHORN_TOPDIR
 822 HOTSPOT_TOPDIR
 823 JAXWS_TOPDIR
 824 JAXP_TOPDIR
 825 CORBA_TOPDIR
 826 LANGTOOLS_TOPDIR
 827 BOOT_JDK_BITS
 828 JAVAC_FLAGS
 829 BOOT_JDK_SOURCETARGET
 830 JARSIGNER
 831 JAR
 832 JAVAH
 833 JAVAC
 834 JAVA
 835 BOOT_JDK
 836 JAVA_CHECK
 837 JAVAC_CHECK
 838 VERSION_IS_GA
 839 VERSION_SHORT
 840 VERSION_STRING
 841 VERSION_NUMBER_FOUR_POSITIONS
 842 VERSION_NUMBER
 843 VERSION_OPT
 844 VERSION_BUILD
 845 VERSION_PRE
 846 VERSION_PATCH
 847 VERSION_SECURITY
 848 VERSION_MINOR
 849 VERSION_MAJOR
 850 MACOSX_BUNDLE_ID_BASE
 851 MACOSX_BUNDLE_NAME_BASE
 852 COMPANY_NAME
 853 JDK_RC_PLATFORM_NAME
 854 PRODUCT_SUFFIX
 855 PRODUCT_NAME
 856 LAUNCHER_NAME
 857 COPYRIGHT_YEAR
 858 COMPRESS_JARS
 859 UNLIMITED_CRYPTO
 860 CACERTS_FILE
 861 TEST_IN_BUILD
 862 BUILD_HEADLESS
 863 SUPPORT_HEADFUL
 864 SUPPORT_HEADLESS
 865 OS_VERSION_MICRO
 866 OS_VERSION_MINOR
 867 OS_VERSION_MAJOR
 868 PKG_CONFIG
 869 BASH_ARGS
 870 SETFILE
 871 CODESIGN
 872 XATTR
 873 DSYMUTIL
 874 IS_GNU_TIME
 875 PATCH
 876 TIME
 877 STAT
 878 HG
 879 READELF
 880 OTOOL
 881 LDD
 882 ZIP
 883 UNZIP
 884 FIND_DELETE
 885 OUTPUT_SYNC
 886 OUTPUT_SYNC_SUPPORTED
 887 CHECK_TOOLSDIR_MAKE
 888 CHECK_TOOLSDIR_GMAKE
 889 CHECK_MAKE
 890 CHECK_GMAKE
 891 MAKE
 892 PKGHANDLER
 893 CONFIGURESUPPORT_OUTPUTDIR
 894 OUTPUT_ROOT
 895 CONF_NAME
 896 SPEC
 897 SDKROOT
 898 XCODEBUILD
 899 BUILD_VARIANT_RELEASE
 900 DEBUG_CLASSFILES
 901 FASTDEBUG
 902 VARIANT
 903 DEBUG_LEVEL
 904 MACOSX_UNIVERSAL
 905 INCLUDE_SA
 906 JVM_VARIANT_CORE
 907 JVM_VARIANT_ZEROSHARK
 908 JVM_VARIANT_ZERO
 909 JVM_VARIANT_KERNEL
 910 JVM_VARIANT_MINIMAL1
 911 JVM_VARIANT_CLIENT
 912 JVM_VARIANT_SERVER
 913 JVM_VARIANTS
 914 JVM_INTERPRETER
 915 JDK_VARIANT
 916 SET_OPENJDK
 917 CANONICAL_TOPDIR
 918 ORIGINAL_TOPDIR
 919 TOPDIR
 920 PATH_SEP
 921 ZERO_ARCHDEF
 922 DEFINE_CROSS_COMPILE_ARCH
 923 LP64
 924 OPENJDK_TARGET_OS_EXPORT_DIR
 925 OPENJDK_TARGET_CPU_JLI_CFLAGS
 926 OPENJDK_TARGET_CPU_OSARCH
 927 OPENJDK_TARGET_CPU_ISADIR
 928 OPENJDK_TARGET_CPU_LIBDIR
 929 OPENJDK_TARGET_CPU_LEGACY_LIB
 930 OPENJDK_TARGET_CPU_LEGACY
 931 REQUIRED_OS_VERSION
 932 REQUIRED_OS_NAME
 933 COMPILE_TYPE
 934 OPENJDK_TARGET_CPU_ENDIAN
 935 OPENJDK_TARGET_CPU_BITS
 936 OPENJDK_TARGET_CPU_ARCH
 937 OPENJDK_TARGET_CPU
 938 OPENJDK_TARGET_OS_ENV
 939 OPENJDK_TARGET_OS_TYPE
 940 OPENJDK_TARGET_OS
 941 OPENJDK_BUILD_CPU_ENDIAN
 942 OPENJDK_BUILD_CPU_BITS
 943 OPENJDK_BUILD_CPU_ARCH
 944 OPENJDK_BUILD_CPU
 945 OPENJDK_BUILD_OS_ENV
 946 OPENJDK_BUILD_OS_TYPE
 947 OPENJDK_BUILD_OS
 948 OPENJDK_BUILD_AUTOCONF_NAME
 949 OPENJDK_TARGET_AUTOCONF_NAME
 950 target_os
 951 target_vendor
 952 target_cpu
 953 target
 954 host_os
 955 host_vendor
 956 host_cpu
 957 host
 958 build_os
 959 build_vendor
 960 build_cpu
 961 build
 962 NICE
 963 CPIO
 964 DF
 965 READLINK
 966 CYGPATH
 967 SED
 968 FGREP
 969 EGREP
 970 GREP
 971 AWK
 972 XARGS
 973 WHICH
 974 WC
 975 UNIQ
 976 UNAME
 977 TR
 978 TOUCH
 979 TEE
 980 TAR
 981 TAIL
 982 SORT
 983 SH
 984 RMDIR
 985 RM
 986 PRINTF
 987 NAWK
 988 MV
 989 MKTEMP
 990 MKDIR
 991 LS
 992 LN
 993 HEAD
 994 FIND
 995 FILE
 996 EXPR
 997 ECHO
 998 DIRNAME
 999 DIFF
1000 DATE
1001 CUT
1002 CP
1003 COMM
1004 CMP
1005 CHMOD
1006 CAT
1007 BASH
1008 BASENAME
1009 DATE_WHEN_CONFIGURED
1010 ORIGINAL_PATH
1011 CONFIGURE_COMMAND_LINE
1012 target_alias
1013 host_alias
1014 build_alias
1015 LIBS
1016 ECHO_T
1017 ECHO_N
1018 ECHO_C
1019 DEFS
1020 mandir
1021 localedir
1022 libdir
1023 psdir
1024 pdfdir
1025 dvidir
1026 htmldir
1027 infodir
1028 docdir
1029 oldincludedir
1030 includedir
1031 localstatedir
1032 sharedstatedir
1033 sysconfdir
1034 datadir
1035 datarootdir
1036 libexecdir
1037 sbindir
1038 bindir
1039 program_transform_name
1040 prefix
1041 exec_prefix
1042 PACKAGE_URL
1043 PACKAGE_BUGREPORT
1044 PACKAGE_STRING
1045 PACKAGE_VERSION
1046 PACKAGE_TARNAME
1047 PACKAGE_NAME
1048 PATH_SEPARATOR
1049 SHELL'
1050 ac_subst_files=''
1051 ac_user_opts='
1052 enable_option_checking
1053 with_target_bits
1054 enable_openjdk_only
1055 with_custom_make_dir
1056 with_jdk_variant
1057 with_jvm_interpreter
1058 with_jvm_variants
1059 enable_debug
1060 with_debug_level
1061 with_devkit
1062 with_sys_root
1063 with_sysroot
1064 with_tools_dir
1065 with_toolchain_path
1066 with_extra_path
1067 with_sdk_name
1068 with_conf_name
1069 with_output_sync
1070 enable_headful
1071 enable_hotspot_test_in_build
1072 with_cacerts_file
1073 enable_unlimited_crypto
1074 with_copyright_year
1075 with_milestone
1076 with_update_version
1077 with_user_release_suffix
1078 with_build_number
1079 with_version_string
1080 with_version_pre
1081 with_version_opt
1082 with_version_build
1083 with_version_major
1084 with_version_minor
1085 with_version_security
1086 with_version_patch
1087 with_boot_jdk
1088 with_add_source_root
1089 with_override_source_root
1090 with_adds_and_overrides
1091 with_override_langtools
1092 with_override_corba
1093 with_override_jaxp
1094 with_override_jaxws
1095 with_override_hotspot
1096 with_override_nashorn
1097 with_override_jdk
1098 with_import_hotspot
1099 enable_static_build
1100 with_toolchain_type
1101 with_extra_cflags
1102 with_extra_cxxflags
1103 with_extra_ldflags
1104 with_toolchain_version
1105 with_build_devkit
1106 with_jtreg
1107 enable_warnings_as_errors
1108 enable_debug_symbols
1109 enable_zip_debug_info
1110 enable_native_coverage
1111 with_stdc__lib
1112 with_msvcr_dll
1113 with_msvcp_dll
1114 with_x
1115 with_cups
1116 with_cups_include
1117 with_freetype
1118 with_freetype_include
1119 with_freetype_lib
1120 with_freetype_src
1121 enable_freetype_bundling
1122 with_alsa
1123 with_alsa_include
1124 with_alsa_lib
1125 with_libffi
1126 with_libffi_include
1127 with_libffi_lib
1128 with_libjpeg
1129 with_giflib
1130 with_libpng
1131 with_zlib
1132 with_lcms
1133 with_dxsdk
1134 with_dxsdk_lib
1135 with_dxsdk_include
1136 with_num_cores
1137 with_memory_size
1138 with_jobs
1139 with_boot_jdk_jvmargs
1140 with_sjavac_server_java
1141 enable_sjavac
1142 enable_javac_server
1143 enable_icecc
1144 enable_precompiled_headers
1145 enable_ccache
1146 with_ccache_dir
1147 '
1148       ac_precious_vars='build_alias
1149 host_alias
1150 target_alias
1151 BASENAME
1152 BASH
1153 CAT
1154 CHMOD
1155 CMP
1156 COMM
1157 CP
1158 CUT
1159 DATE
1160 DIFF
1161 DIRNAME
1162 ECHO
1163 EXPR
1164 FILE
1165 FIND
1166 HEAD
1167 LN
1168 LS
1169 MKDIR
1170 MKTEMP
1171 MV
1172 NAWK
1173 PRINTF
1174 RM
1175 RMDIR
1176 SH
1177 SORT
1178 TAIL
1179 TAR
1180 TEE
1181 TOUCH
1182 TR
1183 UNAME
1184 UNIQ
1185 WC
1186 WHICH
1187 XARGS
1188 AWK
1189 GREP
1190 EGREP
1191 FGREP
1192 SED
1193 CYGPATH
1194 READLINK
1195 DF
1196 CPIO
1197 NICE
1198 MAKE
1199 UNZIP
1200 ZIP
1201 LDD
1202 OTOOL
1203 READELF
1204 HG
1205 STAT
1206 TIME
1207 PATCH
1208 DSYMUTIL
1209 XATTR
1210 CODESIGN
1211 SETFILE
1212 PKG_CONFIG
1213 JAVA
1214 JAVAC
1215 JAVAH
1216 JAR
1217 JARSIGNER
1218 CC
1219 CFLAGS
1220 LDFLAGS
1221 LIBS
1222 CPPFLAGS
1223 CXX
1224 CXXFLAGS
1225 CCC
1226 CPP
1227 CXXCPP
1228 AS
1229 AR
1230 LIPO
1231 STRIP
1232 NM
1233 GNM
1234 OBJCOPY
1235 OBJDUMP
1236 BUILD_CC
1237 BUILD_CXX
1238 BUILD_NM
1239 BUILD_AR
1240 JTREGEXE
1241 XMKMF
1242 FREETYPE_CFLAGS
1243 FREETYPE_LIBS
1244 ALSA_CFLAGS
1245 ALSA_LIBS
1246 LIBFFI_CFLAGS
1247 LIBFFI_LIBS
1248 PNG_CFLAGS
1249 PNG_LIBS
1250 LCMS_CFLAGS
1251 LCMS_LIBS
1252 ICECC_CMD
1253 ICECC_CREATE_ENV
1254 ICECC_WRAPPER
1255 CCACHE'
1256 
1257 
1258 # Initialize some variables set by options.
1259 ac_init_help=
1260 ac_init_version=false
1261 ac_unrecognized_opts=
1262 ac_unrecognized_sep=
1263 # The variables have the same names as the options, with
1264 # dashes changed to underlines.
1265 cache_file=/dev/null
1266 exec_prefix=NONE
1267 no_create=
1268 no_recursion=
1269 prefix=NONE
1270 program_prefix=NONE
1271 program_suffix=NONE
1272 program_transform_name=s,x,x,
1273 silent=
1274 site=
1275 srcdir=
1276 verbose=
1277 x_includes=NONE
1278 x_libraries=NONE
1279 
1280 # Installation directory options.
1281 # These are left unexpanded so users can "make install exec_prefix=/foo"
1282 # and all the variables that are supposed to be based on exec_prefix
1283 # by default will actually change.
1284 # Use braces instead of parens because sh, perl, etc. also accept them.
1285 # (The list follows the same order as the GNU Coding Standards.)
1286 bindir='${exec_prefix}/bin'
1287 sbindir='${exec_prefix}/sbin'
1288 libexecdir='${exec_prefix}/libexec'
1289 datarootdir='${prefix}/share'
1290 datadir='${datarootdir}'
1291 sysconfdir='${prefix}/etc'
1292 sharedstatedir='${prefix}/com'
1293 localstatedir='${prefix}/var'
1294 includedir='${prefix}/include'
1295 oldincludedir='/usr/include'
1296 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1297 infodir='${datarootdir}/info'
1298 htmldir='${docdir}'
1299 dvidir='${docdir}'
1300 pdfdir='${docdir}'
1301 psdir='${docdir}'
1302 libdir='${exec_prefix}/lib'
1303 localedir='${datarootdir}/locale'
1304 mandir='${datarootdir}/man'
1305 
1306 ac_prev=
1307 ac_dashdash=
1308 for ac_option
1309 do
1310   # If the previous option needs an argument, assign it.
1311   if test -n "$ac_prev"; then
1312     eval $ac_prev=\$ac_option
1313     ac_prev=
1314     continue
1315   fi
1316 
1317   case $ac_option in
1318   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1319   *=)   ac_optarg= ;;
1320   *)    ac_optarg=yes ;;
1321   esac
1322 
1323   # Accept the important Cygnus configure options, so we can diagnose typos.
1324 
1325   case $ac_dashdash$ac_option in
1326   --)
1327     ac_dashdash=yes ;;
1328 
1329   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1330     ac_prev=bindir ;;
1331   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1332     bindir=$ac_optarg ;;
1333 
1334   -build | --build | --buil | --bui | --bu)
1335     ac_prev=build_alias ;;
1336   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1337     build_alias=$ac_optarg ;;
1338 
1339   -cache-file | --cache-file | --cache-fil | --cache-fi \
1340   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1341     ac_prev=cache_file ;;
1342   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1343   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1344     cache_file=$ac_optarg ;;
1345 
1346   --config-cache | -C)
1347     cache_file=config.cache ;;
1348 
1349   -datadir | --datadir | --datadi | --datad)
1350     ac_prev=datadir ;;
1351   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1352     datadir=$ac_optarg ;;
1353 
1354   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1355   | --dataroo | --dataro | --datar)
1356     ac_prev=datarootdir ;;
1357   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1358   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1359     datarootdir=$ac_optarg ;;
1360 
1361   -disable-* | --disable-*)
1362     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1363     # Reject names that are not valid shell variable names.
1364     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1365       as_fn_error $? "invalid feature name: $ac_useropt"
1366     ac_useropt_orig=$ac_useropt
1367     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1368     case $ac_user_opts in
1369       *"
1370 "enable_$ac_useropt"
1371 "*) ;;
1372       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1373          ac_unrecognized_sep=', ';;
1374     esac
1375     eval enable_$ac_useropt=no ;;
1376 
1377   -docdir | --docdir | --docdi | --doc | --do)
1378     ac_prev=docdir ;;
1379   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1380     docdir=$ac_optarg ;;
1381 
1382   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1383     ac_prev=dvidir ;;
1384   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1385     dvidir=$ac_optarg ;;
1386 
1387   -enable-* | --enable-*)
1388     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1389     # Reject names that are not valid shell variable names.
1390     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1391       as_fn_error $? "invalid feature name: $ac_useropt"
1392     ac_useropt_orig=$ac_useropt
1393     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1394     case $ac_user_opts in
1395       *"
1396 "enable_$ac_useropt"
1397 "*) ;;
1398       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1399          ac_unrecognized_sep=', ';;
1400     esac
1401     eval enable_$ac_useropt=\$ac_optarg ;;
1402 
1403   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1404   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1405   | --exec | --exe | --ex)
1406     ac_prev=exec_prefix ;;
1407   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1408   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1409   | --exec=* | --exe=* | --ex=*)
1410     exec_prefix=$ac_optarg ;;
1411 
1412   -gas | --gas | --ga | --g)
1413     # Obsolete; use --with-gas.
1414     with_gas=yes ;;
1415 
1416   -help | --help | --hel | --he | -h)
1417     ac_init_help=long ;;
1418   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1419     ac_init_help=recursive ;;
1420   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1421     ac_init_help=short ;;
1422 
1423   -host | --host | --hos | --ho)
1424     ac_prev=host_alias ;;
1425   -host=* | --host=* | --hos=* | --ho=*)
1426     host_alias=$ac_optarg ;;
1427 
1428   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1429     ac_prev=htmldir ;;
1430   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1431   | --ht=*)
1432     htmldir=$ac_optarg ;;
1433 
1434   -includedir | --includedir | --includedi | --included | --include \
1435   | --includ | --inclu | --incl | --inc)
1436     ac_prev=includedir ;;
1437   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1438   | --includ=* | --inclu=* | --incl=* | --inc=*)
1439     includedir=$ac_optarg ;;
1440 
1441   -infodir | --infodir | --infodi | --infod | --info | --inf)
1442     ac_prev=infodir ;;
1443   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1444     infodir=$ac_optarg ;;
1445 
1446   -libdir | --libdir | --libdi | --libd)
1447     ac_prev=libdir ;;
1448   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1449     libdir=$ac_optarg ;;
1450 
1451   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1452   | --libexe | --libex | --libe)
1453     ac_prev=libexecdir ;;
1454   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1455   | --libexe=* | --libex=* | --libe=*)
1456     libexecdir=$ac_optarg ;;
1457 
1458   -localedir | --localedir | --localedi | --localed | --locale)
1459     ac_prev=localedir ;;
1460   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1461     localedir=$ac_optarg ;;
1462 
1463   -localstatedir | --localstatedir | --localstatedi | --localstated \
1464   | --localstate | --localstat | --localsta | --localst | --locals)
1465     ac_prev=localstatedir ;;
1466   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1467   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1468     localstatedir=$ac_optarg ;;
1469 
1470   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1471     ac_prev=mandir ;;
1472   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1473     mandir=$ac_optarg ;;
1474 
1475   -nfp | --nfp | --nf)
1476     # Obsolete; use --without-fp.
1477     with_fp=no ;;
1478 
1479   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1480   | --no-cr | --no-c | -n)
1481     no_create=yes ;;
1482 
1483   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1484   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1485     no_recursion=yes ;;
1486 
1487   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1488   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1489   | --oldin | --oldi | --old | --ol | --o)
1490     ac_prev=oldincludedir ;;
1491   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1492   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1493   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1494     oldincludedir=$ac_optarg ;;
1495 
1496   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1497     ac_prev=prefix ;;
1498   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1499     prefix=$ac_optarg ;;
1500 
1501   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1502   | --program-pre | --program-pr | --program-p)
1503     ac_prev=program_prefix ;;
1504   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1505   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1506     program_prefix=$ac_optarg ;;
1507 
1508   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1509   | --program-suf | --program-su | --program-s)
1510     ac_prev=program_suffix ;;
1511   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1512   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1513     program_suffix=$ac_optarg ;;
1514 
1515   -program-transform-name | --program-transform-name \
1516   | --program-transform-nam | --program-transform-na \
1517   | --program-transform-n | --program-transform- \
1518   | --program-transform | --program-transfor \
1519   | --program-transfo | --program-transf \
1520   | --program-trans | --program-tran \
1521   | --progr-tra | --program-tr | --program-t)
1522     ac_prev=program_transform_name ;;
1523   -program-transform-name=* | --program-transform-name=* \
1524   | --program-transform-nam=* | --program-transform-na=* \
1525   | --program-transform-n=* | --program-transform-=* \
1526   | --program-transform=* | --program-transfor=* \
1527   | --program-transfo=* | --program-transf=* \
1528   | --program-trans=* | --program-tran=* \
1529   | --progr-tra=* | --program-tr=* | --program-t=*)
1530     program_transform_name=$ac_optarg ;;
1531 
1532   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1533     ac_prev=pdfdir ;;
1534   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1535     pdfdir=$ac_optarg ;;
1536 
1537   -psdir | --psdir | --psdi | --psd | --ps)
1538     ac_prev=psdir ;;
1539   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1540     psdir=$ac_optarg ;;
1541 
1542   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1543   | -silent | --silent | --silen | --sile | --sil)
1544     silent=yes ;;
1545 
1546   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1547     ac_prev=sbindir ;;
1548   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1549   | --sbi=* | --sb=*)
1550     sbindir=$ac_optarg ;;
1551 
1552   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1553   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1554   | --sharedst | --shareds | --shared | --share | --shar \
1555   | --sha | --sh)
1556     ac_prev=sharedstatedir ;;
1557   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1558   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1559   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1560   | --sha=* | --sh=*)
1561     sharedstatedir=$ac_optarg ;;
1562 
1563   -site | --site | --sit)
1564     ac_prev=site ;;
1565   -site=* | --site=* | --sit=*)
1566     site=$ac_optarg ;;
1567 
1568   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1569     ac_prev=srcdir ;;
1570   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1571     srcdir=$ac_optarg ;;
1572 
1573   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1574   | --syscon | --sysco | --sysc | --sys | --sy)
1575     ac_prev=sysconfdir ;;
1576   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1577   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1578     sysconfdir=$ac_optarg ;;
1579 
1580   -target | --target | --targe | --targ | --tar | --ta | --t)
1581     ac_prev=target_alias ;;
1582   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1583     target_alias=$ac_optarg ;;
1584 
1585   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1586     verbose=yes ;;
1587 
1588   -version | --version | --versio | --versi | --vers | -V)
1589     ac_init_version=: ;;
1590 
1591   -with-* | --with-*)
1592     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1593     # Reject names that are not valid shell variable names.
1594     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1595       as_fn_error $? "invalid package name: $ac_useropt"
1596     ac_useropt_orig=$ac_useropt
1597     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1598     case $ac_user_opts in
1599       *"
1600 "with_$ac_useropt"
1601 "*) ;;
1602       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1603          ac_unrecognized_sep=', ';;
1604     esac
1605     eval with_$ac_useropt=\$ac_optarg ;;
1606 
1607   -without-* | --without-*)
1608     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1609     # Reject names that are not valid shell variable names.
1610     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1611       as_fn_error $? "invalid package name: $ac_useropt"
1612     ac_useropt_orig=$ac_useropt
1613     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1614     case $ac_user_opts in
1615       *"
1616 "with_$ac_useropt"
1617 "*) ;;
1618       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1619          ac_unrecognized_sep=', ';;
1620     esac
1621     eval with_$ac_useropt=no ;;
1622 
1623   --x)
1624     # Obsolete; use --with-x.
1625     with_x=yes ;;
1626 
1627   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1628   | --x-incl | --x-inc | --x-in | --x-i)
1629     ac_prev=x_includes ;;
1630   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1631   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1632     x_includes=$ac_optarg ;;
1633 
1634   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1635   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1636     ac_prev=x_libraries ;;
1637   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1638   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1639     x_libraries=$ac_optarg ;;
1640 
1641   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1642 Try \`$0 --help' for more information"
1643     ;;
1644 
1645   *=*)
1646     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1647     # Reject names that are not valid shell variable names.
1648     case $ac_envvar in #(
1649       '' | [0-9]* | *[!_$as_cr_alnum]* )
1650       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1651     esac
1652     eval $ac_envvar=\$ac_optarg
1653     export $ac_envvar ;;
1654 
1655   *)
1656     # FIXME: should be removed in autoconf 3.0.
1657     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1658     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1659       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1660     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1661     ;;
1662 
1663   esac
1664 done
1665 
1666 if test -n "$ac_prev"; then
1667   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1668   as_fn_error $? "missing argument to $ac_option"
1669 fi
1670 
1671 if test -n "$ac_unrecognized_opts"; then
1672   case $enable_option_checking in
1673     no) ;;
1674     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1675     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1676   esac
1677 fi
1678 
1679 # Check all directory arguments for consistency.
1680 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1681                 datadir sysconfdir sharedstatedir localstatedir includedir \
1682                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1683                 libdir localedir mandir
1684 do
1685   eval ac_val=\$$ac_var
1686   # Remove trailing slashes.
1687   case $ac_val in
1688     */ )
1689       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1690       eval $ac_var=\$ac_val;;
1691   esac
1692   # Be sure to have absolute directory names.
1693   case $ac_val in
1694     [\\/$]* | ?:[\\/]* )  continue;;
1695     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1696   esac
1697   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1698 done
1699 
1700 # There might be people who depend on the old broken behavior: `$host'
1701 # used to hold the argument of --host etc.
1702 # FIXME: To remove some day.
1703 build=$build_alias
1704 host=$host_alias
1705 target=$target_alias
1706 
1707 # FIXME: To remove some day.
1708 if test "x$host_alias" != x; then
1709   if test "x$build_alias" = x; then
1710     cross_compiling=maybe
1711   elif test "x$build_alias" != "x$host_alias"; then
1712     cross_compiling=yes
1713   fi
1714 fi
1715 
1716 ac_tool_prefix=
1717 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1718 
1719 test "$silent" = yes && exec 6>/dev/null
1720 
1721 
1722 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1723 ac_ls_di=`ls -di .` &&
1724 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1725   as_fn_error $? "working directory cannot be determined"
1726 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1727   as_fn_error $? "pwd does not report name of working directory"
1728 
1729 
1730 # Find the source files, if location was not specified.
1731 if test -z "$srcdir"; then
1732   ac_srcdir_defaulted=yes
1733   # Try the directory containing this script, then the parent directory.
1734   ac_confdir=`$as_dirname -- "$as_myself" ||
1735 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1736          X"$as_myself" : 'X\(//\)[^/]' \| \
1737          X"$as_myself" : 'X\(//\)$' \| \
1738          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1739 $as_echo X"$as_myself" |
1740     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1741             s//\1/
1742             q
1743           }
1744           /^X\(\/\/\)[^/].*/{
1745             s//\1/
1746             q
1747           }
1748           /^X\(\/\/\)$/{
1749             s//\1/
1750             q
1751           }
1752           /^X\(\/\).*/{
1753             s//\1/
1754             q
1755           }
1756           s/.*/./; q'`
1757   srcdir=$ac_confdir
1758   if test ! -r "$srcdir/$ac_unique_file"; then
1759     srcdir=..
1760   fi
1761 else
1762   ac_srcdir_defaulted=no
1763 fi
1764 if test ! -r "$srcdir/$ac_unique_file"; then
1765   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1766   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1767 fi
1768 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1769 ac_abs_confdir=`(
1770         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1771         pwd)`
1772 # When building in place, set srcdir=.
1773 if test "$ac_abs_confdir" = "$ac_pwd"; then
1774   srcdir=.
1775 fi
1776 # Remove unnecessary trailing slashes from srcdir.
1777 # Double slashes in file names in object file debugging info
1778 # mess up M-x gdb in Emacs.
1779 case $srcdir in
1780 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1781 esac
1782 for ac_var in $ac_precious_vars; do
1783   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1784   eval ac_env_${ac_var}_value=\$${ac_var}
1785   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1786   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1787 done
1788 
1789 #
1790 # Report the --help message.
1791 #
1792 if test "$ac_init_help" = "long"; then
1793   # Omit some internal or obsolete options to make the list less imposing.
1794   # This message is too long to be a string in the A/UX 3.1 sh.
1795   cat <<_ACEOF
1796 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1797 
1798 Usage: $0 [OPTION]... [VAR=VALUE]...
1799 
1800 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1801 VAR=VALUE.  See below for descriptions of some of the useful variables.
1802 
1803 Defaults for the options are specified in brackets.
1804 
1805 Configuration:
1806   -h, --help              display this help and exit
1807       --help=short        display options specific to this package
1808       --help=recursive    display the short help of all the included packages
1809   -V, --version           display version information and exit
1810   -q, --quiet, --silent   do not print \`checking ...' messages
1811       --cache-file=FILE   cache test results in FILE [disabled]
1812   -C, --config-cache      alias for \`--cache-file=config.cache'
1813   -n, --no-create         do not create output files
1814       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1815 
1816 Installation directories:
1817   --prefix=PREFIX         install architecture-independent files in PREFIX
1818                           [$ac_default_prefix]
1819   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1820                           [PREFIX]
1821 
1822 By default, \`make install' will install all the files in
1823 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1824 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1825 for instance \`--prefix=\$HOME'.
1826 
1827 For better control, use the options below.
1828 
1829 Fine tuning of the installation directories:
1830   --bindir=DIR            user executables [EPREFIX/bin]
1831   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1832   --libexecdir=DIR        program executables [EPREFIX/libexec]
1833   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1834   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1835   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1836   --libdir=DIR            object code libraries [EPREFIX/lib]
1837   --includedir=DIR        C header files [PREFIX/include]
1838   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1839   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1840   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1841   --infodir=DIR           info documentation [DATAROOTDIR/info]
1842   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1843   --mandir=DIR            man documentation [DATAROOTDIR/man]
1844   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1845   --htmldir=DIR           html documentation [DOCDIR]
1846   --dvidir=DIR            dvi documentation [DOCDIR]
1847   --pdfdir=DIR            pdf documentation [DOCDIR]
1848   --psdir=DIR             ps documentation [DOCDIR]
1849 _ACEOF
1850 
1851   cat <<\_ACEOF
1852 
1853 X features:
1854   --x-includes=DIR    X include files are in DIR
1855   --x-libraries=DIR   X library files are in DIR
1856 
1857 System types:
1858   --build=BUILD     configure for building on BUILD [guessed]
1859   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1860   --target=TARGET   configure for building compilers for TARGET [HOST]
1861 _ACEOF
1862 fi
1863 
1864 if test -n "$ac_init_help"; then
1865   case $ac_init_help in
1866      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1867    esac
1868   cat <<\_ACEOF
1869 
1870 Optional Features:
1871   --disable-option-checking  ignore unrecognized --enable/--with options
1872   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1873   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1874   --enable-openjdk-only   suppress building custom source even if present
1875                           [disabled]
1876   --enable-debug          set the debug level to fastdebug (shorthand for
1877                           --with-debug-level=fastdebug) [disabled]
1878   --disable-headful       disable building headful support (graphical UI
1879                           support) [enabled]
1880   --enable-hotspot-test-in-build
1881                           run the Queens test after Hotspot build [disabled]
1882   --enable-unlimited-crypto
1883                           Enable unlimited crypto policy [disabled]
1884   --enable-static-build   enable static library build [disabled]
1885   --disable-warnings-as-errors
1886                           do not consider native warnings to be an error
1887                           [enabled]
1888   --disable-debug-symbols disable generation of debug symbols [enabled]
1889   --disable-zip-debug-info
1890                           disable zipping of debug-info files [enabled]
1891   --enable-native-coverage
1892                           enable native compilation with code coverage
1893                           data[disabled]
1894   --disable-freetype-bundling
1895                           disable bundling of the freetype library with the
1896                           build result [enabled on Windows or when using
1897                           --with-freetype, disabled otherwise]
1898   --enable-sjavac         use sjavac to do fast incremental compiles
1899                           [disabled]
1900   --disable-javac-server  disable javac server [enabled]
1901   --enable-icecc          enable distribted compilation of native code using
1902                           icecc/icecream [disabled]
1903   --disable-precompiled-headers
1904                           disable using precompiled headers when compiling C++
1905                           [enabled]
1906   --enable-ccache         enable using ccache to speed up recompilations
1907                           [disabled]
1908 
1909 Optional Packages:
1910   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1911   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1912   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1913                           support it), e.g. --with-target-bits=32 [guessed]
1914   --with-custom-make-dir  Deprecated. Option is kept for backwards
1915                           compatibility and is ignored
1916   --with-jdk-variant      JDK variant to build (normal) [normal]
1917   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1918   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1919                           client, minimal1, kernel, zero, zeroshark, core)
1920                           [server]
1921   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1922                           optimized (HotSpot build only)) [release]
1923   --with-devkit           use this devkit for compilers, tools and resources
1924   --with-sys-root         alias for --with-sysroot for backwards compatability
1925   --with-sysroot          use this directory as sysroot
1926   --with-tools-dir        alias for --with-toolchain-path for backwards
1927                           compatibility
1928   --with-toolchain-path   prepend these directories when searching for
1929                           toolchain binaries (compilers etc)
1930   --with-extra-path       prepend these directories to the default path
1931   --with-sdk-name         use the platform SDK of the given name. [macosx]
1932   --with-conf-name        use this as the name of the configuration [generated
1933                           from important configuration options]
1934   --with-output-sync      set make output sync type if supported by make.
1935                           [recurse]
1936   --with-cacerts-file     specify alternative cacerts file
1937   --with-copyright-year   Set copyright year value for build [current year]
1938   --with-milestone        Deprecated. Option is kept for backwards
1939                           compatibility and is ignored
1940   --with-update-version   Deprecated. Option is kept for backwards
1941                           compatibility and is ignored
1942   --with-user-release-suffix
1943                           Deprecated. Option is kept for backwards
1944                           compatibility and is ignored
1945   --with-build-number     Deprecated. Option is kept for backwards
1946                           compatibility and is ignored
1947   --with-version-string   Set version string [calculated]
1948   --with-version-pre      Set the base part of the version 'PRE' field
1949                           (pre-release identifier) ['internal']
1950   --with-version-opt      Set version 'OPT' field (build metadata)
1951                           [<timestamp>.<user>.<dirname>]
1952   --with-version-build    Set version 'BUILD' field (build number) [not
1953                           specified]
1954   --with-version-major    Set version 'MAJOR' field (first number) [current
1955                           source value]
1956   --with-version-minor    Set version 'MINOR' field (second number) [current
1957                           source value]
1958   --with-version-security Set version 'SECURITY' field (third number) [current
1959                           source value]
1960   --with-version-patch    Set version 'PATCH' field (fourth number) [not
1961                           specified]
1962   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1963   --with-add-source-root  Deprecated. Option is kept for backwards
1964                           compatibility and is ignored
1965   --with-override-source-root
1966                           Deprecated. Option is kept for backwards
1967                           compatibility and is ignored
1968   --with-adds-and-overrides
1969                           Deprecated. Option is kept for backwards
1970                           compatibility and is ignored
1971   --with-override-langtools
1972                           Deprecated. Option is kept for backwards
1973                           compatibility and is ignored
1974   --with-override-corba   Deprecated. Option is kept for backwards
1975                           compatibility and is ignored
1976   --with-override-jaxp    Deprecated. Option is kept for backwards
1977                           compatibility and is ignored
1978   --with-override-jaxws   Deprecated. Option is kept for backwards
1979                           compatibility and is ignored
1980   --with-override-hotspot Deprecated. Option is kept for backwards
1981                           compatibility and is ignored
1982   --with-override-nashorn Deprecated. Option is kept for backwards
1983                           compatibility and is ignored
1984   --with-override-jdk     Deprecated. Option is kept for backwards
1985                           compatibility and is ignored
1986   --with-import-hotspot   import hotspot binaries from this jdk image or
1987                           hotspot build dist dir instead of building from
1988                           source
1989   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1990                           to show possible values [platform dependent]
1991   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1992   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1993   --with-extra-ldflags    extra flags to be used when linking jdk
1994   --with-toolchain-version
1995                           the version of the toolchain to look for, use
1996                           '--help' to show possible values [platform
1997                           dependent]
1998   --with-build-devkit     Devkit to use for the build platform toolchain
1999   --with-jtreg            Regression Test Harness [probed]
2000   --with-stdc++lib=<static>,<dynamic>,<default>
2001                           force linking of the C++ runtime on Linux to either
2002                           static or dynamic, default is static with dynamic as
2003                           fallback
2004   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2005                           (Windows only) [probed]
2006   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2007                           (Windows only) [probed]
2008   --with-x                use the X Window System
2009   --with-cups             specify prefix directory for the cups package
2010                           (expecting the headers under PATH/include)
2011   --with-cups-include     specify directory for the cups include files
2012   --with-freetype         specify prefix directory for the freetype package
2013                           (expecting the libraries under PATH/lib and the
2014                           headers under PATH/include)
2015   --with-freetype-include specify directory for the freetype include files
2016   --with-freetype-lib     specify directory for the freetype library
2017   --with-freetype-src     specify directory with freetype sources to
2018                           automatically build the library (experimental,
2019                           Windows-only)
2020   --with-alsa             specify prefix directory for the alsa package
2021                           (expecting the libraries under PATH/lib and the
2022                           headers under PATH/include)
2023   --with-alsa-include     specify directory for the alsa include files
2024   --with-alsa-lib         specify directory for the alsa library
2025   --with-libffi           specify prefix directory for the libffi package
2026                           (expecting the libraries under PATH/lib and the
2027                           headers under PATH/include)
2028   --with-libffi-include   specify directory for the libffi include files
2029   --with-libffi-lib       specify directory for the libffi library
2030   --with-libjpeg          use libjpeg from build system or OpenJDK source
2031                           (system, bundled) [bundled]
2032   --with-giflib           use giflib from build system or OpenJDK source
2033                           (system, bundled) [bundled]
2034   --with-libpng           use libpng from build system or OpenJDK source
2035                           (system, bundled) [bundled]
2036   --with-zlib             use zlib from build system or OpenJDK source
2037                           (system, bundled) [bundled]
2038   --with-lcms             use lcms2 from build system or OpenJDK source
2039                           (system, bundled) [bundled]
2040   --with-dxsdk            Deprecated. Option is kept for backwards
2041                           compatibility and is ignored
2042   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2043                           compatibility and is ignored
2044   --with-dxsdk-include    Deprecated. Option is kept for backwards
2045                           compatibility and is ignored
2046   --with-num-cores        number of cores in the build system, e.g.
2047                           --with-num-cores=8 [probed]
2048   --with-memory-size      memory (in MB) available in the build system, e.g.
2049                           --with-memory-size=1024 [probed]
2050   --with-jobs             number of parallel jobs to let make run [calculated
2051                           based on cores and memory]
2052   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2053                           invocations of boot JDK, overriding the default
2054                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2055                           -enableassertions"
2056   --with-sjavac-server-java
2057                           use this java binary for running the sjavac
2058                           background server [Boot JDK java]
2059   --with-ccache-dir       where to store ccache files [~/.ccache]
2060 
2061 Some influential environment variables:
2062   BASENAME    Override default value for BASENAME
2063   BASH        Override default value for BASH
2064   CAT         Override default value for CAT
2065   CHMOD       Override default value for CHMOD
2066   CMP         Override default value for CMP
2067   COMM        Override default value for COMM
2068   CP          Override default value for CP
2069   CUT         Override default value for CUT
2070   DATE        Override default value for DATE
2071   DIFF        Override default value for DIFF
2072   DIRNAME     Override default value for DIRNAME
2073   ECHO        Override default value for ECHO
2074   EXPR        Override default value for EXPR
2075   FILE        Override default value for FILE
2076   FIND        Override default value for FIND
2077   HEAD        Override default value for HEAD
2078   LN          Override default value for LN
2079   LS          Override default value for LS
2080   MKDIR       Override default value for MKDIR
2081   MKTEMP      Override default value for MKTEMP
2082   MV          Override default value for MV
2083   NAWK        Override default value for NAWK
2084   PRINTF      Override default value for PRINTF
2085   RM          Override default value for RM
2086   RMDIR       Override default value for RMDIR
2087   SH          Override default value for SH
2088   SORT        Override default value for SORT
2089   TAIL        Override default value for TAIL
2090   TAR         Override default value for TAR
2091   TEE         Override default value for TEE
2092   TOUCH       Override default value for TOUCH
2093   TR          Override default value for TR
2094   UNAME       Override default value for UNAME
2095   UNIQ        Override default value for UNIQ
2096   WC          Override default value for WC
2097   WHICH       Override default value for WHICH
2098   XARGS       Override default value for XARGS
2099   AWK         Override default value for AWK
2100   GREP        Override default value for GREP
2101   EGREP       Override default value for EGREP
2102   FGREP       Override default value for FGREP
2103   SED         Override default value for SED
2104   CYGPATH     Override default value for CYGPATH
2105   READLINK    Override default value for READLINK
2106   DF          Override default value for DF
2107   CPIO        Override default value for CPIO
2108   NICE        Override default value for NICE
2109   MAKE        Override default value for MAKE
2110   UNZIP       Override default value for UNZIP
2111   ZIP         Override default value for ZIP
2112   LDD         Override default value for LDD
2113   OTOOL       Override default value for OTOOL
2114   READELF     Override default value for READELF
2115   HG          Override default value for HG
2116   STAT        Override default value for STAT
2117   TIME        Override default value for TIME
2118   PATCH       Override default value for PATCH
2119   DSYMUTIL    Override default value for DSYMUTIL
2120   XATTR       Override default value for XATTR
2121   CODESIGN    Override default value for CODESIGN
2122   SETFILE     Override default value for SETFILE
2123   PKG_CONFIG  path to pkg-config utility
2124   JAVA        Override default value for JAVA
2125   JAVAC       Override default value for JAVAC
2126   JAVAH       Override default value for JAVAH
2127   JAR         Override default value for JAR
2128   JARSIGNER   Override default value for JARSIGNER
2129   CC          C compiler command
2130   CFLAGS      C compiler flags
2131   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2132               nonstandard directory <lib dir>
2133   LIBS        libraries to pass to the linker, e.g. -l<library>
2134   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2135               you have headers in a nonstandard directory <include dir>
2136   CXX         C++ compiler command
2137   CXXFLAGS    C++ compiler flags
2138   CPP         C preprocessor
2139   CXXCPP      C++ preprocessor
2140   AS          Override default value for AS
2141   AR          Override default value for AR
2142   LIPO        Override default value for LIPO
2143   STRIP       Override default value for STRIP
2144   NM          Override default value for NM
2145   GNM         Override default value for GNM
2146   OBJCOPY     Override default value for OBJCOPY
2147   OBJDUMP     Override default value for OBJDUMP
2148   BUILD_CC    Override default value for BUILD_CC
2149   BUILD_CXX   Override default value for BUILD_CXX
2150   BUILD_NM    Override default value for BUILD_NM
2151   BUILD_AR    Override default value for BUILD_AR
2152   JTREGEXE    Override default value for JTREGEXE
2153   XMKMF       Path to xmkmf, Makefile generator for X Window System
2154   FREETYPE_CFLAGS
2155               C compiler flags for FREETYPE, overriding pkg-config
2156   FREETYPE_LIBS
2157               linker flags for FREETYPE, overriding pkg-config
2158   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2159   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2160   LIBFFI_CFLAGS
2161               C compiler flags for LIBFFI, overriding pkg-config
2162   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2163   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2164   PNG_LIBS    linker flags for PNG, overriding pkg-config
2165   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2166   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2167   ICECC_CMD   Override default value for ICECC_CMD
2168   ICECC_CREATE_ENV
2169               Override default value for ICECC_CREATE_ENV
2170   ICECC_WRAPPER
2171               Override default value for ICECC_WRAPPER
2172   CCACHE      Override default value for CCACHE
2173 
2174 Use these variables to override the choices made by `configure' or to help
2175 it to find libraries and programs with nonstandard names/locations.
2176 
2177 Report bugs to <build-dev@openjdk.java.net>.
2178 OpenJDK home page: <http://openjdk.java.net>.
2179 _ACEOF
2180 ac_status=$?
2181 fi
2182 
2183 if test "$ac_init_help" = "recursive"; then
2184   # If there are subdirs, report their specific --help.
2185   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2186     test -d "$ac_dir" ||
2187       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2188       continue
2189     ac_builddir=.
2190 
2191 case "$ac_dir" in
2192 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2193 *)
2194   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2195   # A ".." for each directory in $ac_dir_suffix.
2196   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2197   case $ac_top_builddir_sub in
2198   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2199   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2200   esac ;;
2201 esac
2202 ac_abs_top_builddir=$ac_pwd
2203 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2204 # for backward compatibility:
2205 ac_top_builddir=$ac_top_build_prefix
2206 
2207 case $srcdir in
2208   .)  # We are building in place.
2209     ac_srcdir=.
2210     ac_top_srcdir=$ac_top_builddir_sub
2211     ac_abs_top_srcdir=$ac_pwd ;;
2212   [\\/]* | ?:[\\/]* )  # Absolute name.
2213     ac_srcdir=$srcdir$ac_dir_suffix;
2214     ac_top_srcdir=$srcdir
2215     ac_abs_top_srcdir=$srcdir ;;
2216   *) # Relative name.
2217     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2218     ac_top_srcdir=$ac_top_build_prefix$srcdir
2219     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2220 esac
2221 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2222 
2223     cd "$ac_dir" || { ac_status=$?; continue; }
2224     # Check for guested configure.
2225     if test -f "$ac_srcdir/configure.gnu"; then
2226       echo &&
2227       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2228     elif test -f "$ac_srcdir/configure"; then
2229       echo &&
2230       $SHELL "$ac_srcdir/configure" --help=recursive
2231     else
2232       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2233     fi || ac_status=$?
2234     cd "$ac_pwd" || { ac_status=$?; break; }
2235   done
2236 fi
2237 
2238 test -n "$ac_init_help" && exit $ac_status
2239 if $ac_init_version; then
2240   cat <<\_ACEOF
2241 OpenJDK configure jdk9
2242 generated by GNU Autoconf 2.69
2243 
2244 Copyright (C) 2012 Free Software Foundation, Inc.
2245 This configure script is free software; the Free Software Foundation
2246 gives unlimited permission to copy, distribute and modify it.
2247 _ACEOF
2248   exit
2249 fi
2250 
2251 ## ------------------------ ##
2252 ## Autoconf initialization. ##
2253 ## ------------------------ ##
2254 
2255 # ac_fn_c_try_compile LINENO
2256 # --------------------------
2257 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2258 ac_fn_c_try_compile ()
2259 {
2260   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2261   rm -f conftest.$ac_objext
2262   if { { ac_try="$ac_compile"
2263 case "(($ac_try" in
2264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2265   *) ac_try_echo=$ac_try;;
2266 esac
2267 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2268 $as_echo "$ac_try_echo"; } >&5
2269   (eval "$ac_compile") 2>conftest.err
2270   ac_status=$?
2271   if test -s conftest.err; then
2272     grep -v '^ *+' conftest.err >conftest.er1
2273     cat conftest.er1 >&5
2274     mv -f conftest.er1 conftest.err
2275   fi
2276   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2277   test $ac_status = 0; } && {
2278          test -z "$ac_c_werror_flag" ||
2279          test ! -s conftest.err
2280        } && test -s conftest.$ac_objext; then :
2281   ac_retval=0
2282 else
2283   $as_echo "$as_me: failed program was:" >&5
2284 sed 's/^/| /' conftest.$ac_ext >&5
2285 
2286         ac_retval=1
2287 fi
2288   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289   as_fn_set_status $ac_retval
2290 
2291 } # ac_fn_c_try_compile
2292 
2293 # ac_fn_cxx_try_compile LINENO
2294 # ----------------------------
2295 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2296 ac_fn_cxx_try_compile ()
2297 {
2298   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2299   rm -f conftest.$ac_objext
2300   if { { ac_try="$ac_compile"
2301 case "(($ac_try" in
2302   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2303   *) ac_try_echo=$ac_try;;
2304 esac
2305 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2306 $as_echo "$ac_try_echo"; } >&5
2307   (eval "$ac_compile") 2>conftest.err
2308   ac_status=$?
2309   if test -s conftest.err; then
2310     grep -v '^ *+' conftest.err >conftest.er1
2311     cat conftest.er1 >&5
2312     mv -f conftest.er1 conftest.err
2313   fi
2314   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2315   test $ac_status = 0; } && {
2316          test -z "$ac_cxx_werror_flag" ||
2317          test ! -s conftest.err
2318        } && test -s conftest.$ac_objext; then :
2319   ac_retval=0
2320 else
2321   $as_echo "$as_me: failed program was:" >&5
2322 sed 's/^/| /' conftest.$ac_ext >&5
2323 
2324         ac_retval=1
2325 fi
2326   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2327   as_fn_set_status $ac_retval
2328 
2329 } # ac_fn_cxx_try_compile
2330 
2331 # ac_fn_c_try_cpp LINENO
2332 # ----------------------
2333 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2334 ac_fn_c_try_cpp ()
2335 {
2336   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2337   if { { ac_try="$ac_cpp conftest.$ac_ext"
2338 case "(($ac_try" in
2339   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2340   *) ac_try_echo=$ac_try;;
2341 esac
2342 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2343 $as_echo "$ac_try_echo"; } >&5
2344   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2345   ac_status=$?
2346   if test -s conftest.err; then
2347     grep -v '^ *+' conftest.err >conftest.er1
2348     cat conftest.er1 >&5
2349     mv -f conftest.er1 conftest.err
2350   fi
2351   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2352   test $ac_status = 0; } > conftest.i && {
2353          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2354          test ! -s conftest.err
2355        }; then :
2356   ac_retval=0
2357 else
2358   $as_echo "$as_me: failed program was:" >&5
2359 sed 's/^/| /' conftest.$ac_ext >&5
2360 
2361     ac_retval=1
2362 fi
2363   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2364   as_fn_set_status $ac_retval
2365 
2366 } # ac_fn_c_try_cpp
2367 
2368 # ac_fn_cxx_try_cpp LINENO
2369 # ------------------------
2370 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2371 ac_fn_cxx_try_cpp ()
2372 {
2373   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374   if { { ac_try="$ac_cpp conftest.$ac_ext"
2375 case "(($ac_try" in
2376   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2377   *) ac_try_echo=$ac_try;;
2378 esac
2379 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2380 $as_echo "$ac_try_echo"; } >&5
2381   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2382   ac_status=$?
2383   if test -s conftest.err; then
2384     grep -v '^ *+' conftest.err >conftest.er1
2385     cat conftest.er1 >&5
2386     mv -f conftest.er1 conftest.err
2387   fi
2388   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2389   test $ac_status = 0; } > conftest.i && {
2390          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2391          test ! -s conftest.err
2392        }; then :
2393   ac_retval=0
2394 else
2395   $as_echo "$as_me: failed program was:" >&5
2396 sed 's/^/| /' conftest.$ac_ext >&5
2397 
2398     ac_retval=1
2399 fi
2400   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2401   as_fn_set_status $ac_retval
2402 
2403 } # ac_fn_cxx_try_cpp
2404 
2405 # ac_fn_c_try_link LINENO
2406 # -----------------------
2407 # Try to link conftest.$ac_ext, and return whether this succeeded.
2408 ac_fn_c_try_link ()
2409 {
2410   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411   rm -f conftest.$ac_objext conftest$ac_exeext
2412   if { { ac_try="$ac_link"
2413 case "(($ac_try" in
2414   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2415   *) ac_try_echo=$ac_try;;
2416 esac
2417 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2418 $as_echo "$ac_try_echo"; } >&5
2419   (eval "$ac_link") 2>conftest.err
2420   ac_status=$?
2421   if test -s conftest.err; then
2422     grep -v '^ *+' conftest.err >conftest.er1
2423     cat conftest.er1 >&5
2424     mv -f conftest.er1 conftest.err
2425   fi
2426   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2427   test $ac_status = 0; } && {
2428          test -z "$ac_c_werror_flag" ||
2429          test ! -s conftest.err
2430        } && test -s conftest$ac_exeext && {
2431          test "$cross_compiling" = yes ||
2432          test -x conftest$ac_exeext
2433        }; then :
2434   ac_retval=0
2435 else
2436   $as_echo "$as_me: failed program was:" >&5
2437 sed 's/^/| /' conftest.$ac_ext >&5
2438 
2439         ac_retval=1
2440 fi
2441   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2442   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2443   # interfere with the next link command; also delete a directory that is
2444   # left behind by Apple's compiler.  We do this before executing the actions.
2445   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2446   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2447   as_fn_set_status $ac_retval
2448 
2449 } # ac_fn_c_try_link
2450 
2451 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2452 # ---------------------------------------------------------
2453 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2454 # the include files in INCLUDES and setting the cache variable VAR
2455 # accordingly.
2456 ac_fn_cxx_check_header_mongrel ()
2457 {
2458   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2459   if eval \${$3+:} false; then :
2460   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2461 $as_echo_n "checking for $2... " >&6; }
2462 if eval \${$3+:} false; then :
2463   $as_echo_n "(cached) " >&6
2464 fi
2465 eval ac_res=\$$3
2466                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2467 $as_echo "$ac_res" >&6; }
2468 else
2469   # Is the header compilable?
2470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2471 $as_echo_n "checking $2 usability... " >&6; }
2472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2473 /* end confdefs.h.  */
2474 $4
2475 #include <$2>
2476 _ACEOF
2477 if ac_fn_cxx_try_compile "$LINENO"; then :
2478   ac_header_compiler=yes
2479 else
2480   ac_header_compiler=no
2481 fi
2482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2484 $as_echo "$ac_header_compiler" >&6; }
2485 
2486 # Is the header present?
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2488 $as_echo_n "checking $2 presence... " >&6; }
2489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490 /* end confdefs.h.  */
2491 #include <$2>
2492 _ACEOF
2493 if ac_fn_cxx_try_cpp "$LINENO"; then :
2494   ac_header_preproc=yes
2495 else
2496   ac_header_preproc=no
2497 fi
2498 rm -f conftest.err conftest.i conftest.$ac_ext
2499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2500 $as_echo "$ac_header_preproc" >&6; }
2501 
2502 # So?  What about this header?
2503 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2504   yes:no: )
2505     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2506 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2507     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2508 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2509     ;;
2510   no:yes:* )
2511     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2512 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2513     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2514 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2515     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2516 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2517     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2518 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2519     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2520 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2521 ( $as_echo "## ----------------------------------------- ##
2522 ## Report this to build-dev@openjdk.java.net ##
2523 ## ----------------------------------------- ##"
2524      ) | sed "s/^/$as_me: WARNING:     /" >&2
2525     ;;
2526 esac
2527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528 $as_echo_n "checking for $2... " >&6; }
2529 if eval \${$3+:} false; then :
2530   $as_echo_n "(cached) " >&6
2531 else
2532   eval "$3=\$ac_header_compiler"
2533 fi
2534 eval ac_res=\$$3
2535                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2536 $as_echo "$ac_res" >&6; }
2537 fi
2538   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2539 
2540 } # ac_fn_cxx_check_header_mongrel
2541 
2542 # ac_fn_cxx_try_run LINENO
2543 # ------------------------
2544 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2545 # that executables *can* be run.
2546 ac_fn_cxx_try_run ()
2547 {
2548   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2549   if { { ac_try="$ac_link"
2550 case "(($ac_try" in
2551   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2552   *) ac_try_echo=$ac_try;;
2553 esac
2554 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2555 $as_echo "$ac_try_echo"; } >&5
2556   (eval "$ac_link") 2>&5
2557   ac_status=$?
2558   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2559   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2560   { { case "(($ac_try" in
2561   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2562   *) ac_try_echo=$ac_try;;
2563 esac
2564 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2565 $as_echo "$ac_try_echo"; } >&5
2566   (eval "$ac_try") 2>&5
2567   ac_status=$?
2568   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2569   test $ac_status = 0; }; }; then :
2570   ac_retval=0
2571 else
2572   $as_echo "$as_me: program exited with status $ac_status" >&5
2573        $as_echo "$as_me: failed program was:" >&5
2574 sed 's/^/| /' conftest.$ac_ext >&5
2575 
2576        ac_retval=$ac_status
2577 fi
2578   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2579   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2580   as_fn_set_status $ac_retval
2581 
2582 } # ac_fn_cxx_try_run
2583 
2584 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2585 # ---------------------------------------------------------
2586 # Tests whether HEADER exists and can be compiled using the include files in
2587 # INCLUDES, setting the cache variable VAR accordingly.
2588 ac_fn_cxx_check_header_compile ()
2589 {
2590   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2592 $as_echo_n "checking for $2... " >&6; }
2593 if eval \${$3+:} false; then :
2594   $as_echo_n "(cached) " >&6
2595 else
2596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2597 /* end confdefs.h.  */
2598 $4
2599 #include <$2>
2600 _ACEOF
2601 if ac_fn_cxx_try_compile "$LINENO"; then :
2602   eval "$3=yes"
2603 else
2604   eval "$3=no"
2605 fi
2606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2607 fi
2608 eval ac_res=\$$3
2609                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2610 $as_echo "$ac_res" >&6; }
2611   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2612 
2613 } # ac_fn_cxx_check_header_compile
2614 
2615 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2616 # ----------------------------------------------
2617 # Tries to find the compile-time value of EXPR in a program that includes
2618 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2619 # computed
2620 ac_fn_cxx_compute_int ()
2621 {
2622   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2623   if test "$cross_compiling" = yes; then
2624     # Depending upon the size, compute the lo and hi bounds.
2625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2626 /* end confdefs.h.  */
2627 $4
2628 int
2629 main ()
2630 {
2631 static int test_array [1 - 2 * !(($2) >= 0)];
2632 test_array [0] = 0;
2633 return test_array [0];
2634 
2635   ;
2636   return 0;
2637 }
2638 _ACEOF
2639 if ac_fn_cxx_try_compile "$LINENO"; then :
2640   ac_lo=0 ac_mid=0
2641   while :; do
2642     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643 /* end confdefs.h.  */
2644 $4
2645 int
2646 main ()
2647 {
2648 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2649 test_array [0] = 0;
2650 return test_array [0];
2651 
2652   ;
2653   return 0;
2654 }
2655 _ACEOF
2656 if ac_fn_cxx_try_compile "$LINENO"; then :
2657   ac_hi=$ac_mid; break
2658 else
2659   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2660                         if test $ac_lo -le $ac_mid; then
2661                           ac_lo= ac_hi=
2662                           break
2663                         fi
2664                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2665 fi
2666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2667   done
2668 else
2669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2670 /* end confdefs.h.  */
2671 $4
2672 int
2673 main ()
2674 {
2675 static int test_array [1 - 2 * !(($2) < 0)];
2676 test_array [0] = 0;
2677 return test_array [0];
2678 
2679   ;
2680   return 0;
2681 }
2682 _ACEOF
2683 if ac_fn_cxx_try_compile "$LINENO"; then :
2684   ac_hi=-1 ac_mid=-1
2685   while :; do
2686     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687 /* end confdefs.h.  */
2688 $4
2689 int
2690 main ()
2691 {
2692 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2693 test_array [0] = 0;
2694 return test_array [0];
2695 
2696   ;
2697   return 0;
2698 }
2699 _ACEOF
2700 if ac_fn_cxx_try_compile "$LINENO"; then :
2701   ac_lo=$ac_mid; break
2702 else
2703   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2704                         if test $ac_mid -le $ac_hi; then
2705                           ac_lo= ac_hi=
2706                           break
2707                         fi
2708                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2709 fi
2710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2711   done
2712 else
2713   ac_lo= ac_hi=
2714 fi
2715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2716 fi
2717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2718 # Binary search between lo and hi bounds.
2719 while test "x$ac_lo" != "x$ac_hi"; do
2720   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2722 /* end confdefs.h.  */
2723 $4
2724 int
2725 main ()
2726 {
2727 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2728 test_array [0] = 0;
2729 return test_array [0];
2730 
2731   ;
2732   return 0;
2733 }
2734 _ACEOF
2735 if ac_fn_cxx_try_compile "$LINENO"; then :
2736   ac_hi=$ac_mid
2737 else
2738   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2739 fi
2740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2741 done
2742 case $ac_lo in #((
2743 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2744 '') ac_retval=1 ;;
2745 esac
2746   else
2747     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2748 /* end confdefs.h.  */
2749 $4
2750 static long int longval () { return $2; }
2751 static unsigned long int ulongval () { return $2; }
2752 #include <stdio.h>
2753 #include <stdlib.h>
2754 int
2755 main ()
2756 {
2757 
2758   FILE *f = fopen ("conftest.val", "w");
2759   if (! f)
2760     return 1;
2761   if (($2) < 0)
2762     {
2763       long int i = longval ();
2764       if (i != ($2))
2765         return 1;
2766       fprintf (f, "%ld", i);
2767     }
2768   else
2769     {
2770       unsigned long int i = ulongval ();
2771       if (i != ($2))
2772         return 1;
2773       fprintf (f, "%lu", i);
2774     }
2775   /* Do not output a trailing newline, as this causes \r\n confusion
2776      on some platforms.  */
2777   return ferror (f) || fclose (f) != 0;
2778 
2779   ;
2780   return 0;
2781 }
2782 _ACEOF
2783 if ac_fn_cxx_try_run "$LINENO"; then :
2784   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2785 else
2786   ac_retval=1
2787 fi
2788 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2789   conftest.$ac_objext conftest.beam conftest.$ac_ext
2790 rm -f conftest.val
2791 
2792   fi
2793   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2794   as_fn_set_status $ac_retval
2795 
2796 } # ac_fn_cxx_compute_int
2797 
2798 # ac_fn_cxx_try_link LINENO
2799 # -------------------------
2800 # Try to link conftest.$ac_ext, and return whether this succeeded.
2801 ac_fn_cxx_try_link ()
2802 {
2803   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2804   rm -f conftest.$ac_objext conftest$ac_exeext
2805   if { { ac_try="$ac_link"
2806 case "(($ac_try" in
2807   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2808   *) ac_try_echo=$ac_try;;
2809 esac
2810 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2811 $as_echo "$ac_try_echo"; } >&5
2812   (eval "$ac_link") 2>conftest.err
2813   ac_status=$?
2814   if test -s conftest.err; then
2815     grep -v '^ *+' conftest.err >conftest.er1
2816     cat conftest.er1 >&5
2817     mv -f conftest.er1 conftest.err
2818   fi
2819   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2820   test $ac_status = 0; } && {
2821          test -z "$ac_cxx_werror_flag" ||
2822          test ! -s conftest.err
2823        } && test -s conftest$ac_exeext && {
2824          test "$cross_compiling" = yes ||
2825          test -x conftest$ac_exeext
2826        }; then :
2827   ac_retval=0
2828 else
2829   $as_echo "$as_me: failed program was:" >&5
2830 sed 's/^/| /' conftest.$ac_ext >&5
2831 
2832         ac_retval=1
2833 fi
2834   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2835   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2836   # interfere with the next link command; also delete a directory that is
2837   # left behind by Apple's compiler.  We do this before executing the actions.
2838   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2839   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2840   as_fn_set_status $ac_retval
2841 
2842 } # ac_fn_cxx_try_link
2843 
2844 # ac_fn_cxx_check_func LINENO FUNC VAR
2845 # ------------------------------------
2846 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2847 ac_fn_cxx_check_func ()
2848 {
2849   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2850   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2851 $as_echo_n "checking for $2... " >&6; }
2852 if eval \${$3+:} false; then :
2853   $as_echo_n "(cached) " >&6
2854 else
2855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2856 /* end confdefs.h.  */
2857 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2858    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2859 #define $2 innocuous_$2
2860 
2861 /* System header to define __stub macros and hopefully few prototypes,
2862     which can conflict with char $2 (); below.
2863     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2864     <limits.h> exists even on freestanding compilers.  */
2865 
2866 #ifdef __STDC__
2867 # include <limits.h>
2868 #else
2869 # include <assert.h>
2870 #endif
2871 
2872 #undef $2
2873 
2874 /* Override any GCC internal prototype to avoid an error.
2875    Use char because int might match the return type of a GCC
2876    builtin and then its argument prototype would still apply.  */
2877 #ifdef __cplusplus
2878 extern "C"
2879 #endif
2880 char $2 ();
2881 /* The GNU C library defines this for functions which it implements
2882     to always fail with ENOSYS.  Some functions are actually named
2883     something starting with __ and the normal name is an alias.  */
2884 #if defined __stub_$2 || defined __stub___$2
2885 choke me
2886 #endif
2887 
2888 int
2889 main ()
2890 {
2891 return $2 ();
2892   ;
2893   return 0;
2894 }
2895 _ACEOF
2896 if ac_fn_cxx_try_link "$LINENO"; then :
2897   eval "$3=yes"
2898 else
2899   eval "$3=no"
2900 fi
2901 rm -f core conftest.err conftest.$ac_objext \
2902     conftest$ac_exeext conftest.$ac_ext
2903 fi
2904 eval ac_res=\$$3
2905                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2906 $as_echo "$ac_res" >&6; }
2907   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2908 
2909 } # ac_fn_cxx_check_func
2910 
2911 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2912 # -------------------------------------------------------
2913 # Tests whether HEADER exists and can be compiled using the include files in
2914 # INCLUDES, setting the cache variable VAR accordingly.
2915 ac_fn_c_check_header_compile ()
2916 {
2917   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2918   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2919 $as_echo_n "checking for $2... " >&6; }
2920 if eval \${$3+:} false; then :
2921   $as_echo_n "(cached) " >&6
2922 else
2923   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2924 /* end confdefs.h.  */
2925 $4
2926 #include <$2>
2927 _ACEOF
2928 if ac_fn_c_try_compile "$LINENO"; then :
2929   eval "$3=yes"
2930 else
2931   eval "$3=no"
2932 fi
2933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2934 fi
2935 eval ac_res=\$$3
2936                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2937 $as_echo "$ac_res" >&6; }
2938   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2939 
2940 } # ac_fn_c_check_header_compile
2941 cat >config.log <<_ACEOF
2942 This file contains any messages produced by compilers while
2943 running configure, to aid debugging if configure makes a mistake.
2944 
2945 It was created by OpenJDK $as_me jdk9, which was
2946 generated by GNU Autoconf 2.69.  Invocation command line was
2947 
2948   $ $0 $@
2949 
2950 _ACEOF
2951 exec 5>>config.log
2952 {
2953 cat <<_ASUNAME
2954 ## --------- ##
2955 ## Platform. ##
2956 ## --------- ##
2957 
2958 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2959 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2960 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2961 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2962 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2963 
2964 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2965 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2966 
2967 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2968 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2969 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2970 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2971 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2972 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2973 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2974 
2975 _ASUNAME
2976 
2977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2978 for as_dir in $PATH
2979 do
2980   IFS=$as_save_IFS
2981   test -z "$as_dir" && as_dir=.
2982     $as_echo "PATH: $as_dir"
2983   done
2984 IFS=$as_save_IFS
2985 
2986 } >&5
2987 
2988 cat >&5 <<_ACEOF
2989 
2990 
2991 ## ----------- ##
2992 ## Core tests. ##
2993 ## ----------- ##
2994 
2995 _ACEOF
2996 
2997 
2998 # Keep a trace of the command line.
2999 # Strip out --no-create and --no-recursion so they do not pile up.
3000 # Strip out --silent because we don't want to record it for future runs.
3001 # Also quote any args containing shell meta-characters.
3002 # Make two passes to allow for proper duplicate-argument suppression.
3003 ac_configure_args=
3004 ac_configure_args0=
3005 ac_configure_args1=
3006 ac_must_keep_next=false
3007 for ac_pass in 1 2
3008 do
3009   for ac_arg
3010   do
3011     case $ac_arg in
3012     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3013     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3014     | -silent | --silent | --silen | --sile | --sil)
3015       continue ;;
3016     *\'*)
3017       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3018     esac
3019     case $ac_pass in
3020     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3021     2)
3022       as_fn_append ac_configure_args1 " '$ac_arg'"
3023       if test $ac_must_keep_next = true; then
3024         ac_must_keep_next=false # Got value, back to normal.
3025       else
3026         case $ac_arg in
3027           *=* | --config-cache | -C | -disable-* | --disable-* \
3028           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3029           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3030           | -with-* | --with-* | -without-* | --without-* | --x)
3031             case "$ac_configure_args0 " in
3032               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3033             esac
3034             ;;
3035           -* ) ac_must_keep_next=true ;;
3036         esac
3037       fi
3038       as_fn_append ac_configure_args " '$ac_arg'"
3039       ;;
3040     esac
3041   done
3042 done
3043 { ac_configure_args0=; unset ac_configure_args0;}
3044 { ac_configure_args1=; unset ac_configure_args1;}
3045 
3046 # When interrupted or exit'd, cleanup temporary files, and complete
3047 # config.log.  We remove comments because anyway the quotes in there
3048 # would cause problems or look ugly.
3049 # WARNING: Use '\'' to represent an apostrophe within the trap.
3050 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3051 trap 'exit_status=$?
3052   # Save into config.log some information that might help in debugging.
3053   {
3054     echo
3055 
3056     $as_echo "## ---------------- ##
3057 ## Cache variables. ##
3058 ## ---------------- ##"
3059     echo
3060     # The following way of writing the cache mishandles newlines in values,
3061 (
3062   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3063     eval ac_val=\$$ac_var
3064     case $ac_val in #(
3065     *${as_nl}*)
3066       case $ac_var in #(
3067       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3068 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3069       esac
3070       case $ac_var in #(
3071       _ | IFS | as_nl) ;; #(
3072       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3073       *) { eval $ac_var=; unset $ac_var;} ;;
3074       esac ;;
3075     esac
3076   done
3077   (set) 2>&1 |
3078     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3079     *${as_nl}ac_space=\ *)
3080       sed -n \
3081         "s/'\''/'\''\\\\'\'''\''/g;
3082           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3083       ;; #(
3084     *)
3085       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3086       ;;
3087     esac |
3088     sort
3089 )
3090     echo
3091 
3092     $as_echo "## ----------------- ##
3093 ## Output variables. ##
3094 ## ----------------- ##"
3095     echo
3096     for ac_var in $ac_subst_vars
3097     do
3098       eval ac_val=\$$ac_var
3099       case $ac_val in
3100       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3101       esac
3102       $as_echo "$ac_var='\''$ac_val'\''"
3103     done | sort
3104     echo
3105 
3106     if test -n "$ac_subst_files"; then
3107       $as_echo "## ------------------- ##
3108 ## File substitutions. ##
3109 ## ------------------- ##"
3110       echo
3111       for ac_var in $ac_subst_files
3112       do
3113         eval ac_val=\$$ac_var
3114         case $ac_val in
3115         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3116         esac
3117         $as_echo "$ac_var='\''$ac_val'\''"
3118       done | sort
3119       echo
3120     fi
3121 
3122     if test -s confdefs.h; then
3123       $as_echo "## ----------- ##
3124 ## confdefs.h. ##
3125 ## ----------- ##"
3126       echo
3127       cat confdefs.h
3128       echo
3129     fi
3130     test "$ac_signal" != 0 &&
3131       $as_echo "$as_me: caught signal $ac_signal"
3132     $as_echo "$as_me: exit $exit_status"
3133   } >&5
3134   rm -f core *.core core.conftest.* &&
3135     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3136     exit $exit_status
3137 ' 0
3138 for ac_signal in 1 2 13 15; do
3139   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3140 done
3141 ac_signal=0
3142 
3143 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3144 rm -f -r conftest* confdefs.h
3145 
3146 $as_echo "/* confdefs.h */" > confdefs.h
3147 
3148 # Predefined preprocessor variables.
3149 
3150 cat >>confdefs.h <<_ACEOF
3151 #define PACKAGE_NAME "$PACKAGE_NAME"
3152 _ACEOF
3153 
3154 cat >>confdefs.h <<_ACEOF
3155 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3156 _ACEOF
3157 
3158 cat >>confdefs.h <<_ACEOF
3159 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3160 _ACEOF
3161 
3162 cat >>confdefs.h <<_ACEOF
3163 #define PACKAGE_STRING "$PACKAGE_STRING"
3164 _ACEOF
3165 
3166 cat >>confdefs.h <<_ACEOF
3167 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3168 _ACEOF
3169 
3170 cat >>confdefs.h <<_ACEOF
3171 #define PACKAGE_URL "$PACKAGE_URL"
3172 _ACEOF
3173 
3174 
3175 # Let the site file select an alternate cache file if it wants to.
3176 # Prefer an explicitly selected file to automatically selected ones.
3177 ac_site_file1=NONE
3178 ac_site_file2=NONE
3179 if test -n "$CONFIG_SITE"; then
3180   # We do not want a PATH search for config.site.
3181   case $CONFIG_SITE in #((
3182     -*)  ac_site_file1=./$CONFIG_SITE;;
3183     */*) ac_site_file1=$CONFIG_SITE;;
3184     *)   ac_site_file1=./$CONFIG_SITE;;
3185   esac
3186 elif test "x$prefix" != xNONE; then
3187   ac_site_file1=$prefix/share/config.site
3188   ac_site_file2=$prefix/etc/config.site
3189 else
3190   ac_site_file1=$ac_default_prefix/share/config.site
3191   ac_site_file2=$ac_default_prefix/etc/config.site
3192 fi
3193 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3194 do
3195   test "x$ac_site_file" = xNONE && continue
3196   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3197     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3198 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3199     sed 's/^/| /' "$ac_site_file" >&5
3200     . "$ac_site_file" \
3201       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3202 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3203 as_fn_error $? "failed to load site script $ac_site_file
3204 See \`config.log' for more details" "$LINENO" 5; }
3205   fi
3206 done
3207 
3208 if test -r "$cache_file"; then
3209   # Some versions of bash will fail to source /dev/null (special files
3210   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3211   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3212     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3213 $as_echo "$as_me: loading cache $cache_file" >&6;}
3214     case $cache_file in
3215       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3216       *)                      . "./$cache_file";;
3217     esac
3218   fi
3219 else
3220   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3221 $as_echo "$as_me: creating cache $cache_file" >&6;}
3222   >$cache_file
3223 fi
3224 
3225 # Check that the precious variables saved in the cache have kept the same
3226 # value.
3227 ac_cache_corrupted=false
3228 for ac_var in $ac_precious_vars; do
3229   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3230   eval ac_new_set=\$ac_env_${ac_var}_set
3231   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3232   eval ac_new_val=\$ac_env_${ac_var}_value
3233   case $ac_old_set,$ac_new_set in
3234     set,)
3235       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3236 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3237       ac_cache_corrupted=: ;;
3238     ,set)
3239       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3240 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3241       ac_cache_corrupted=: ;;
3242     ,);;
3243     *)
3244       if test "x$ac_old_val" != "x$ac_new_val"; then
3245         # differences in whitespace do not lead to failure.
3246         ac_old_val_w=`echo x $ac_old_val`
3247         ac_new_val_w=`echo x $ac_new_val`
3248         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3249           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3250 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3251           ac_cache_corrupted=:
3252         else
3253           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3254 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3255           eval $ac_var=\$ac_old_val
3256         fi
3257         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3258 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3259         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3260 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3261       fi;;
3262   esac
3263   # Pass precious variables to config.status.
3264   if test "$ac_new_set" = set; then
3265     case $ac_new_val in
3266     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3267     *) ac_arg=$ac_var=$ac_new_val ;;
3268     esac
3269     case " $ac_configure_args " in
3270       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3271       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3272     esac
3273   fi
3274 done
3275 if $ac_cache_corrupted; then
3276   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3277 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3278   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3279 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3280   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3281 fi
3282 ## -------------------- ##
3283 ## Main body of script. ##
3284 ## -------------------- ##
3285 
3286 ac_ext=c
3287 ac_cpp='$CPP $CPPFLAGS'
3288 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3289 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3290 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3291 
3292 
3293 
3294 ac_aux_dir=
3295 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3296   if test -f "$ac_dir/install-sh"; then
3297     ac_aux_dir=$ac_dir
3298     ac_install_sh="$ac_aux_dir/install-sh -c"
3299     break
3300   elif test -f "$ac_dir/install.sh"; then
3301     ac_aux_dir=$ac_dir
3302     ac_install_sh="$ac_aux_dir/install.sh -c"
3303     break
3304   elif test -f "$ac_dir/shtool"; then
3305     ac_aux_dir=$ac_dir
3306     ac_install_sh="$ac_aux_dir/shtool install -c"
3307     break
3308   fi
3309 done
3310 if test -z "$ac_aux_dir"; then
3311   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
3312 fi
3313 
3314 # These three variables are undocumented and unsupported,
3315 # and are intended to be withdrawn in a future Autoconf release.
3316 # They can cause serious problems if a builder's source tree is in a directory
3317 # whose full name contains unusual characters.
3318 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3319 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3320 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3321 
3322 
3323 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3324 
3325 #
3326 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3327 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3328 #
3329 # This code is free software; you can redistribute it and/or modify it
3330 # under the terms of the GNU General Public License version 2 only, as
3331 # published by the Free Software Foundation.  Oracle designates this
3332 # particular file as subject to the "Classpath" exception as provided
3333 # by Oracle in the LICENSE file that accompanied this code.
3334 #
3335 # This code is distributed in the hope that it will be useful, but WITHOUT
3336 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3337 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3338 # version 2 for more details (a copy is included in the LICENSE file that
3339 # accompanied this code).
3340 #
3341 # You should have received a copy of the GNU General Public License version
3342 # 2 along with this work; if not, write to the Free Software Foundation,
3343 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3344 #
3345 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3346 # or visit www.oracle.com if you need additional information or have any
3347 # questions.
3348 #
3349 
3350 #
3351 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3352 #
3353 # This program is free software; you can redistribute it and/or modify
3354 # it under the terms of the GNU General Public License as published by
3355 # the Free Software Foundation; either version 2 of the License, or
3356 # (at your option) any later version.
3357 #
3358 # This program is distributed in the hope that it will be useful, but
3359 # WITHOUT ANY WARRANTY; without even the implied warranty of
3360 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3361 # General Public License for more details.
3362 #
3363 # You should have received a copy of the GNU General Public License
3364 # along with this program; if not, write to the Free Software
3365 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3366 #
3367 # As a special exception to the GNU General Public License, if you
3368 # distribute this file as part of a program that contains a
3369 # configuration script generated by Autoconf, you may include it under
3370 # the same distribution terms that you use for the rest of that program.
3371 
3372 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3373 # ----------------------------------
3374 # PKG_PROG_PKG_CONFIG
3375 
3376 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3377 #
3378 # Check to see whether a particular set of modules exists.  Similar
3379 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3380 #
3381 #
3382 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3383 # this or PKG_CHECK_MODULES is called, or make sure to call
3384 # PKG_CHECK_EXISTS manually
3385 # --------------------------------------------------------------
3386 
3387 
3388 
3389 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3390 # ---------------------------------------------
3391 # _PKG_CONFIG
3392 
3393 # _PKG_SHORT_ERRORS_SUPPORTED
3394 # -----------------------------
3395 # _PKG_SHORT_ERRORS_SUPPORTED
3396 
3397 
3398 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3399 # [ACTION-IF-NOT-FOUND])
3400 #
3401 #
3402 # Note that if there is a possibility the first call to
3403 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3404 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3405 #
3406 #
3407 # --------------------------------------------------------------
3408 # PKG_CHECK_MODULES
3409 
3410 
3411 # Include these first...
3412 #
3413 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3414 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3415 #
3416 # This code is free software; you can redistribute it and/or modify it
3417 # under the terms of the GNU General Public License version 2 only, as
3418 # published by the Free Software Foundation.  Oracle designates this
3419 # particular file as subject to the "Classpath" exception as provided
3420 # by Oracle in the LICENSE file that accompanied this code.
3421 #
3422 # This code is distributed in the hope that it will be useful, but WITHOUT
3423 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3424 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3425 # version 2 for more details (a copy is included in the LICENSE file that
3426 # accompanied this code).
3427 #
3428 # You should have received a copy of the GNU General Public License version
3429 # 2 along with this work; if not, write to the Free Software Foundation,
3430 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3431 #
3432 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3433 # or visit www.oracle.com if you need additional information or have any
3434 # questions.
3435 #
3436 
3437 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3438 # If so, then append $1 to $2 \
3439 # Also set JVM_ARG_OK to true/false depending on outcome.
3440 
3441 
3442 # Appends a string to a path variable, only adding the : when needed.
3443 
3444 
3445 # Prepends a string to a path variable, only adding the : when needed.
3446 
3447 
3448 # This will make sure the given variable points to a full and proper
3449 # path. This means:
3450 # 1) There will be no spaces in the path. On unix platforms,
3451 #    spaces in the path will result in an error. On Windows,
3452 #    the path will be rewritten using short-style to be space-free.
3453 # 2) The path will be absolute, and it will be in unix-style (on
3454 #     cygwin).
3455 # $1: The name of the variable to fix
3456 
3457 
3458 # This will make sure the given variable points to a executable
3459 # with a full and proper path. This means:
3460 # 1) There will be no spaces in the path. On unix platforms,
3461 #    spaces in the path will result in an error. On Windows,
3462 #    the path will be rewritten using short-style to be space-free.
3463 # 2) The path will be absolute, and it will be in unix-style (on
3464 #     cygwin).
3465 # Any arguments given to the executable is preserved.
3466 # If the input variable does not have a directory specification, then
3467 # it need to be in the PATH.
3468 # $1: The name of the variable to fix
3469 
3470 
3471 
3472 
3473 # Register a --with argument but mark it as deprecated
3474 # $1: The name of the with argument to deprecate, not including --with-
3475 
3476 
3477 # Register a --enable argument but mark it as deprecated
3478 # $1: The name of the with argument to deprecate, not including --enable-
3479 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3480 
3481 
3482 
3483 
3484 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3485 # $1: variable to check
3486 
3487 
3488 # Check that there are no unprocessed overridden variables left.
3489 # If so, they are an incorrect argument and we will exit with an error.
3490 
3491 
3492 # Setup a tool for the given variable. If correctly specified by the user,
3493 # use that value, otherwise search for the tool using the supplied code snippet.
3494 # $1: variable to set
3495 # $2: code snippet to call to look for the tool
3496 # $3: code snippet to call if variable was used to find tool
3497 
3498 
3499 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3500 # $1: variable to set
3501 # $2: executable name (or list of names) to look for
3502 
3503 
3504 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3505 # $1: variable to set
3506 # $2: executable name (or list of names) to look for
3507 
3508 
3509 # Like BASIC_PATH_PROGS but fails if no tool was found.
3510 # $1: variable to set
3511 # $2: executable name (or list of names) to look for
3512 
3513 
3514 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3515 # $1: variable to set
3516 # $2: autoconf macro to call to look for the special tool
3517 
3518 
3519 # Setup the most fundamental tools that relies on not much else to set up,
3520 # but is used by much of the early bootstrap code.
3521 
3522 
3523 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3524 
3525 
3526 # Evaluates platform specific overrides for devkit variables.
3527 # $1: Name of variable
3528 
3529 
3530 
3531 
3532 
3533 
3534 #%%% Simple tools %%%
3535 
3536 # Check if we have found a usable version of make
3537 # $1: the path to a potential make binary (or empty)
3538 # $2: the description on how we found this
3539 
3540 
3541 
3542 
3543 # Goes looking for a usable version of GNU make.
3544 
3545 
3546 
3547 
3548 
3549 
3550 # Check if build directory is on local disk. If not possible to determine,
3551 # we prefer to claim it's local.
3552 # Argument 1: directory to test
3553 # Argument 2: what to do if it is on local disk
3554 # Argument 3: what to do otherwise (remote disk or failure)
3555 
3556 
3557 # Check that source files have basic read permissions set. This might
3558 # not be the case in cygwin in certain conditions.
3559 
3560 
3561 
3562 
3563 # Check for support for specific options in bash
3564 
3565 
3566 # Code to run after AC_OUTPUT
3567 
3568 
3569 #
3570 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3571 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3572 #
3573 # This code is free software; you can redistribute it and/or modify it
3574 # under the terms of the GNU General Public License version 2 only, as
3575 # published by the Free Software Foundation.  Oracle designates this
3576 # particular file as subject to the "Classpath" exception as provided
3577 # by Oracle in the LICENSE file that accompanied this code.
3578 #
3579 # This code is distributed in the hope that it will be useful, but WITHOUT
3580 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3581 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3582 # version 2 for more details (a copy is included in the LICENSE file that
3583 # accompanied this code).
3584 #
3585 # You should have received a copy of the GNU General Public License version
3586 # 2 along with this work; if not, write to the Free Software Foundation,
3587 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3588 #
3589 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3590 # or visit www.oracle.com if you need additional information or have any
3591 # questions.
3592 #
3593 
3594 
3595 
3596 
3597 
3598 # Helper function which possibly converts a path using DOS-style short mode.
3599 # If so, the updated path is stored in $new_path.
3600 # $1: The path to check
3601 
3602 
3603 # Helper function which possibly converts a path using DOS-style short mode.
3604 # If so, the updated path is stored in $new_path.
3605 # $1: The path to check
3606 
3607 
3608 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3609 # and could probably be heavily simplified. However, all changes in this
3610 # area tend to need lot of testing in different scenarios, and in lack of
3611 # proper unit testing, cleaning this up has not been deemed worth the effort
3612 # at the moment.
3613 
3614 
3615 
3616 
3617 
3618 
3619 
3620 
3621 
3622 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3623 
3624 
3625 
3626 
3627 # ... then the rest
3628 #
3629 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3630 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3631 #
3632 # This code is free software; you can redistribute it and/or modify it
3633 # under the terms of the GNU General Public License version 2 only, as
3634 # published by the Free Software Foundation.  Oracle designates this
3635 # particular file as subject to the "Classpath" exception as provided
3636 # by Oracle in the LICENSE file that accompanied this code.
3637 #
3638 # This code is distributed in the hope that it will be useful, but WITHOUT
3639 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3640 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3641 # version 2 for more details (a copy is included in the LICENSE file that
3642 # accompanied this code).
3643 #
3644 # You should have received a copy of the GNU General Public License version
3645 # 2 along with this work; if not, write to the Free Software Foundation,
3646 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3647 #
3648 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3649 # or visit www.oracle.com if you need additional information or have any
3650 # questions.
3651 #
3652 
3653 ########################################################################
3654 # This file handles detection of the Boot JDK. The Boot JDK detection
3655 # process has been developed as a response to solve a complex real-world
3656 # problem. Initially, it was simple, but it has grown as platform after
3657 # platform, idiosyncracy after idiosyncracy has been supported.
3658 #
3659 # The basic idea is this:
3660 # 1) You need an acceptable *) JDK to use as a Boot JDK
3661 # 2) There are several ways to locate a JDK, that are mostly platform
3662 #    dependent **)
3663 # 3) You can have multiple JDKs installed
3664 # 4) If possible, configure should try to dig out an acceptable JDK
3665 #    automatically, without having to resort to command-line options
3666 #
3667 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3668 #     javac) and not a JRE, etc.
3669 #
3670 # **) On Windows we typically use a well-known path.
3671 #     On MacOSX we typically use the tool java_home.
3672 #     On Linux we typically find javac in the $PATH, and then follow a
3673 #     chain of symlinks that often ends up in a real JDK.
3674 #
3675 # This leads to the code where we check in different ways to locate a
3676 # JDK, and if one is found, check if it is acceptable. If not, we print
3677 # our reasons for rejecting it (useful when debugging non-working
3678 # configure situations) and continue checking the next one.
3679 ########################################################################
3680 
3681 # Execute the check given as argument, and verify the result
3682 # If the Boot JDK was previously found, do nothing
3683 # $1 A command line (typically autoconf macro) to execute
3684 
3685 
3686 # Test: Is bootjdk explicitely set by command line arguments?
3687 
3688 
3689 # Test: Is $JAVA_HOME set?
3690 
3691 
3692 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3693 
3694 
3695 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3696 # $1: Argument to the java_home binary (optional)
3697 
3698 
3699 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3700 
3701 
3702 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3703 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3704 # $1 = Path to directory containing jdk installations.
3705 # $2 = String to append to the found JDK directory to get the proper JDK home
3706 
3707 
3708 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3709 # environmental variable as base for where to look.
3710 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3711 
3712 
3713 # Test: Is there a JDK installed in default, well-known locations?
3714 
3715 
3716 # Check that a command-line tool in the Boot JDK is correct
3717 # $1 = name of variable to assign
3718 # $2 = name of binary
3719 
3720 
3721 ###############################################################################
3722 #
3723 # We need a Boot JDK to bootstrap the build.
3724 #
3725 
3726 
3727 
3728 
3729 
3730 #
3731 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3732 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3733 #
3734 # This code is free software; you can redistribute it and/or modify it
3735 # under the terms of the GNU General Public License version 2 only, as
3736 # published by the Free Software Foundation.  Oracle designates this
3737 # particular file as subject to the "Classpath" exception as provided
3738 # by Oracle in the LICENSE file that accompanied this code.
3739 #
3740 # This code is distributed in the hope that it will be useful, but WITHOUT
3741 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3742 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3743 # version 2 for more details (a copy is included in the LICENSE file that
3744 # accompanied this code).
3745 #
3746 # You should have received a copy of the GNU General Public License version
3747 # 2 along with this work; if not, write to the Free Software Foundation,
3748 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3749 #
3750 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3751 # or visit www.oracle.com if you need additional information or have any
3752 # questions.
3753 #
3754 
3755 
3756 
3757 
3758 
3759 
3760 
3761 
3762 
3763 
3764 
3765 
3766 
3767 
3768 
3769 ################################################################################
3770 #
3771 # Optionally enable distributed compilation of native code using icecc/icecream
3772 #
3773 
3774 
3775 
3776 
3777 
3778 
3779 
3780 #
3781 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3782 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3783 #
3784 # This code is free software; you can redistribute it and/or modify it
3785 # under the terms of the GNU General Public License version 2 only, as
3786 # published by the Free Software Foundation.  Oracle designates this
3787 # particular file as subject to the "Classpath" exception as provided
3788 # by Oracle in the LICENSE file that accompanied this code.
3789 #
3790 # This code is distributed in the hope that it will be useful, but WITHOUT
3791 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3792 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3793 # version 2 for more details (a copy is included in the LICENSE file that
3794 # accompanied this code).
3795 #
3796 # You should have received a copy of the GNU General Public License version
3797 # 2 along with this work; if not, write to the Free Software Foundation,
3798 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3799 #
3800 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3801 # or visit www.oracle.com if you need additional information or have any
3802 # questions.
3803 #
3804 
3805 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3806 # corresponding configure arguments instead
3807 
3808 
3809 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3810 # that configure can use them while detecting compilers.
3811 # TOOLCHAIN_TYPE is available here.
3812 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
3813 
3814 
3815 
3816 
3817 
3818 
3819 # Documentation on common flags used for solstudio in HIGHEST.
3820 #
3821 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3822 #          done with care, there are some assumptions below that need to
3823 #          be understood about the use of pointers, and IEEE behavior.
3824 #
3825 # -fns: Use non-standard floating point mode (not IEEE 754)
3826 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3827 # -fsingle: Use single precision floating point with 'float'
3828 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3829 #   (Source with excessing pointer casting and data access with mixed
3830 #    pointer types are not recommended)
3831 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3832 #   (If you expect perfect errno behavior, do not use this)
3833 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3834 # -xrestrict: Pointer parameters to functions do not overlap
3835 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3836 #    If you pass in multiple pointers to the same data, do not use this)
3837 # -xlibmil: Inline some library routines
3838 #   (If you expect perfect errno behavior, do not use this)
3839 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3840 #   (If you expect perfect errno behavior, do not use this)
3841 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3842 
3843     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3844     # Bug?
3845     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3846     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3847     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3848     #fi
3849 
3850 
3851 
3852 
3853 
3854 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3855 #                                   [RUN-IF-FALSE])
3856 # ------------------------------------------------------------
3857 # Check that the c and c++ compilers support an argument
3858 
3859 
3860 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3861 #                                    [RUN-IF-FALSE])
3862 # ------------------------------------------------------------
3863 # Check that the linker support an argument
3864 
3865 
3866 
3867 
3868 #
3869 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3870 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3871 #
3872 # This code is free software; you can redistribute it and/or modify it
3873 # under the terms of the GNU General Public License version 2 only, as
3874 # published by the Free Software Foundation.  Oracle designates this
3875 # particular file as subject to the "Classpath" exception as provided
3876 # by Oracle in the LICENSE file that accompanied this code.
3877 #
3878 # This code is distributed in the hope that it will be useful, but WITHOUT
3879 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3880 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3881 # version 2 for more details (a copy is included in the LICENSE file that
3882 # accompanied this code).
3883 #
3884 # You should have received a copy of the GNU General Public License version
3885 # 2 along with this work; if not, write to the Free Software Foundation,
3886 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3887 #
3888 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3889 # or visit www.oracle.com if you need additional information or have any
3890 # questions.
3891 #
3892 
3893 
3894 
3895 
3896 
3897 cygwin_help() {
3898   case $1 in
3899     unzip)
3900       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3901       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3902       ;;
3903     zip)
3904       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3905       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3906       ;;
3907     make)
3908       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3909       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3910       ;;
3911     freetype)
3912       HELP_MSG="
3913 The freetype library can now be build during the configure process.
3914 Download the freetype sources and unpack them into an arbitrary directory:
3915 
3916 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3917 tar -xzf freetype-2.5.3.tar.gz
3918 
3919 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3920 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3921 builds or into '<freetype_src>/lib32' for 32-bit builds.
3922 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3923 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3924       ;;
3925   esac
3926 }
3927 
3928 msys_help() {
3929   PKGHANDLER_COMMAND=""
3930 }
3931 
3932 apt_help() {
3933   case $1 in
3934     reduced)
3935       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3936     devkit)
3937       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3938     openjdk)
3939       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3940     alsa)
3941       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3942     cups)
3943       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3944     freetype)
3945       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3946     ffi)
3947       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3948     x11)
3949       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3950     ccache)
3951       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3952   esac
3953 }
3954 
3955 yum_help() {
3956   case $1 in
3957     devkit)
3958       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3959     openjdk)
3960       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3961     alsa)
3962       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3963     cups)
3964       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3965     freetype)
3966       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3967     x11)
3968       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3969     ccache)
3970       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3971   esac
3972 }
3973 
3974 port_help() {
3975   PKGHANDLER_COMMAND=""
3976 }
3977 
3978 pkgutil_help() {
3979   PKGHANDLER_COMMAND=""
3980 }
3981 
3982 pkgadd_help() {
3983   PKGHANDLER_COMMAND=""
3984 }
3985 
3986 # This function will check if we're called from the "configure" wrapper while
3987 # printing --help. If so, we will print out additional information that can
3988 # only be extracted within the autoconf script, and then exit. This must be
3989 # called at the very beginning in configure.ac.
3990 
3991 
3992 
3993 
3994 
3995 
3996 #
3997 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3998 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3999 #
4000 # This code is free software; you can redistribute it and/or modify it
4001 # under the terms of the GNU General Public License version 2 only, as
4002 # published by the Free Software Foundation.  Oracle designates this
4003 # particular file as subject to the "Classpath" exception as provided
4004 # by Oracle in the LICENSE file that accompanied this code.
4005 #
4006 # This code is distributed in the hope that it will be useful, but WITHOUT
4007 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4008 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4009 # version 2 for more details (a copy is included in the LICENSE file that
4010 # accompanied this code).
4011 #
4012 # You should have received a copy of the GNU General Public License version
4013 # 2 along with this work; if not, write to the Free Software Foundation,
4014 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4015 #
4016 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4017 # or visit www.oracle.com if you need additional information or have any
4018 # questions.
4019 #
4020 
4021 
4022 
4023 
4024 
4025 
4026 
4027 
4028 
4029 
4030 ###############################################################################
4031 #
4032 # Should we build only OpenJDK even if closed sources are present?
4033 #
4034 
4035 
4036 
4037 
4038 
4039 
4040 ###############################################################################
4041 #
4042 # Enable or disable the elliptic curve crypto implementation
4043 #
4044 
4045 
4046 
4047 
4048 
4049 ################################################################################
4050 #
4051 # Gcov coverage data for hotspot
4052 #
4053 
4054 
4055 #
4056 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4057 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4058 #
4059 # This code is free software; you can redistribute it and/or modify it
4060 # under the terms of the GNU General Public License version 2 only, as
4061 # published by the Free Software Foundation.  Oracle designates this
4062 # particular file as subject to the "Classpath" exception as provided
4063 # by Oracle in the LICENSE file that accompanied this code.
4064 #
4065 # This code is distributed in the hope that it will be useful, but WITHOUT
4066 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4067 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4068 # version 2 for more details (a copy is included in the LICENSE file that
4069 # accompanied this code).
4070 #
4071 # You should have received a copy of the GNU General Public License version
4072 # 2 along with this work; if not, write to the Free Software Foundation,
4073 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4074 #
4075 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4076 # or visit www.oracle.com if you need additional information or have any
4077 # questions.
4078 #
4079 
4080 ###############################################################################
4081 #
4082 # Setup version numbers
4083 #
4084 
4085 # Verify that a given string represents a valid version number, and assign it
4086 # to a variable.
4087 
4088 # Argument 1: the variable to assign to
4089 # Argument 2: the value given by the user
4090 
4091 
4092 
4093 
4094 ################################################################################
4095 #
4096 # Static build support.  When enabled will generate static
4097 # libraries instead of shared libraries for all JDK libs.
4098 #
4099 
4100 
4101 
4102 
4103 #
4104 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4105 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4106 #
4107 # This code is free software; you can redistribute it and/or modify it
4108 # under the terms of the GNU General Public License version 2 only, as
4109 # published by the Free Software Foundation.  Oracle designates this
4110 # particular file as subject to the "Classpath" exception as provided
4111 # by Oracle in the LICENSE file that accompanied this code.
4112 #
4113 # This code is distributed in the hope that it will be useful, but WITHOUT
4114 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4115 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4116 # version 2 for more details (a copy is included in the LICENSE file that
4117 # accompanied this code).
4118 #
4119 # You should have received a copy of the GNU General Public License version
4120 # 2 along with this work; if not, write to the Free Software Foundation,
4121 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4122 #
4123 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4124 # or visit www.oracle.com if you need additional information or have any
4125 # questions.
4126 #
4127 
4128 # Major library component reside in separate files.
4129 #
4130 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4131 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4132 #
4133 # This code is free software; you can redistribute it and/or modify it
4134 # under the terms of the GNU General Public License version 2 only, as
4135 # published by the Free Software Foundation.  Oracle designates this
4136 # particular file as subject to the "Classpath" exception as provided
4137 # by Oracle in the LICENSE file that accompanied this code.
4138 #
4139 # This code is distributed in the hope that it will be useful, but WITHOUT
4140 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4141 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4142 # version 2 for more details (a copy is included in the LICENSE file that
4143 # accompanied this code).
4144 #
4145 # You should have received a copy of the GNU General Public License version
4146 # 2 along with this work; if not, write to the Free Software Foundation,
4147 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4148 #
4149 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4150 # or visit www.oracle.com if you need additional information or have any
4151 # questions.
4152 #
4153 
4154 ################################################################################
4155 # Setup alsa (Advanced Linux Sound Architecture)
4156 ################################################################################
4157 
4158 
4159 #
4160 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4161 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4162 #
4163 # This code is free software; you can redistribute it and/or modify it
4164 # under the terms of the GNU General Public License version 2 only, as
4165 # published by the Free Software Foundation.  Oracle designates this
4166 # particular file as subject to the "Classpath" exception as provided
4167 # by Oracle in the LICENSE file that accompanied this code.
4168 #
4169 # This code is distributed in the hope that it will be useful, but WITHOUT
4170 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4171 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4172 # version 2 for more details (a copy is included in the LICENSE file that
4173 # accompanied this code).
4174 #
4175 # You should have received a copy of the GNU General Public License version
4176 # 2 along with this work; if not, write to the Free Software Foundation,
4177 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4178 #
4179 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4180 # or visit www.oracle.com if you need additional information or have any
4181 # questions.
4182 #
4183 
4184 ################################################################################
4185 # Setup bundled libraries.
4186 #
4187 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4188 # OpenJDK repository. Default is to use these libraries as bundled, but they
4189 # might be replaced by en external version by the user.
4190 ################################################################################
4191 
4192 
4193 ################################################################################
4194 # Setup libjpeg
4195 ################################################################################
4196 
4197 
4198 ################################################################################
4199 # Setup giflib
4200 ################################################################################
4201 
4202 
4203 ################################################################################
4204 # Setup libpng
4205 ################################################################################
4206 
4207 
4208 ################################################################################
4209 # Setup zlib
4210 ################################################################################
4211 
4212 
4213 ################################################################################
4214 # Setup lcms (Little CMS)
4215 ################################################################################
4216 
4217 
4218 #
4219 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4220 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4221 #
4222 # This code is free software; you can redistribute it and/or modify it
4223 # under the terms of the GNU General Public License version 2 only, as
4224 # published by the Free Software Foundation.  Oracle designates this
4225 # particular file as subject to the "Classpath" exception as provided
4226 # by Oracle in the LICENSE file that accompanied this code.
4227 #
4228 # This code is distributed in the hope that it will be useful, but WITHOUT
4229 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4230 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4231 # version 2 for more details (a copy is included in the LICENSE file that
4232 # accompanied this code).
4233 #
4234 # You should have received a copy of the GNU General Public License version
4235 # 2 along with this work; if not, write to the Free Software Foundation,
4236 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4237 #
4238 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4239 # or visit www.oracle.com if you need additional information or have any
4240 # questions.
4241 #
4242 
4243 ################################################################################
4244 # Setup cups (Common Unix Printing System)
4245 ################################################################################
4246 
4247 
4248 #
4249 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4250 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4251 #
4252 # This code is free software; you can redistribute it and/or modify it
4253 # under the terms of the GNU General Public License version 2 only, as
4254 # published by the Free Software Foundation.  Oracle designates this
4255 # particular file as subject to the "Classpath" exception as provided
4256 # by Oracle in the LICENSE file that accompanied this code.
4257 #
4258 # This code is distributed in the hope that it will be useful, but WITHOUT
4259 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4260 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4261 # version 2 for more details (a copy is included in the LICENSE file that
4262 # accompanied this code).
4263 #
4264 # You should have received a copy of the GNU General Public License version
4265 # 2 along with this work; if not, write to the Free Software Foundation,
4266 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4267 #
4268 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4269 # or visit www.oracle.com if you need additional information or have any
4270 # questions.
4271 #
4272 
4273 ################################################################################
4274 # Setup libffi (Foreign Function Interface)
4275 ################################################################################
4276 
4277 
4278 #
4279 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4280 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4281 #
4282 # This code is free software; you can redistribute it and/or modify it
4283 # under the terms of the GNU General Public License version 2 only, as
4284 # published by the Free Software Foundation.  Oracle designates this
4285 # particular file as subject to the "Classpath" exception as provided
4286 # by Oracle in the LICENSE file that accompanied this code.
4287 #
4288 # This code is distributed in the hope that it will be useful, but WITHOUT
4289 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4290 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4291 # version 2 for more details (a copy is included in the LICENSE file that
4292 # accompanied this code).
4293 #
4294 # You should have received a copy of the GNU General Public License version
4295 # 2 along with this work; if not, write to the Free Software Foundation,
4296 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4297 #
4298 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4299 # or visit www.oracle.com if you need additional information or have any
4300 # questions.
4301 #
4302 
4303 ################################################################################
4304 # Build the freetype lib from source
4305 ################################################################################
4306 
4307 
4308 ################################################################################
4309 # Check if a potential freeype library match is correct and usable
4310 ################################################################################
4311 
4312 
4313 ################################################################################
4314 # Setup freetype (The FreeType2 font rendering library)
4315 ################################################################################
4316 
4317 
4318 #
4319 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4320 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4321 #
4322 # This code is free software; you can redistribute it and/or modify it
4323 # under the terms of the GNU General Public License version 2 only, as
4324 # published by the Free Software Foundation.  Oracle designates this
4325 # particular file as subject to the "Classpath" exception as provided
4326 # by Oracle in the LICENSE file that accompanied this code.
4327 #
4328 # This code is distributed in the hope that it will be useful, but WITHOUT
4329 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4330 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4331 # version 2 for more details (a copy is included in the LICENSE file that
4332 # accompanied this code).
4333 #
4334 # You should have received a copy of the GNU General Public License version
4335 # 2 along with this work; if not, write to the Free Software Foundation,
4336 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4337 #
4338 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4339 # or visit www.oracle.com if you need additional information or have any
4340 # questions.
4341 #
4342 
4343 ################################################################################
4344 # Setup the standard C/C++ runtime libraries.
4345 #
4346 # Most importantly, determine if stdc++ should be linked statically or
4347 # dynamically.
4348 ################################################################################
4349 
4350 
4351 #
4352 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4353 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4354 #
4355 # This code is free software; you can redistribute it and/or modify it
4356 # under the terms of the GNU General Public License version 2 only, as
4357 # published by the Free Software Foundation.  Oracle designates this
4358 # particular file as subject to the "Classpath" exception as provided
4359 # by Oracle in the LICENSE file that accompanied this code.
4360 #
4361 # This code is distributed in the hope that it will be useful, but WITHOUT
4362 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4363 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4364 # version 2 for more details (a copy is included in the LICENSE file that
4365 # accompanied this code).
4366 #
4367 # You should have received a copy of the GNU General Public License version
4368 # 2 along with this work; if not, write to the Free Software Foundation,
4369 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4370 #
4371 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4372 # or visit www.oracle.com if you need additional information or have any
4373 # questions.
4374 #
4375 
4376 ################################################################################
4377 # Setup X11 Windows system
4378 ################################################################################
4379 
4380 
4381 
4382 ################################################################################
4383 # Determine which libraries are needed for this configuration
4384 ################################################################################
4385 
4386 
4387 ################################################################################
4388 # Parse library options, and setup needed libraries
4389 ################################################################################
4390 
4391 
4392 ################################################################################
4393 # Setup llvm (Low-Level VM)
4394 ################################################################################
4395 
4396 
4397 ################################################################################
4398 # Setup various libraries, typically small system libraries
4399 ################################################################################
4400 
4401 
4402 #
4403 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4404 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4405 #
4406 # This code is free software; you can redistribute it and/or modify it
4407 # under the terms of the GNU General Public License version 2 only, as
4408 # published by the Free Software Foundation.  Oracle designates this
4409 # particular file as subject to the "Classpath" exception as provided
4410 # by Oracle in the LICENSE file that accompanied this code.
4411 #
4412 # This code is distributed in the hope that it will be useful, but WITHOUT
4413 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4414 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4415 # version 2 for more details (a copy is included in the LICENSE file that
4416 # accompanied this code).
4417 #
4418 # You should have received a copy of the GNU General Public License version
4419 # 2 along with this work; if not, write to the Free Software Foundation,
4420 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4421 #
4422 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4423 # or visit www.oracle.com if you need additional information or have any
4424 # questions.
4425 #
4426 
4427 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4428 # Converts autoconf style CPU name to OpenJDK style, into
4429 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4430 
4431 
4432 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4433 # Converts autoconf style OS name to OpenJDK style, into
4434 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4435 
4436 
4437 # Expects $host_os $host_cpu $build_os and $build_cpu
4438 # and $with_target_bits to have been setup!
4439 #
4440 # Translate the standard triplet(quadruplet) definition
4441 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4442 # OPENJDK_BUILD_OS, etc.
4443 
4444 
4445 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4446 # accordingly. Must be done after setting up build and target system, but before
4447 # doing anything else with these values.
4448 
4449 
4450 # Setup the legacy variables, for controlling the old makefiles.
4451 #
4452 
4453 
4454 
4455 
4456 #%%% Build and target systems %%%
4457 
4458 
4459 
4460 
4461 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4462 # Add -mX to various FLAGS variables.
4463 
4464 
4465 
4466 
4467 
4468 
4469 #
4470 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4471 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4472 #
4473 # This code is free software; you can redistribute it and/or modify it
4474 # under the terms of the GNU General Public License version 2 only, as
4475 # published by the Free Software Foundation.  Oracle designates this
4476 # particular file as subject to the "Classpath" exception as provided
4477 # by Oracle in the LICENSE file that accompanied this code.
4478 #
4479 # This code is distributed in the hope that it will be useful, but WITHOUT
4480 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4481 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4482 # version 2 for more details (a copy is included in the LICENSE file that
4483 # accompanied this code).
4484 #
4485 # You should have received a copy of the GNU General Public License version
4486 # 2 along with this work; if not, write to the Free Software Foundation,
4487 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4488 #
4489 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4490 # or visit www.oracle.com if you need additional information or have any
4491 # questions.
4492 #
4493 
4494 
4495 
4496 
4497 
4498 
4499 
4500 #
4501 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4502 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4503 #
4504 # This code is free software; you can redistribute it and/or modify it
4505 # under the terms of the GNU General Public License version 2 only, as
4506 # published by the Free Software Foundation.  Oracle designates this
4507 # particular file as subject to the "Classpath" exception as provided
4508 # by Oracle in the LICENSE file that accompanied this code.
4509 #
4510 # This code is distributed in the hope that it will be useful, but WITHOUT
4511 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4512 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4513 # version 2 for more details (a copy is included in the LICENSE file that
4514 # accompanied this code).
4515 #
4516 # You should have received a copy of the GNU General Public License version
4517 # 2 along with this work; if not, write to the Free Software Foundation,
4518 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4519 #
4520 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4521 # or visit www.oracle.com if you need additional information or have any
4522 # questions.
4523 #
4524 
4525 ########################################################################
4526 # This file is responsible for detecting, verifying and setting up the
4527 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4528 # proper paths to the binaries, but it will not setup any flags.
4529 #
4530 # The binaries used is determined by the toolchain type, which is the family of
4531 # compilers and related tools that are used.
4532 ########################################################################
4533 
4534 
4535 # All valid toolchains, regardless of platform (used by help.m4)
4536 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4537 
4538 # These toolchains are valid on different platforms
4539 VALID_TOOLCHAINS_linux="gcc clang"
4540 VALID_TOOLCHAINS_solaris="solstudio"
4541 VALID_TOOLCHAINS_macosx="gcc clang"
4542 VALID_TOOLCHAINS_aix="xlc"
4543 VALID_TOOLCHAINS_windows="microsoft"
4544 
4545 # Toolchain descriptions
4546 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4547 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4548 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4549 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4550 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4551 
4552 # Setup a number of variables describing how native output files are
4553 # named on this platform/toolchain.
4554 
4555 
4556 # Determine which toolchain type to use, and make sure it is valid for this
4557 # platform. Setup various information about the selected toolchain.
4558 
4559 
4560 # Before we start detecting the toolchain executables, we might need some
4561 # special setup, e.g. additional paths etc.
4562 
4563 
4564 # Restore path, etc
4565 
4566 
4567 # Check if a compiler is of the toolchain type we expect, and save the version
4568 # information from it. If the compiler does not match the expected type,
4569 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4570 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4571 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4572 #
4573 # $1 = compiler to test (CC or CXX)
4574 # $2 = human readable name of compiler (C or C++)
4575 
4576 
4577 # Try to locate the given C or C++ compiler in the path, or otherwise.
4578 #
4579 # $1 = compiler to test (CC or CXX)
4580 # $2 = human readable name of compiler (C or C++)
4581 # $3 = list of compiler names to search for
4582 
4583 
4584 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4585 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4586 # archiver (AR). Verify that the compilers are correct according to the
4587 # toolchain type.
4588 
4589 
4590 # Setup additional tools that is considered a part of the toolchain, but not the
4591 # core part. Many of these are highly platform-specific and do not exist,
4592 # and/or are not needed on all platforms.
4593 
4594 
4595 # Setup the build tools (i.e, the compiler and linker used to build programs
4596 # that should be run on the build platform, not the target platform, as a build
4597 # helper). Since the non-cross-compile case uses the normal, target compilers
4598 # for this, we can only do this after these have been setup.
4599 
4600 
4601 # Setup legacy variables that are still needed as alternative ways to refer to
4602 # parts of the toolchain.
4603 
4604 
4605 # Do some additional checks on the detected tools.
4606 
4607 
4608 # Setup the JTReg Regression Test Harness.
4609 
4610 
4611 #
4612 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4613 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4614 #
4615 # This code is free software; you can redistribute it and/or modify it
4616 # under the terms of the GNU General Public License version 2 only, as
4617 # published by the Free Software Foundation.  Oracle designates this
4618 # particular file as subject to the "Classpath" exception as provided
4619 # by Oracle in the LICENSE file that accompanied this code.
4620 #
4621 # This code is distributed in the hope that it will be useful, but WITHOUT
4622 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4623 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4624 # version 2 for more details (a copy is included in the LICENSE file that
4625 # accompanied this code).
4626 #
4627 # You should have received a copy of the GNU General Public License version
4628 # 2 along with this work; if not, write to the Free Software Foundation,
4629 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4630 #
4631 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4632 # or visit www.oracle.com if you need additional information or have any
4633 # questions.
4634 #
4635 
4636 ################################################################################
4637 # The order of these defines the priority by which we try to find them.
4638 VALID_VS_VERSIONS="2013 2012 2010"
4639 
4640 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4641 VS_VERSION_INTERNAL_2010=100
4642 VS_MSVCR_2010=msvcr100.dll
4643 # We don't use msvcp on Visual Studio 2010
4644 #VS_MSVCP_2010=msvcp100.dll
4645 VS_ENVVAR_2010="VS100COMNTOOLS"
4646 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4647 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4648 VS_VS_PLATFORM_NAME_2010="v100"
4649 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4650 
4651 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4652 VS_VERSION_INTERNAL_2012=110
4653 VS_MSVCR_2012=msvcr110.dll
4654 VS_MSVCP_2012=msvcp110.dll
4655 VS_ENVVAR_2012="VS110COMNTOOLS"
4656 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4657 VS_SDK_INSTALLDIR_2012=
4658 VS_VS_PLATFORM_NAME_2012="v110"
4659 VS_SDK_PLATFORM_NAME_2012=
4660 
4661 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4662 VS_VERSION_INTERNAL_2013=120
4663 VS_MSVCR_2013=msvcr120.dll
4664 VS_MSVCP_2013=msvcp120.dll
4665 VS_ENVVAR_2013="VS120COMNTOOLS"
4666 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4667 VS_SDK_INSTALLDIR_2013=
4668 VS_VS_PLATFORM_NAME_2013="v120"
4669 VS_SDK_PLATFORM_NAME_2013=
4670 
4671 ################################################################################
4672 
4673 
4674 
4675 ################################################################################
4676 
4677 
4678 
4679 ################################################################################
4680 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4681 # build environment and assigns it to VS_ENV_CMD
4682 
4683 
4684 ################################################################################
4685 
4686 
4687 
4688 ################################################################################
4689 # Check if the VS env variables were setup prior to running configure.
4690 # If not, then find vcvarsall.bat and run it automatically, and integrate
4691 # the set env variables into the spec file.
4692 
4693 
4694 
4695 
4696 
4697 
4698 
4699 
4700 
4701 
4702 
4703 
4704 
4705 
4706 # This line needs to be here, verbatim, after all includes and the dummy hook
4707 # definitions. It is replaced with custom functionality when building
4708 # custom sources.
4709 #CUSTOM_AUTOCONF_INCLUDE
4710 
4711 # Do not change or remove the following line, it is needed for consistency checks:
4712 DATE_WHEN_GENERATED=1449049746
4713 
4714 ###############################################################################
4715 #
4716 # Initialization / Boot-strapping
4717 #
4718 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4719 # thus it jumps back and forth, each time gaining something needed later on.
4720 #
4721 ###############################################################################
4722 
4723 # If we are requested to print additional help, do that and then exit.
4724 # This must be the very first call.
4725 
4726   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4727     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4728     $PRINTF "Which are valid to use depends on the build platform.\n"
4729     for toolchain in $VALID_TOOLCHAINS_all; do
4730       # Use indirect variable referencing
4731       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4732       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4733       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4734     done
4735 
4736     # And now exit directly
4737     exit 0
4738   fi
4739 
4740 
4741 # Basic initialization that must happen first of all in the normal process.
4742 
4743   # Save the original command line. This is passed to us by the wrapper configure script.
4744 
4745   # Save the path variable before it gets changed
4746   ORIGINAL_PATH="$PATH"
4747 
4748   DATE_WHEN_CONFIGURED=`LANG=C date`
4749 
4750   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4751 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4752   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4753 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4754 
4755 
4756   # Start with tools that do not need have cross compilation support
4757   # and can be expected to be found in the default PATH. These tools are
4758   # used by configure.
4759 
4760   # First are all the simple required tools.
4761 
4762 
4763 
4764   # Publish this variable in the help.
4765 
4766 
4767   if [ -z "${BASENAME+x}" ]; then
4768     # The variable is not set by user, try to locate tool using the code snippet
4769     for ac_prog in basename
4770 do
4771   # Extract the first word of "$ac_prog", so it can be a program name with args.
4772 set dummy $ac_prog; ac_word=$2
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774 $as_echo_n "checking for $ac_word... " >&6; }
4775 if ${ac_cv_path_BASENAME+:} false; then :
4776   $as_echo_n "(cached) " >&6
4777 else
4778   case $BASENAME in
4779   [\\/]* | ?:[\\/]*)
4780   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4781   ;;
4782   *)
4783   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784 for as_dir in $PATH
4785 do
4786   IFS=$as_save_IFS
4787   test -z "$as_dir" && as_dir=.
4788     for ac_exec_ext in '' $ac_executable_extensions; do
4789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4790     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4792     break 2
4793   fi
4794 done
4795   done
4796 IFS=$as_save_IFS
4797 
4798   ;;
4799 esac
4800 fi
4801 BASENAME=$ac_cv_path_BASENAME
4802 if test -n "$BASENAME"; then
4803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4804 $as_echo "$BASENAME" >&6; }
4805 else
4806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807 $as_echo "no" >&6; }
4808 fi
4809 
4810 
4811   test -n "$BASENAME" && break
4812 done
4813 
4814   else
4815     # The variable is set, but is it from the command line or the environment?
4816 
4817     # Try to remove the string !BASENAME! from our list.
4818     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4819     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4820       # If it failed, the variable was not from the command line. Ignore it,
4821       # but warn the user (except for BASH, which is always set by the calling BASH).
4822       if test "xBASENAME" != xBASH; then
4823         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4824 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4825       fi
4826       # Try to locate tool using the code snippet
4827       for ac_prog in basename
4828 do
4829   # Extract the first word of "$ac_prog", so it can be a program name with args.
4830 set dummy $ac_prog; ac_word=$2
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4832 $as_echo_n "checking for $ac_word... " >&6; }
4833 if ${ac_cv_path_BASENAME+:} false; then :
4834   $as_echo_n "(cached) " >&6
4835 else
4836   case $BASENAME in
4837   [\\/]* | ?:[\\/]*)
4838   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4839   ;;
4840   *)
4841   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4842 for as_dir in $PATH
4843 do
4844   IFS=$as_save_IFS
4845   test -z "$as_dir" && as_dir=.
4846     for ac_exec_ext in '' $ac_executable_extensions; do
4847   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4848     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4850     break 2
4851   fi
4852 done
4853   done
4854 IFS=$as_save_IFS
4855 
4856   ;;
4857 esac
4858 fi
4859 BASENAME=$ac_cv_path_BASENAME
4860 if test -n "$BASENAME"; then
4861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4862 $as_echo "$BASENAME" >&6; }
4863 else
4864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4865 $as_echo "no" >&6; }
4866 fi
4867 
4868 
4869   test -n "$BASENAME" && break
4870 done
4871 
4872     else
4873       # If it succeeded, then it was overridden by the user. We will use it
4874       # for the tool.
4875 
4876       # First remove it from the list of overridden variables, so we can test
4877       # for unknown variables in the end.
4878       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4879 
4880       # Check if we try to supply an empty value
4881       if test "x$BASENAME" = x; then
4882         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4883 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4884         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4885 $as_echo_n "checking for BASENAME... " >&6; }
4886         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4887 $as_echo "disabled" >&6; }
4888       else
4889         # Check if the provided tool contains a complete path.
4890         tool_specified="$BASENAME"
4891         tool_basename="${tool_specified##*/}"
4892         if test "x$tool_basename" = "x$tool_specified"; then
4893           # A command without a complete path is provided, search $PATH.
4894           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4895 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4896           # Extract the first word of "$tool_basename", so it can be a program name with args.
4897 set dummy $tool_basename; ac_word=$2
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899 $as_echo_n "checking for $ac_word... " >&6; }
4900 if ${ac_cv_path_BASENAME+:} false; then :
4901   $as_echo_n "(cached) " >&6
4902 else
4903   case $BASENAME in
4904   [\\/]* | ?:[\\/]*)
4905   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4906   ;;
4907   *)
4908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909 for as_dir in $PATH
4910 do
4911   IFS=$as_save_IFS
4912   test -z "$as_dir" && as_dir=.
4913     for ac_exec_ext in '' $ac_executable_extensions; do
4914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4915     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4917     break 2
4918   fi
4919 done
4920   done
4921 IFS=$as_save_IFS
4922 
4923   ;;
4924 esac
4925 fi
4926 BASENAME=$ac_cv_path_BASENAME
4927 if test -n "$BASENAME"; then
4928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4929 $as_echo "$BASENAME" >&6; }
4930 else
4931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4932 $as_echo "no" >&6; }
4933 fi
4934 
4935 
4936           if test "x$BASENAME" = x; then
4937             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4938           fi
4939         else
4940           # Otherwise we believe it is a complete path. Use it as it is.
4941           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4942 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4943           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4944 $as_echo_n "checking for BASENAME... " >&6; }
4945           if test ! -x "$tool_specified"; then
4946             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4947 $as_echo "not found" >&6; }
4948             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4949           fi
4950           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4951 $as_echo "$tool_specified" >&6; }
4952         fi
4953       fi
4954     fi
4955 
4956   fi
4957 
4958 
4959 
4960   if test "x$BASENAME" = x; then
4961     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4962   fi
4963 
4964 
4965 
4966 
4967 
4968   # Publish this variable in the help.
4969 
4970 
4971   if [ -z "${BASH+x}" ]; then
4972     # The variable is not set by user, try to locate tool using the code snippet
4973     for ac_prog in bash
4974 do
4975   # Extract the first word of "$ac_prog", so it can be a program name with args.
4976 set dummy $ac_prog; ac_word=$2
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4978 $as_echo_n "checking for $ac_word... " >&6; }
4979 if ${ac_cv_path_BASH+:} false; then :
4980   $as_echo_n "(cached) " >&6
4981 else
4982   case $BASH in
4983   [\\/]* | ?:[\\/]*)
4984   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4985   ;;
4986   *)
4987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4988 for as_dir in $PATH
4989 do
4990   IFS=$as_save_IFS
4991   test -z "$as_dir" && as_dir=.
4992     for ac_exec_ext in '' $ac_executable_extensions; do
4993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4994     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4996     break 2
4997   fi
4998 done
4999   done
5000 IFS=$as_save_IFS
5001 
5002   ;;
5003 esac
5004 fi
5005 BASH=$ac_cv_path_BASH
5006 if test -n "$BASH"; then
5007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5008 $as_echo "$BASH" >&6; }
5009 else
5010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5011 $as_echo "no" >&6; }
5012 fi
5013 
5014 
5015   test -n "$BASH" && break
5016 done
5017 
5018   else
5019     # The variable is set, but is it from the command line or the environment?
5020 
5021     # Try to remove the string !BASH! from our list.
5022     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5023     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5024       # If it failed, the variable was not from the command line. Ignore it,
5025       # but warn the user (except for BASH, which is always set by the calling BASH).
5026       if test "xBASH" != xBASH; then
5027         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5028 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5029       fi
5030       # Try to locate tool using the code snippet
5031       for ac_prog in bash
5032 do
5033   # Extract the first word of "$ac_prog", so it can be a program name with args.
5034 set dummy $ac_prog; ac_word=$2
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5036 $as_echo_n "checking for $ac_word... " >&6; }
5037 if ${ac_cv_path_BASH+:} false; then :
5038   $as_echo_n "(cached) " >&6
5039 else
5040   case $BASH in
5041   [\\/]* | ?:[\\/]*)
5042   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5043   ;;
5044   *)
5045   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5046 for as_dir in $PATH
5047 do
5048   IFS=$as_save_IFS
5049   test -z "$as_dir" && as_dir=.
5050     for ac_exec_ext in '' $ac_executable_extensions; do
5051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5052     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5054     break 2
5055   fi
5056 done
5057   done
5058 IFS=$as_save_IFS
5059 
5060   ;;
5061 esac
5062 fi
5063 BASH=$ac_cv_path_BASH
5064 if test -n "$BASH"; then
5065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5066 $as_echo "$BASH" >&6; }
5067 else
5068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5069 $as_echo "no" >&6; }
5070 fi
5071 
5072 
5073   test -n "$BASH" && break
5074 done
5075 
5076     else
5077       # If it succeeded, then it was overridden by the user. We will use it
5078       # for the tool.
5079 
5080       # First remove it from the list of overridden variables, so we can test
5081       # for unknown variables in the end.
5082       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5083 
5084       # Check if we try to supply an empty value
5085       if test "x$BASH" = x; then
5086         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5087 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5088         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5089 $as_echo_n "checking for BASH... " >&6; }
5090         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5091 $as_echo "disabled" >&6; }
5092       else
5093         # Check if the provided tool contains a complete path.
5094         tool_specified="$BASH"
5095         tool_basename="${tool_specified##*/}"
5096         if test "x$tool_basename" = "x$tool_specified"; then
5097           # A command without a complete path is provided, search $PATH.
5098           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5099 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5100           # Extract the first word of "$tool_basename", so it can be a program name with args.
5101 set dummy $tool_basename; ac_word=$2
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103 $as_echo_n "checking for $ac_word... " >&6; }
5104 if ${ac_cv_path_BASH+:} false; then :
5105   $as_echo_n "(cached) " >&6
5106 else
5107   case $BASH in
5108   [\\/]* | ?:[\\/]*)
5109   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5110   ;;
5111   *)
5112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5113 for as_dir in $PATH
5114 do
5115   IFS=$as_save_IFS
5116   test -z "$as_dir" && as_dir=.
5117     for ac_exec_ext in '' $ac_executable_extensions; do
5118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5119     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5121     break 2
5122   fi
5123 done
5124   done
5125 IFS=$as_save_IFS
5126 
5127   ;;
5128 esac
5129 fi
5130 BASH=$ac_cv_path_BASH
5131 if test -n "$BASH"; then
5132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5133 $as_echo "$BASH" >&6; }
5134 else
5135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5136 $as_echo "no" >&6; }
5137 fi
5138 
5139 
5140           if test "x$BASH" = x; then
5141             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5142           fi
5143         else
5144           # Otherwise we believe it is a complete path. Use it as it is.
5145           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5146 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5147           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5148 $as_echo_n "checking for BASH... " >&6; }
5149           if test ! -x "$tool_specified"; then
5150             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5151 $as_echo "not found" >&6; }
5152             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5153           fi
5154           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5155 $as_echo "$tool_specified" >&6; }
5156         fi
5157       fi
5158     fi
5159 
5160   fi
5161 
5162 
5163 
5164   if test "x$BASH" = x; then
5165     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5166   fi
5167 
5168 
5169 
5170 
5171 
5172   # Publish this variable in the help.
5173 
5174 
5175   if [ -z "${CAT+x}" ]; then
5176     # The variable is not set by user, try to locate tool using the code snippet
5177     for ac_prog in cat
5178 do
5179   # Extract the first word of "$ac_prog", so it can be a program name with args.
5180 set dummy $ac_prog; ac_word=$2
5181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5182 $as_echo_n "checking for $ac_word... " >&6; }
5183 if ${ac_cv_path_CAT+:} false; then :
5184   $as_echo_n "(cached) " >&6
5185 else
5186   case $CAT in
5187   [\\/]* | ?:[\\/]*)
5188   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5189   ;;
5190   *)
5191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5192 for as_dir in $PATH
5193 do
5194   IFS=$as_save_IFS
5195   test -z "$as_dir" && as_dir=.
5196     for ac_exec_ext in '' $ac_executable_extensions; do
5197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5198     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5200     break 2
5201   fi
5202 done
5203   done
5204 IFS=$as_save_IFS
5205 
5206   ;;
5207 esac
5208 fi
5209 CAT=$ac_cv_path_CAT
5210 if test -n "$CAT"; then
5211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5212 $as_echo "$CAT" >&6; }
5213 else
5214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5215 $as_echo "no" >&6; }
5216 fi
5217 
5218 
5219   test -n "$CAT" && break
5220 done
5221 
5222   else
5223     # The variable is set, but is it from the command line or the environment?
5224 
5225     # Try to remove the string !CAT! from our list.
5226     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5227     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5228       # If it failed, the variable was not from the command line. Ignore it,
5229       # but warn the user (except for BASH, which is always set by the calling BASH).
5230       if test "xCAT" != xBASH; then
5231         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5232 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5233       fi
5234       # Try to locate tool using the code snippet
5235       for ac_prog in cat
5236 do
5237   # Extract the first word of "$ac_prog", so it can be a program name with args.
5238 set dummy $ac_prog; ac_word=$2
5239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5240 $as_echo_n "checking for $ac_word... " >&6; }
5241 if ${ac_cv_path_CAT+:} false; then :
5242   $as_echo_n "(cached) " >&6
5243 else
5244   case $CAT in
5245   [\\/]* | ?:[\\/]*)
5246   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5247   ;;
5248   *)
5249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5250 for as_dir in $PATH
5251 do
5252   IFS=$as_save_IFS
5253   test -z "$as_dir" && as_dir=.
5254     for ac_exec_ext in '' $ac_executable_extensions; do
5255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5256     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5258     break 2
5259   fi
5260 done
5261   done
5262 IFS=$as_save_IFS
5263 
5264   ;;
5265 esac
5266 fi
5267 CAT=$ac_cv_path_CAT
5268 if test -n "$CAT"; then
5269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5270 $as_echo "$CAT" >&6; }
5271 else
5272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5273 $as_echo "no" >&6; }
5274 fi
5275 
5276 
5277   test -n "$CAT" && break
5278 done
5279 
5280     else
5281       # If it succeeded, then it was overridden by the user. We will use it
5282       # for the tool.
5283 
5284       # First remove it from the list of overridden variables, so we can test
5285       # for unknown variables in the end.
5286       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5287 
5288       # Check if we try to supply an empty value
5289       if test "x$CAT" = x; then
5290         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5291 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5292         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5293 $as_echo_n "checking for CAT... " >&6; }
5294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5295 $as_echo "disabled" >&6; }
5296       else
5297         # Check if the provided tool contains a complete path.
5298         tool_specified="$CAT"
5299         tool_basename="${tool_specified##*/}"
5300         if test "x$tool_basename" = "x$tool_specified"; then
5301           # A command without a complete path is provided, search $PATH.
5302           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5303 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5304           # Extract the first word of "$tool_basename", so it can be a program name with args.
5305 set dummy $tool_basename; ac_word=$2
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5307 $as_echo_n "checking for $ac_word... " >&6; }
5308 if ${ac_cv_path_CAT+:} false; then :
5309   $as_echo_n "(cached) " >&6
5310 else
5311   case $CAT in
5312   [\\/]* | ?:[\\/]*)
5313   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5314   ;;
5315   *)
5316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5317 for as_dir in $PATH
5318 do
5319   IFS=$as_save_IFS
5320   test -z "$as_dir" && as_dir=.
5321     for ac_exec_ext in '' $ac_executable_extensions; do
5322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5323     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5325     break 2
5326   fi
5327 done
5328   done
5329 IFS=$as_save_IFS
5330 
5331   ;;
5332 esac
5333 fi
5334 CAT=$ac_cv_path_CAT
5335 if test -n "$CAT"; then
5336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5337 $as_echo "$CAT" >&6; }
5338 else
5339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340 $as_echo "no" >&6; }
5341 fi
5342 
5343 
5344           if test "x$CAT" = x; then
5345             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5346           fi
5347         else
5348           # Otherwise we believe it is a complete path. Use it as it is.
5349           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5350 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5351           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5352 $as_echo_n "checking for CAT... " >&6; }
5353           if test ! -x "$tool_specified"; then
5354             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5355 $as_echo "not found" >&6; }
5356             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5357           fi
5358           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5359 $as_echo "$tool_specified" >&6; }
5360         fi
5361       fi
5362     fi
5363 
5364   fi
5365 
5366 
5367 
5368   if test "x$CAT" = x; then
5369     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5370   fi
5371 
5372 
5373 
5374 
5375 
5376   # Publish this variable in the help.
5377 
5378 
5379   if [ -z "${CHMOD+x}" ]; then
5380     # The variable is not set by user, try to locate tool using the code snippet
5381     for ac_prog in chmod
5382 do
5383   # Extract the first word of "$ac_prog", so it can be a program name with args.
5384 set dummy $ac_prog; ac_word=$2
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5386 $as_echo_n "checking for $ac_word... " >&6; }
5387 if ${ac_cv_path_CHMOD+:} false; then :
5388   $as_echo_n "(cached) " >&6
5389 else
5390   case $CHMOD in
5391   [\\/]* | ?:[\\/]*)
5392   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5393   ;;
5394   *)
5395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5396 for as_dir in $PATH
5397 do
5398   IFS=$as_save_IFS
5399   test -z "$as_dir" && as_dir=.
5400     for ac_exec_ext in '' $ac_executable_extensions; do
5401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5402     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5404     break 2
5405   fi
5406 done
5407   done
5408 IFS=$as_save_IFS
5409 
5410   ;;
5411 esac
5412 fi
5413 CHMOD=$ac_cv_path_CHMOD
5414 if test -n "$CHMOD"; then
5415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5416 $as_echo "$CHMOD" >&6; }
5417 else
5418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5419 $as_echo "no" >&6; }
5420 fi
5421 
5422 
5423   test -n "$CHMOD" && break
5424 done
5425 
5426   else
5427     # The variable is set, but is it from the command line or the environment?
5428 
5429     # Try to remove the string !CHMOD! from our list.
5430     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5431     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5432       # If it failed, the variable was not from the command line. Ignore it,
5433       # but warn the user (except for BASH, which is always set by the calling BASH).
5434       if test "xCHMOD" != xBASH; then
5435         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5436 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5437       fi
5438       # Try to locate tool using the code snippet
5439       for ac_prog in chmod
5440 do
5441   # Extract the first word of "$ac_prog", so it can be a program name with args.
5442 set dummy $ac_prog; ac_word=$2
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5444 $as_echo_n "checking for $ac_word... " >&6; }
5445 if ${ac_cv_path_CHMOD+:} false; then :
5446   $as_echo_n "(cached) " >&6
5447 else
5448   case $CHMOD in
5449   [\\/]* | ?:[\\/]*)
5450   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5451   ;;
5452   *)
5453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5454 for as_dir in $PATH
5455 do
5456   IFS=$as_save_IFS
5457   test -z "$as_dir" && as_dir=.
5458     for ac_exec_ext in '' $ac_executable_extensions; do
5459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5460     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5462     break 2
5463   fi
5464 done
5465   done
5466 IFS=$as_save_IFS
5467 
5468   ;;
5469 esac
5470 fi
5471 CHMOD=$ac_cv_path_CHMOD
5472 if test -n "$CHMOD"; then
5473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5474 $as_echo "$CHMOD" >&6; }
5475 else
5476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5477 $as_echo "no" >&6; }
5478 fi
5479 
5480 
5481   test -n "$CHMOD" && break
5482 done
5483 
5484     else
5485       # If it succeeded, then it was overridden by the user. We will use it
5486       # for the tool.
5487 
5488       # First remove it from the list of overridden variables, so we can test
5489       # for unknown variables in the end.
5490       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5491 
5492       # Check if we try to supply an empty value
5493       if test "x$CHMOD" = x; then
5494         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5495 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5496         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5497 $as_echo_n "checking for CHMOD... " >&6; }
5498         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5499 $as_echo "disabled" >&6; }
5500       else
5501         # Check if the provided tool contains a complete path.
5502         tool_specified="$CHMOD"
5503         tool_basename="${tool_specified##*/}"
5504         if test "x$tool_basename" = "x$tool_specified"; then
5505           # A command without a complete path is provided, search $PATH.
5506           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5507 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5508           # Extract the first word of "$tool_basename", so it can be a program name with args.
5509 set dummy $tool_basename; ac_word=$2
5510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5511 $as_echo_n "checking for $ac_word... " >&6; }
5512 if ${ac_cv_path_CHMOD+:} false; then :
5513   $as_echo_n "(cached) " >&6
5514 else
5515   case $CHMOD in
5516   [\\/]* | ?:[\\/]*)
5517   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5518   ;;
5519   *)
5520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521 for as_dir in $PATH
5522 do
5523   IFS=$as_save_IFS
5524   test -z "$as_dir" && as_dir=.
5525     for ac_exec_ext in '' $ac_executable_extensions; do
5526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5527     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5529     break 2
5530   fi
5531 done
5532   done
5533 IFS=$as_save_IFS
5534 
5535   ;;
5536 esac
5537 fi
5538 CHMOD=$ac_cv_path_CHMOD
5539 if test -n "$CHMOD"; then
5540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5541 $as_echo "$CHMOD" >&6; }
5542 else
5543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544 $as_echo "no" >&6; }
5545 fi
5546 
5547 
5548           if test "x$CHMOD" = x; then
5549             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5550           fi
5551         else
5552           # Otherwise we believe it is a complete path. Use it as it is.
5553           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5554 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5555           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5556 $as_echo_n "checking for CHMOD... " >&6; }
5557           if test ! -x "$tool_specified"; then
5558             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5559 $as_echo "not found" >&6; }
5560             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5561           fi
5562           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5563 $as_echo "$tool_specified" >&6; }
5564         fi
5565       fi
5566     fi
5567 
5568   fi
5569 
5570 
5571 
5572   if test "x$CHMOD" = x; then
5573     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5574   fi
5575 
5576 
5577 
5578 
5579 
5580   # Publish this variable in the help.
5581 
5582 
5583   if [ -z "${CMP+x}" ]; then
5584     # The variable is not set by user, try to locate tool using the code snippet
5585     for ac_prog in cmp
5586 do
5587   # Extract the first word of "$ac_prog", so it can be a program name with args.
5588 set dummy $ac_prog; ac_word=$2
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5590 $as_echo_n "checking for $ac_word... " >&6; }
5591 if ${ac_cv_path_CMP+:} false; then :
5592   $as_echo_n "(cached) " >&6
5593 else
5594   case $CMP in
5595   [\\/]* | ?:[\\/]*)
5596   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5597   ;;
5598   *)
5599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5600 for as_dir in $PATH
5601 do
5602   IFS=$as_save_IFS
5603   test -z "$as_dir" && as_dir=.
5604     for ac_exec_ext in '' $ac_executable_extensions; do
5605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5606     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5608     break 2
5609   fi
5610 done
5611   done
5612 IFS=$as_save_IFS
5613 
5614   ;;
5615 esac
5616 fi
5617 CMP=$ac_cv_path_CMP
5618 if test -n "$CMP"; then
5619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5620 $as_echo "$CMP" >&6; }
5621 else
5622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5623 $as_echo "no" >&6; }
5624 fi
5625 
5626 
5627   test -n "$CMP" && break
5628 done
5629 
5630   else
5631     # The variable is set, but is it from the command line or the environment?
5632 
5633     # Try to remove the string !CMP! from our list.
5634     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5635     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5636       # If it failed, the variable was not from the command line. Ignore it,
5637       # but warn the user (except for BASH, which is always set by the calling BASH).
5638       if test "xCMP" != xBASH; then
5639         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5640 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5641       fi
5642       # Try to locate tool using the code snippet
5643       for ac_prog in cmp
5644 do
5645   # Extract the first word of "$ac_prog", so it can be a program name with args.
5646 set dummy $ac_prog; ac_word=$2
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5648 $as_echo_n "checking for $ac_word... " >&6; }
5649 if ${ac_cv_path_CMP+:} false; then :
5650   $as_echo_n "(cached) " >&6
5651 else
5652   case $CMP in
5653   [\\/]* | ?:[\\/]*)
5654   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5655   ;;
5656   *)
5657   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5658 for as_dir in $PATH
5659 do
5660   IFS=$as_save_IFS
5661   test -z "$as_dir" && as_dir=.
5662     for ac_exec_ext in '' $ac_executable_extensions; do
5663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5664     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5666     break 2
5667   fi
5668 done
5669   done
5670 IFS=$as_save_IFS
5671 
5672   ;;
5673 esac
5674 fi
5675 CMP=$ac_cv_path_CMP
5676 if test -n "$CMP"; then
5677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5678 $as_echo "$CMP" >&6; }
5679 else
5680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5681 $as_echo "no" >&6; }
5682 fi
5683 
5684 
5685   test -n "$CMP" && break
5686 done
5687 
5688     else
5689       # If it succeeded, then it was overridden by the user. We will use it
5690       # for the tool.
5691 
5692       # First remove it from the list of overridden variables, so we can test
5693       # for unknown variables in the end.
5694       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5695 
5696       # Check if we try to supply an empty value
5697       if test "x$CMP" = x; then
5698         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5699 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5700         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5701 $as_echo_n "checking for CMP... " >&6; }
5702         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5703 $as_echo "disabled" >&6; }
5704       else
5705         # Check if the provided tool contains a complete path.
5706         tool_specified="$CMP"
5707         tool_basename="${tool_specified##*/}"
5708         if test "x$tool_basename" = "x$tool_specified"; then
5709           # A command without a complete path is provided, search $PATH.
5710           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5711 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5712           # Extract the first word of "$tool_basename", so it can be a program name with args.
5713 set dummy $tool_basename; ac_word=$2
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5715 $as_echo_n "checking for $ac_word... " >&6; }
5716 if ${ac_cv_path_CMP+:} false; then :
5717   $as_echo_n "(cached) " >&6
5718 else
5719   case $CMP in
5720   [\\/]* | ?:[\\/]*)
5721   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5722   ;;
5723   *)
5724   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5725 for as_dir in $PATH
5726 do
5727   IFS=$as_save_IFS
5728   test -z "$as_dir" && as_dir=.
5729     for ac_exec_ext in '' $ac_executable_extensions; do
5730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5731     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5733     break 2
5734   fi
5735 done
5736   done
5737 IFS=$as_save_IFS
5738 
5739   ;;
5740 esac
5741 fi
5742 CMP=$ac_cv_path_CMP
5743 if test -n "$CMP"; then
5744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5745 $as_echo "$CMP" >&6; }
5746 else
5747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5748 $as_echo "no" >&6; }
5749 fi
5750 
5751 
5752           if test "x$CMP" = x; then
5753             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5754           fi
5755         else
5756           # Otherwise we believe it is a complete path. Use it as it is.
5757           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5758 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5759           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5760 $as_echo_n "checking for CMP... " >&6; }
5761           if test ! -x "$tool_specified"; then
5762             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5763 $as_echo "not found" >&6; }
5764             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5765           fi
5766           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5767 $as_echo "$tool_specified" >&6; }
5768         fi
5769       fi
5770     fi
5771 
5772   fi
5773 
5774 
5775 
5776   if test "x$CMP" = x; then
5777     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5778   fi
5779 
5780 
5781 
5782 
5783 
5784   # Publish this variable in the help.
5785 
5786 
5787   if [ -z "${COMM+x}" ]; then
5788     # The variable is not set by user, try to locate tool using the code snippet
5789     for ac_prog in comm
5790 do
5791   # Extract the first word of "$ac_prog", so it can be a program name with args.
5792 set dummy $ac_prog; ac_word=$2
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5794 $as_echo_n "checking for $ac_word... " >&6; }
5795 if ${ac_cv_path_COMM+:} false; then :
5796   $as_echo_n "(cached) " >&6
5797 else
5798   case $COMM in
5799   [\\/]* | ?:[\\/]*)
5800   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5801   ;;
5802   *)
5803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5804 for as_dir in $PATH
5805 do
5806   IFS=$as_save_IFS
5807   test -z "$as_dir" && as_dir=.
5808     for ac_exec_ext in '' $ac_executable_extensions; do
5809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5810     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5812     break 2
5813   fi
5814 done
5815   done
5816 IFS=$as_save_IFS
5817 
5818   ;;
5819 esac
5820 fi
5821 COMM=$ac_cv_path_COMM
5822 if test -n "$COMM"; then
5823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5824 $as_echo "$COMM" >&6; }
5825 else
5826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5827 $as_echo "no" >&6; }
5828 fi
5829 
5830 
5831   test -n "$COMM" && break
5832 done
5833 
5834   else
5835     # The variable is set, but is it from the command line or the environment?
5836 
5837     # Try to remove the string !COMM! from our list.
5838     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5839     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5840       # If it failed, the variable was not from the command line. Ignore it,
5841       # but warn the user (except for BASH, which is always set by the calling BASH).
5842       if test "xCOMM" != xBASH; then
5843         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5844 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5845       fi
5846       # Try to locate tool using the code snippet
5847       for ac_prog in comm
5848 do
5849   # Extract the first word of "$ac_prog", so it can be a program name with args.
5850 set dummy $ac_prog; ac_word=$2
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5852 $as_echo_n "checking for $ac_word... " >&6; }
5853 if ${ac_cv_path_COMM+:} false; then :
5854   $as_echo_n "(cached) " >&6
5855 else
5856   case $COMM in
5857   [\\/]* | ?:[\\/]*)
5858   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5859   ;;
5860   *)
5861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5862 for as_dir in $PATH
5863 do
5864   IFS=$as_save_IFS
5865   test -z "$as_dir" && as_dir=.
5866     for ac_exec_ext in '' $ac_executable_extensions; do
5867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5868     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5870     break 2
5871   fi
5872 done
5873   done
5874 IFS=$as_save_IFS
5875 
5876   ;;
5877 esac
5878 fi
5879 COMM=$ac_cv_path_COMM
5880 if test -n "$COMM"; then
5881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5882 $as_echo "$COMM" >&6; }
5883 else
5884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885 $as_echo "no" >&6; }
5886 fi
5887 
5888 
5889   test -n "$COMM" && break
5890 done
5891 
5892     else
5893       # If it succeeded, then it was overridden by the user. We will use it
5894       # for the tool.
5895 
5896       # First remove it from the list of overridden variables, so we can test
5897       # for unknown variables in the end.
5898       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5899 
5900       # Check if we try to supply an empty value
5901       if test "x$COMM" = x; then
5902         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5903 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5904         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5905 $as_echo_n "checking for COMM... " >&6; }
5906         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5907 $as_echo "disabled" >&6; }
5908       else
5909         # Check if the provided tool contains a complete path.
5910         tool_specified="$COMM"
5911         tool_basename="${tool_specified##*/}"
5912         if test "x$tool_basename" = "x$tool_specified"; then
5913           # A command without a complete path is provided, search $PATH.
5914           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5915 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5916           # Extract the first word of "$tool_basename", so it can be a program name with args.
5917 set dummy $tool_basename; ac_word=$2
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5919 $as_echo_n "checking for $ac_word... " >&6; }
5920 if ${ac_cv_path_COMM+:} false; then :
5921   $as_echo_n "(cached) " >&6
5922 else
5923   case $COMM in
5924   [\\/]* | ?:[\\/]*)
5925   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5926   ;;
5927   *)
5928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929 for as_dir in $PATH
5930 do
5931   IFS=$as_save_IFS
5932   test -z "$as_dir" && as_dir=.
5933     for ac_exec_ext in '' $ac_executable_extensions; do
5934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5935     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5937     break 2
5938   fi
5939 done
5940   done
5941 IFS=$as_save_IFS
5942 
5943   ;;
5944 esac
5945 fi
5946 COMM=$ac_cv_path_COMM
5947 if test -n "$COMM"; then
5948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5949 $as_echo "$COMM" >&6; }
5950 else
5951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5952 $as_echo "no" >&6; }
5953 fi
5954 
5955 
5956           if test "x$COMM" = x; then
5957             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5958           fi
5959         else
5960           # Otherwise we believe it is a complete path. Use it as it is.
5961           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5962 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5963           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5964 $as_echo_n "checking for COMM... " >&6; }
5965           if test ! -x "$tool_specified"; then
5966             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5967 $as_echo "not found" >&6; }
5968             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5969           fi
5970           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5971 $as_echo "$tool_specified" >&6; }
5972         fi
5973       fi
5974     fi
5975 
5976   fi
5977 
5978 
5979 
5980   if test "x$COMM" = x; then
5981     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5982   fi
5983 
5984 
5985 
5986 
5987 
5988   # Publish this variable in the help.
5989 
5990 
5991   if [ -z "${CP+x}" ]; then
5992     # The variable is not set by user, try to locate tool using the code snippet
5993     for ac_prog in cp
5994 do
5995   # Extract the first word of "$ac_prog", so it can be a program name with args.
5996 set dummy $ac_prog; ac_word=$2
5997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998 $as_echo_n "checking for $ac_word... " >&6; }
5999 if ${ac_cv_path_CP+:} false; then :
6000   $as_echo_n "(cached) " >&6
6001 else
6002   case $CP in
6003   [\\/]* | ?:[\\/]*)
6004   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6005   ;;
6006   *)
6007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008 for as_dir in $PATH
6009 do
6010   IFS=$as_save_IFS
6011   test -z "$as_dir" && as_dir=.
6012     for ac_exec_ext in '' $ac_executable_extensions; do
6013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6014     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6016     break 2
6017   fi
6018 done
6019   done
6020 IFS=$as_save_IFS
6021 
6022   ;;
6023 esac
6024 fi
6025 CP=$ac_cv_path_CP
6026 if test -n "$CP"; then
6027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6028 $as_echo "$CP" >&6; }
6029 else
6030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6031 $as_echo "no" >&6; }
6032 fi
6033 
6034 
6035   test -n "$CP" && break
6036 done
6037 
6038   else
6039     # The variable is set, but is it from the command line or the environment?
6040 
6041     # Try to remove the string !CP! from our list.
6042     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6043     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6044       # If it failed, the variable was not from the command line. Ignore it,
6045       # but warn the user (except for BASH, which is always set by the calling BASH).
6046       if test "xCP" != xBASH; then
6047         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6048 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6049       fi
6050       # Try to locate tool using the code snippet
6051       for ac_prog in cp
6052 do
6053   # Extract the first word of "$ac_prog", so it can be a program name with args.
6054 set dummy $ac_prog; ac_word=$2
6055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6056 $as_echo_n "checking for $ac_word... " >&6; }
6057 if ${ac_cv_path_CP+:} false; then :
6058   $as_echo_n "(cached) " >&6
6059 else
6060   case $CP in
6061   [\\/]* | ?:[\\/]*)
6062   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6063   ;;
6064   *)
6065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6066 for as_dir in $PATH
6067 do
6068   IFS=$as_save_IFS
6069   test -z "$as_dir" && as_dir=.
6070     for ac_exec_ext in '' $ac_executable_extensions; do
6071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6072     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6074     break 2
6075   fi
6076 done
6077   done
6078 IFS=$as_save_IFS
6079 
6080   ;;
6081 esac
6082 fi
6083 CP=$ac_cv_path_CP
6084 if test -n "$CP"; then
6085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6086 $as_echo "$CP" >&6; }
6087 else
6088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6089 $as_echo "no" >&6; }
6090 fi
6091 
6092 
6093   test -n "$CP" && break
6094 done
6095 
6096     else
6097       # If it succeeded, then it was overridden by the user. We will use it
6098       # for the tool.
6099 
6100       # First remove it from the list of overridden variables, so we can test
6101       # for unknown variables in the end.
6102       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6103 
6104       # Check if we try to supply an empty value
6105       if test "x$CP" = x; then
6106         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6107 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6108         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6109 $as_echo_n "checking for CP... " >&6; }
6110         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6111 $as_echo "disabled" >&6; }
6112       else
6113         # Check if the provided tool contains a complete path.
6114         tool_specified="$CP"
6115         tool_basename="${tool_specified##*/}"
6116         if test "x$tool_basename" = "x$tool_specified"; then
6117           # A command without a complete path is provided, search $PATH.
6118           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6119 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6120           # Extract the first word of "$tool_basename", so it can be a program name with args.
6121 set dummy $tool_basename; ac_word=$2
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6123 $as_echo_n "checking for $ac_word... " >&6; }
6124 if ${ac_cv_path_CP+:} false; then :
6125   $as_echo_n "(cached) " >&6
6126 else
6127   case $CP in
6128   [\\/]* | ?:[\\/]*)
6129   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6130   ;;
6131   *)
6132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6133 for as_dir in $PATH
6134 do
6135   IFS=$as_save_IFS
6136   test -z "$as_dir" && as_dir=.
6137     for ac_exec_ext in '' $ac_executable_extensions; do
6138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6139     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6141     break 2
6142   fi
6143 done
6144   done
6145 IFS=$as_save_IFS
6146 
6147   ;;
6148 esac
6149 fi
6150 CP=$ac_cv_path_CP
6151 if test -n "$CP"; then
6152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6153 $as_echo "$CP" >&6; }
6154 else
6155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6156 $as_echo "no" >&6; }
6157 fi
6158 
6159 
6160           if test "x$CP" = x; then
6161             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6162           fi
6163         else
6164           # Otherwise we believe it is a complete path. Use it as it is.
6165           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6166 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6167           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6168 $as_echo_n "checking for CP... " >&6; }
6169           if test ! -x "$tool_specified"; then
6170             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6171 $as_echo "not found" >&6; }
6172             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6173           fi
6174           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6175 $as_echo "$tool_specified" >&6; }
6176         fi
6177       fi
6178     fi
6179 
6180   fi
6181 
6182 
6183 
6184   if test "x$CP" = x; then
6185     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6186   fi
6187 
6188 
6189 
6190 
6191 
6192   # Publish this variable in the help.
6193 
6194 
6195   if [ -z "${CUT+x}" ]; then
6196     # The variable is not set by user, try to locate tool using the code snippet
6197     for ac_prog in cut
6198 do
6199   # Extract the first word of "$ac_prog", so it can be a program name with args.
6200 set dummy $ac_prog; ac_word=$2
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6202 $as_echo_n "checking for $ac_word... " >&6; }
6203 if ${ac_cv_path_CUT+:} false; then :
6204   $as_echo_n "(cached) " >&6
6205 else
6206   case $CUT in
6207   [\\/]* | ?:[\\/]*)
6208   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6209   ;;
6210   *)
6211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6212 for as_dir in $PATH
6213 do
6214   IFS=$as_save_IFS
6215   test -z "$as_dir" && as_dir=.
6216     for ac_exec_ext in '' $ac_executable_extensions; do
6217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6218     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6220     break 2
6221   fi
6222 done
6223   done
6224 IFS=$as_save_IFS
6225 
6226   ;;
6227 esac
6228 fi
6229 CUT=$ac_cv_path_CUT
6230 if test -n "$CUT"; then
6231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6232 $as_echo "$CUT" >&6; }
6233 else
6234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6235 $as_echo "no" >&6; }
6236 fi
6237 
6238 
6239   test -n "$CUT" && break
6240 done
6241 
6242   else
6243     # The variable is set, but is it from the command line or the environment?
6244 
6245     # Try to remove the string !CUT! from our list.
6246     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6247     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6248       # If it failed, the variable was not from the command line. Ignore it,
6249       # but warn the user (except for BASH, which is always set by the calling BASH).
6250       if test "xCUT" != xBASH; then
6251         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6252 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6253       fi
6254       # Try to locate tool using the code snippet
6255       for ac_prog in cut
6256 do
6257   # Extract the first word of "$ac_prog", so it can be a program name with args.
6258 set dummy $ac_prog; ac_word=$2
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6260 $as_echo_n "checking for $ac_word... " >&6; }
6261 if ${ac_cv_path_CUT+:} false; then :
6262   $as_echo_n "(cached) " >&6
6263 else
6264   case $CUT in
6265   [\\/]* | ?:[\\/]*)
6266   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6267   ;;
6268   *)
6269   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6270 for as_dir in $PATH
6271 do
6272   IFS=$as_save_IFS
6273   test -z "$as_dir" && as_dir=.
6274     for ac_exec_ext in '' $ac_executable_extensions; do
6275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6276     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6278     break 2
6279   fi
6280 done
6281   done
6282 IFS=$as_save_IFS
6283 
6284   ;;
6285 esac
6286 fi
6287 CUT=$ac_cv_path_CUT
6288 if test -n "$CUT"; then
6289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6290 $as_echo "$CUT" >&6; }
6291 else
6292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6293 $as_echo "no" >&6; }
6294 fi
6295 
6296 
6297   test -n "$CUT" && break
6298 done
6299 
6300     else
6301       # If it succeeded, then it was overridden by the user. We will use it
6302       # for the tool.
6303 
6304       # First remove it from the list of overridden variables, so we can test
6305       # for unknown variables in the end.
6306       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6307 
6308       # Check if we try to supply an empty value
6309       if test "x$CUT" = x; then
6310         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6311 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6312         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6313 $as_echo_n "checking for CUT... " >&6; }
6314         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6315 $as_echo "disabled" >&6; }
6316       else
6317         # Check if the provided tool contains a complete path.
6318         tool_specified="$CUT"
6319         tool_basename="${tool_specified##*/}"
6320         if test "x$tool_basename" = "x$tool_specified"; then
6321           # A command without a complete path is provided, search $PATH.
6322           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6323 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6324           # Extract the first word of "$tool_basename", so it can be a program name with args.
6325 set dummy $tool_basename; ac_word=$2
6326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6327 $as_echo_n "checking for $ac_word... " >&6; }
6328 if ${ac_cv_path_CUT+:} false; then :
6329   $as_echo_n "(cached) " >&6
6330 else
6331   case $CUT in
6332   [\\/]* | ?:[\\/]*)
6333   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6334   ;;
6335   *)
6336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6337 for as_dir in $PATH
6338 do
6339   IFS=$as_save_IFS
6340   test -z "$as_dir" && as_dir=.
6341     for ac_exec_ext in '' $ac_executable_extensions; do
6342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6343     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6345     break 2
6346   fi
6347 done
6348   done
6349 IFS=$as_save_IFS
6350 
6351   ;;
6352 esac
6353 fi
6354 CUT=$ac_cv_path_CUT
6355 if test -n "$CUT"; then
6356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6357 $as_echo "$CUT" >&6; }
6358 else
6359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6360 $as_echo "no" >&6; }
6361 fi
6362 
6363 
6364           if test "x$CUT" = x; then
6365             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6366           fi
6367         else
6368           # Otherwise we believe it is a complete path. Use it as it is.
6369           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6370 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6371           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6372 $as_echo_n "checking for CUT... " >&6; }
6373           if test ! -x "$tool_specified"; then
6374             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6375 $as_echo "not found" >&6; }
6376             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6377           fi
6378           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6379 $as_echo "$tool_specified" >&6; }
6380         fi
6381       fi
6382     fi
6383 
6384   fi
6385 
6386 
6387 
6388   if test "x$CUT" = x; then
6389     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6390   fi
6391 
6392 
6393 
6394 
6395 
6396   # Publish this variable in the help.
6397 
6398 
6399   if [ -z "${DATE+x}" ]; then
6400     # The variable is not set by user, try to locate tool using the code snippet
6401     for ac_prog in date
6402 do
6403   # Extract the first word of "$ac_prog", so it can be a program name with args.
6404 set dummy $ac_prog; ac_word=$2
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6406 $as_echo_n "checking for $ac_word... " >&6; }
6407 if ${ac_cv_path_DATE+:} false; then :
6408   $as_echo_n "(cached) " >&6
6409 else
6410   case $DATE in
6411   [\\/]* | ?:[\\/]*)
6412   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6413   ;;
6414   *)
6415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6416 for as_dir in $PATH
6417 do
6418   IFS=$as_save_IFS
6419   test -z "$as_dir" && as_dir=.
6420     for ac_exec_ext in '' $ac_executable_extensions; do
6421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6422     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6424     break 2
6425   fi
6426 done
6427   done
6428 IFS=$as_save_IFS
6429 
6430   ;;
6431 esac
6432 fi
6433 DATE=$ac_cv_path_DATE
6434 if test -n "$DATE"; then
6435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6436 $as_echo "$DATE" >&6; }
6437 else
6438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439 $as_echo "no" >&6; }
6440 fi
6441 
6442 
6443   test -n "$DATE" && break
6444 done
6445 
6446   else
6447     # The variable is set, but is it from the command line or the environment?
6448 
6449     # Try to remove the string !DATE! from our list.
6450     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6451     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6452       # If it failed, the variable was not from the command line. Ignore it,
6453       # but warn the user (except for BASH, which is always set by the calling BASH).
6454       if test "xDATE" != xBASH; then
6455         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6456 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6457       fi
6458       # Try to locate tool using the code snippet
6459       for ac_prog in date
6460 do
6461   # Extract the first word of "$ac_prog", so it can be a program name with args.
6462 set dummy $ac_prog; ac_word=$2
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6464 $as_echo_n "checking for $ac_word... " >&6; }
6465 if ${ac_cv_path_DATE+:} false; then :
6466   $as_echo_n "(cached) " >&6
6467 else
6468   case $DATE in
6469   [\\/]* | ?:[\\/]*)
6470   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6471   ;;
6472   *)
6473   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6474 for as_dir in $PATH
6475 do
6476   IFS=$as_save_IFS
6477   test -z "$as_dir" && as_dir=.
6478     for ac_exec_ext in '' $ac_executable_extensions; do
6479   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6480     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6481     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6482     break 2
6483   fi
6484 done
6485   done
6486 IFS=$as_save_IFS
6487 
6488   ;;
6489 esac
6490 fi
6491 DATE=$ac_cv_path_DATE
6492 if test -n "$DATE"; then
6493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6494 $as_echo "$DATE" >&6; }
6495 else
6496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497 $as_echo "no" >&6; }
6498 fi
6499 
6500 
6501   test -n "$DATE" && break
6502 done
6503 
6504     else
6505       # If it succeeded, then it was overridden by the user. We will use it
6506       # for the tool.
6507 
6508       # First remove it from the list of overridden variables, so we can test
6509       # for unknown variables in the end.
6510       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6511 
6512       # Check if we try to supply an empty value
6513       if test "x$DATE" = x; then
6514         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6515 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6516         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6517 $as_echo_n "checking for DATE... " >&6; }
6518         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6519 $as_echo "disabled" >&6; }
6520       else
6521         # Check if the provided tool contains a complete path.
6522         tool_specified="$DATE"
6523         tool_basename="${tool_specified##*/}"
6524         if test "x$tool_basename" = "x$tool_specified"; then
6525           # A command without a complete path is provided, search $PATH.
6526           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6527 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6528           # Extract the first word of "$tool_basename", so it can be a program name with args.
6529 set dummy $tool_basename; ac_word=$2
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531 $as_echo_n "checking for $ac_word... " >&6; }
6532 if ${ac_cv_path_DATE+:} false; then :
6533   $as_echo_n "(cached) " >&6
6534 else
6535   case $DATE in
6536   [\\/]* | ?:[\\/]*)
6537   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6538   ;;
6539   *)
6540   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541 for as_dir in $PATH
6542 do
6543   IFS=$as_save_IFS
6544   test -z "$as_dir" && as_dir=.
6545     for ac_exec_ext in '' $ac_executable_extensions; do
6546   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6548     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549     break 2
6550   fi
6551 done
6552   done
6553 IFS=$as_save_IFS
6554 
6555   ;;
6556 esac
6557 fi
6558 DATE=$ac_cv_path_DATE
6559 if test -n "$DATE"; then
6560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6561 $as_echo "$DATE" >&6; }
6562 else
6563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564 $as_echo "no" >&6; }
6565 fi
6566 
6567 
6568           if test "x$DATE" = x; then
6569             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6570           fi
6571         else
6572           # Otherwise we believe it is a complete path. Use it as it is.
6573           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6574 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6575           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6576 $as_echo_n "checking for DATE... " >&6; }
6577           if test ! -x "$tool_specified"; then
6578             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6579 $as_echo "not found" >&6; }
6580             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6581           fi
6582           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6583 $as_echo "$tool_specified" >&6; }
6584         fi
6585       fi
6586     fi
6587 
6588   fi
6589 
6590 
6591 
6592   if test "x$DATE" = x; then
6593     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6594   fi
6595 
6596 
6597 
6598 
6599 
6600   # Publish this variable in the help.
6601 
6602 
6603   if [ -z "${DIFF+x}" ]; then
6604     # The variable is not set by user, try to locate tool using the code snippet
6605     for ac_prog in gdiff diff
6606 do
6607   # Extract the first word of "$ac_prog", so it can be a program name with args.
6608 set dummy $ac_prog; ac_word=$2
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6610 $as_echo_n "checking for $ac_word... " >&6; }
6611 if ${ac_cv_path_DIFF+:} false; then :
6612   $as_echo_n "(cached) " >&6
6613 else
6614   case $DIFF in
6615   [\\/]* | ?:[\\/]*)
6616   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6617   ;;
6618   *)
6619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6620 for as_dir in $PATH
6621 do
6622   IFS=$as_save_IFS
6623   test -z "$as_dir" && as_dir=.
6624     for ac_exec_ext in '' $ac_executable_extensions; do
6625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6626     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6628     break 2
6629   fi
6630 done
6631   done
6632 IFS=$as_save_IFS
6633 
6634   ;;
6635 esac
6636 fi
6637 DIFF=$ac_cv_path_DIFF
6638 if test -n "$DIFF"; then
6639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6640 $as_echo "$DIFF" >&6; }
6641 else
6642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643 $as_echo "no" >&6; }
6644 fi
6645 
6646 
6647   test -n "$DIFF" && break
6648 done
6649 
6650   else
6651     # The variable is set, but is it from the command line or the environment?
6652 
6653     # Try to remove the string !DIFF! from our list.
6654     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6655     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6656       # If it failed, the variable was not from the command line. Ignore it,
6657       # but warn the user (except for BASH, which is always set by the calling BASH).
6658       if test "xDIFF" != xBASH; then
6659         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6660 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6661       fi
6662       # Try to locate tool using the code snippet
6663       for ac_prog in gdiff diff
6664 do
6665   # Extract the first word of "$ac_prog", so it can be a program name with args.
6666 set dummy $ac_prog; ac_word=$2
6667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668 $as_echo_n "checking for $ac_word... " >&6; }
6669 if ${ac_cv_path_DIFF+:} false; then :
6670   $as_echo_n "(cached) " >&6
6671 else
6672   case $DIFF in
6673   [\\/]* | ?:[\\/]*)
6674   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6675   ;;
6676   *)
6677   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6678 for as_dir in $PATH
6679 do
6680   IFS=$as_save_IFS
6681   test -z "$as_dir" && as_dir=.
6682     for ac_exec_ext in '' $ac_executable_extensions; do
6683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6684     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6686     break 2
6687   fi
6688 done
6689   done
6690 IFS=$as_save_IFS
6691 
6692   ;;
6693 esac
6694 fi
6695 DIFF=$ac_cv_path_DIFF
6696 if test -n "$DIFF"; then
6697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6698 $as_echo "$DIFF" >&6; }
6699 else
6700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6701 $as_echo "no" >&6; }
6702 fi
6703 
6704 
6705   test -n "$DIFF" && break
6706 done
6707 
6708     else
6709       # If it succeeded, then it was overridden by the user. We will use it
6710       # for the tool.
6711 
6712       # First remove it from the list of overridden variables, so we can test
6713       # for unknown variables in the end.
6714       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6715 
6716       # Check if we try to supply an empty value
6717       if test "x$DIFF" = x; then
6718         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6719 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6720         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6721 $as_echo_n "checking for DIFF... " >&6; }
6722         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6723 $as_echo "disabled" >&6; }
6724       else
6725         # Check if the provided tool contains a complete path.
6726         tool_specified="$DIFF"
6727         tool_basename="${tool_specified##*/}"
6728         if test "x$tool_basename" = "x$tool_specified"; then
6729           # A command without a complete path is provided, search $PATH.
6730           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6731 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6732           # Extract the first word of "$tool_basename", so it can be a program name with args.
6733 set dummy $tool_basename; ac_word=$2
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6735 $as_echo_n "checking for $ac_word... " >&6; }
6736 if ${ac_cv_path_DIFF+:} false; then :
6737   $as_echo_n "(cached) " >&6
6738 else
6739   case $DIFF in
6740   [\\/]* | ?:[\\/]*)
6741   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6742   ;;
6743   *)
6744   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6745 for as_dir in $PATH
6746 do
6747   IFS=$as_save_IFS
6748   test -z "$as_dir" && as_dir=.
6749     for ac_exec_ext in '' $ac_executable_extensions; do
6750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6751     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6753     break 2
6754   fi
6755 done
6756   done
6757 IFS=$as_save_IFS
6758 
6759   ;;
6760 esac
6761 fi
6762 DIFF=$ac_cv_path_DIFF
6763 if test -n "$DIFF"; then
6764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6765 $as_echo "$DIFF" >&6; }
6766 else
6767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6768 $as_echo "no" >&6; }
6769 fi
6770 
6771 
6772           if test "x$DIFF" = x; then
6773             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6774           fi
6775         else
6776           # Otherwise we believe it is a complete path. Use it as it is.
6777           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6778 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6779           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6780 $as_echo_n "checking for DIFF... " >&6; }
6781           if test ! -x "$tool_specified"; then
6782             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6783 $as_echo "not found" >&6; }
6784             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6785           fi
6786           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6787 $as_echo "$tool_specified" >&6; }
6788         fi
6789       fi
6790     fi
6791 
6792   fi
6793 
6794 
6795 
6796   if test "x$DIFF" = x; then
6797     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6798   fi
6799 
6800 
6801 
6802 
6803 
6804   # Publish this variable in the help.
6805 
6806 
6807   if [ -z "${DIRNAME+x}" ]; then
6808     # The variable is not set by user, try to locate tool using the code snippet
6809     for ac_prog in dirname
6810 do
6811   # Extract the first word of "$ac_prog", so it can be a program name with args.
6812 set dummy $ac_prog; ac_word=$2
6813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6814 $as_echo_n "checking for $ac_word... " >&6; }
6815 if ${ac_cv_path_DIRNAME+:} false; then :
6816   $as_echo_n "(cached) " >&6
6817 else
6818   case $DIRNAME in
6819   [\\/]* | ?:[\\/]*)
6820   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6821   ;;
6822   *)
6823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6824 for as_dir in $PATH
6825 do
6826   IFS=$as_save_IFS
6827   test -z "$as_dir" && as_dir=.
6828     for ac_exec_ext in '' $ac_executable_extensions; do
6829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6830     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6832     break 2
6833   fi
6834 done
6835   done
6836 IFS=$as_save_IFS
6837 
6838   ;;
6839 esac
6840 fi
6841 DIRNAME=$ac_cv_path_DIRNAME
6842 if test -n "$DIRNAME"; then
6843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6844 $as_echo "$DIRNAME" >&6; }
6845 else
6846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6847 $as_echo "no" >&6; }
6848 fi
6849 
6850 
6851   test -n "$DIRNAME" && break
6852 done
6853 
6854   else
6855     # The variable is set, but is it from the command line or the environment?
6856 
6857     # Try to remove the string !DIRNAME! from our list.
6858     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6859     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6860       # If it failed, the variable was not from the command line. Ignore it,
6861       # but warn the user (except for BASH, which is always set by the calling BASH).
6862       if test "xDIRNAME" != xBASH; then
6863         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6864 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6865       fi
6866       # Try to locate tool using the code snippet
6867       for ac_prog in dirname
6868 do
6869   # Extract the first word of "$ac_prog", so it can be a program name with args.
6870 set dummy $ac_prog; ac_word=$2
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6872 $as_echo_n "checking for $ac_word... " >&6; }
6873 if ${ac_cv_path_DIRNAME+:} false; then :
6874   $as_echo_n "(cached) " >&6
6875 else
6876   case $DIRNAME in
6877   [\\/]* | ?:[\\/]*)
6878   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6879   ;;
6880   *)
6881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6882 for as_dir in $PATH
6883 do
6884   IFS=$as_save_IFS
6885   test -z "$as_dir" && as_dir=.
6886     for ac_exec_ext in '' $ac_executable_extensions; do
6887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6888     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6890     break 2
6891   fi
6892 done
6893   done
6894 IFS=$as_save_IFS
6895 
6896   ;;
6897 esac
6898 fi
6899 DIRNAME=$ac_cv_path_DIRNAME
6900 if test -n "$DIRNAME"; then
6901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6902 $as_echo "$DIRNAME" >&6; }
6903 else
6904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6905 $as_echo "no" >&6; }
6906 fi
6907 
6908 
6909   test -n "$DIRNAME" && break
6910 done
6911 
6912     else
6913       # If it succeeded, then it was overridden by the user. We will use it
6914       # for the tool.
6915 
6916       # First remove it from the list of overridden variables, so we can test
6917       # for unknown variables in the end.
6918       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6919 
6920       # Check if we try to supply an empty value
6921       if test "x$DIRNAME" = x; then
6922         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6923 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6924         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6925 $as_echo_n "checking for DIRNAME... " >&6; }
6926         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6927 $as_echo "disabled" >&6; }
6928       else
6929         # Check if the provided tool contains a complete path.
6930         tool_specified="$DIRNAME"
6931         tool_basename="${tool_specified##*/}"
6932         if test "x$tool_basename" = "x$tool_specified"; then
6933           # A command without a complete path is provided, search $PATH.
6934           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6935 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6936           # Extract the first word of "$tool_basename", so it can be a program name with args.
6937 set dummy $tool_basename; ac_word=$2
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6939 $as_echo_n "checking for $ac_word... " >&6; }
6940 if ${ac_cv_path_DIRNAME+:} false; then :
6941   $as_echo_n "(cached) " >&6
6942 else
6943   case $DIRNAME in
6944   [\\/]* | ?:[\\/]*)
6945   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6946   ;;
6947   *)
6948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6949 for as_dir in $PATH
6950 do
6951   IFS=$as_save_IFS
6952   test -z "$as_dir" && as_dir=.
6953     for ac_exec_ext in '' $ac_executable_extensions; do
6954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6955     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6957     break 2
6958   fi
6959 done
6960   done
6961 IFS=$as_save_IFS
6962 
6963   ;;
6964 esac
6965 fi
6966 DIRNAME=$ac_cv_path_DIRNAME
6967 if test -n "$DIRNAME"; then
6968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6969 $as_echo "$DIRNAME" >&6; }
6970 else
6971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6972 $as_echo "no" >&6; }
6973 fi
6974 
6975 
6976           if test "x$DIRNAME" = x; then
6977             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6978           fi
6979         else
6980           # Otherwise we believe it is a complete path. Use it as it is.
6981           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6982 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6983           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6984 $as_echo_n "checking for DIRNAME... " >&6; }
6985           if test ! -x "$tool_specified"; then
6986             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6987 $as_echo "not found" >&6; }
6988             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6989           fi
6990           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6991 $as_echo "$tool_specified" >&6; }
6992         fi
6993       fi
6994     fi
6995 
6996   fi
6997 
6998 
6999 
7000   if test "x$DIRNAME" = x; then
7001     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7002   fi
7003 
7004 
7005 
7006 
7007 
7008   # Publish this variable in the help.
7009 
7010 
7011   if [ -z "${ECHO+x}" ]; then
7012     # The variable is not set by user, try to locate tool using the code snippet
7013     for ac_prog in echo
7014 do
7015   # Extract the first word of "$ac_prog", so it can be a program name with args.
7016 set dummy $ac_prog; ac_word=$2
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7018 $as_echo_n "checking for $ac_word... " >&6; }
7019 if ${ac_cv_path_ECHO+:} false; then :
7020   $as_echo_n "(cached) " >&6
7021 else
7022   case $ECHO in
7023   [\\/]* | ?:[\\/]*)
7024   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7025   ;;
7026   *)
7027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028 for as_dir in $PATH
7029 do
7030   IFS=$as_save_IFS
7031   test -z "$as_dir" && as_dir=.
7032     for ac_exec_ext in '' $ac_executable_extensions; do
7033   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7034     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7035     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7036     break 2
7037   fi
7038 done
7039   done
7040 IFS=$as_save_IFS
7041 
7042   ;;
7043 esac
7044 fi
7045 ECHO=$ac_cv_path_ECHO
7046 if test -n "$ECHO"; then
7047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7048 $as_echo "$ECHO" >&6; }
7049 else
7050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7051 $as_echo "no" >&6; }
7052 fi
7053 
7054 
7055   test -n "$ECHO" && break
7056 done
7057 
7058   else
7059     # The variable is set, but is it from the command line or the environment?
7060 
7061     # Try to remove the string !ECHO! from our list.
7062     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7063     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7064       # If it failed, the variable was not from the command line. Ignore it,
7065       # but warn the user (except for BASH, which is always set by the calling BASH).
7066       if test "xECHO" != xBASH; then
7067         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7068 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7069       fi
7070       # Try to locate tool using the code snippet
7071       for ac_prog in echo
7072 do
7073   # Extract the first word of "$ac_prog", so it can be a program name with args.
7074 set dummy $ac_prog; ac_word=$2
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7076 $as_echo_n "checking for $ac_word... " >&6; }
7077 if ${ac_cv_path_ECHO+:} false; then :
7078   $as_echo_n "(cached) " >&6
7079 else
7080   case $ECHO in
7081   [\\/]* | ?:[\\/]*)
7082   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7083   ;;
7084   *)
7085   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7086 for as_dir in $PATH
7087 do
7088   IFS=$as_save_IFS
7089   test -z "$as_dir" && as_dir=.
7090     for ac_exec_ext in '' $ac_executable_extensions; do
7091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7092     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7094     break 2
7095   fi
7096 done
7097   done
7098 IFS=$as_save_IFS
7099 
7100   ;;
7101 esac
7102 fi
7103 ECHO=$ac_cv_path_ECHO
7104 if test -n "$ECHO"; then
7105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7106 $as_echo "$ECHO" >&6; }
7107 else
7108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7109 $as_echo "no" >&6; }
7110 fi
7111 
7112 
7113   test -n "$ECHO" && break
7114 done
7115 
7116     else
7117       # If it succeeded, then it was overridden by the user. We will use it
7118       # for the tool.
7119 
7120       # First remove it from the list of overridden variables, so we can test
7121       # for unknown variables in the end.
7122       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7123 
7124       # Check if we try to supply an empty value
7125       if test "x$ECHO" = x; then
7126         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7127 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7128         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7129 $as_echo_n "checking for ECHO... " >&6; }
7130         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7131 $as_echo "disabled" >&6; }
7132       else
7133         # Check if the provided tool contains a complete path.
7134         tool_specified="$ECHO"
7135         tool_basename="${tool_specified##*/}"
7136         if test "x$tool_basename" = "x$tool_specified"; then
7137           # A command without a complete path is provided, search $PATH.
7138           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7139 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7140           # Extract the first word of "$tool_basename", so it can be a program name with args.
7141 set dummy $tool_basename; ac_word=$2
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7143 $as_echo_n "checking for $ac_word... " >&6; }
7144 if ${ac_cv_path_ECHO+:} false; then :
7145   $as_echo_n "(cached) " >&6
7146 else
7147   case $ECHO in
7148   [\\/]* | ?:[\\/]*)
7149   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7150   ;;
7151   *)
7152   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7153 for as_dir in $PATH
7154 do
7155   IFS=$as_save_IFS
7156   test -z "$as_dir" && as_dir=.
7157     for ac_exec_ext in '' $ac_executable_extensions; do
7158   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7159     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7160     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7161     break 2
7162   fi
7163 done
7164   done
7165 IFS=$as_save_IFS
7166 
7167   ;;
7168 esac
7169 fi
7170 ECHO=$ac_cv_path_ECHO
7171 if test -n "$ECHO"; then
7172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7173 $as_echo "$ECHO" >&6; }
7174 else
7175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7176 $as_echo "no" >&6; }
7177 fi
7178 
7179 
7180           if test "x$ECHO" = x; then
7181             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7182           fi
7183         else
7184           # Otherwise we believe it is a complete path. Use it as it is.
7185           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7186 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7187           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7188 $as_echo_n "checking for ECHO... " >&6; }
7189           if test ! -x "$tool_specified"; then
7190             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7191 $as_echo "not found" >&6; }
7192             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7193           fi
7194           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7195 $as_echo "$tool_specified" >&6; }
7196         fi
7197       fi
7198     fi
7199 
7200   fi
7201 
7202 
7203 
7204   if test "x$ECHO" = x; then
7205     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7206   fi
7207 
7208 
7209 
7210 
7211 
7212   # Publish this variable in the help.
7213 
7214 
7215   if [ -z "${EXPR+x}" ]; then
7216     # The variable is not set by user, try to locate tool using the code snippet
7217     for ac_prog in expr
7218 do
7219   # Extract the first word of "$ac_prog", so it can be a program name with args.
7220 set dummy $ac_prog; ac_word=$2
7221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7222 $as_echo_n "checking for $ac_word... " >&6; }
7223 if ${ac_cv_path_EXPR+:} false; then :
7224   $as_echo_n "(cached) " >&6
7225 else
7226   case $EXPR in
7227   [\\/]* | ?:[\\/]*)
7228   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7229   ;;
7230   *)
7231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7232 for as_dir in $PATH
7233 do
7234   IFS=$as_save_IFS
7235   test -z "$as_dir" && as_dir=.
7236     for ac_exec_ext in '' $ac_executable_extensions; do
7237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7238     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7240     break 2
7241   fi
7242 done
7243   done
7244 IFS=$as_save_IFS
7245 
7246   ;;
7247 esac
7248 fi
7249 EXPR=$ac_cv_path_EXPR
7250 if test -n "$EXPR"; then
7251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7252 $as_echo "$EXPR" >&6; }
7253 else
7254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7255 $as_echo "no" >&6; }
7256 fi
7257 
7258 
7259   test -n "$EXPR" && break
7260 done
7261 
7262   else
7263     # The variable is set, but is it from the command line or the environment?
7264 
7265     # Try to remove the string !EXPR! from our list.
7266     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7267     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7268       # If it failed, the variable was not from the command line. Ignore it,
7269       # but warn the user (except for BASH, which is always set by the calling BASH).
7270       if test "xEXPR" != xBASH; then
7271         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7272 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7273       fi
7274       # Try to locate tool using the code snippet
7275       for ac_prog in expr
7276 do
7277   # Extract the first word of "$ac_prog", so it can be a program name with args.
7278 set dummy $ac_prog; ac_word=$2
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7280 $as_echo_n "checking for $ac_word... " >&6; }
7281 if ${ac_cv_path_EXPR+:} false; then :
7282   $as_echo_n "(cached) " >&6
7283 else
7284   case $EXPR in
7285   [\\/]* | ?:[\\/]*)
7286   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7287   ;;
7288   *)
7289   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7290 for as_dir in $PATH
7291 do
7292   IFS=$as_save_IFS
7293   test -z "$as_dir" && as_dir=.
7294     for ac_exec_ext in '' $ac_executable_extensions; do
7295   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7296     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7298     break 2
7299   fi
7300 done
7301   done
7302 IFS=$as_save_IFS
7303 
7304   ;;
7305 esac
7306 fi
7307 EXPR=$ac_cv_path_EXPR
7308 if test -n "$EXPR"; then
7309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7310 $as_echo "$EXPR" >&6; }
7311 else
7312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7313 $as_echo "no" >&6; }
7314 fi
7315 
7316 
7317   test -n "$EXPR" && break
7318 done
7319 
7320     else
7321       # If it succeeded, then it was overridden by the user. We will use it
7322       # for the tool.
7323 
7324       # First remove it from the list of overridden variables, so we can test
7325       # for unknown variables in the end.
7326       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7327 
7328       # Check if we try to supply an empty value
7329       if test "x$EXPR" = x; then
7330         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7331 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7332         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7333 $as_echo_n "checking for EXPR... " >&6; }
7334         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7335 $as_echo "disabled" >&6; }
7336       else
7337         # Check if the provided tool contains a complete path.
7338         tool_specified="$EXPR"
7339         tool_basename="${tool_specified##*/}"
7340         if test "x$tool_basename" = "x$tool_specified"; then
7341           # A command without a complete path is provided, search $PATH.
7342           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7343 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7344           # Extract the first word of "$tool_basename", so it can be a program name with args.
7345 set dummy $tool_basename; ac_word=$2
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7347 $as_echo_n "checking for $ac_word... " >&6; }
7348 if ${ac_cv_path_EXPR+:} false; then :
7349   $as_echo_n "(cached) " >&6
7350 else
7351   case $EXPR in
7352   [\\/]* | ?:[\\/]*)
7353   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7354   ;;
7355   *)
7356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7357 for as_dir in $PATH
7358 do
7359   IFS=$as_save_IFS
7360   test -z "$as_dir" && as_dir=.
7361     for ac_exec_ext in '' $ac_executable_extensions; do
7362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7363     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7365     break 2
7366   fi
7367 done
7368   done
7369 IFS=$as_save_IFS
7370 
7371   ;;
7372 esac
7373 fi
7374 EXPR=$ac_cv_path_EXPR
7375 if test -n "$EXPR"; then
7376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7377 $as_echo "$EXPR" >&6; }
7378 else
7379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7380 $as_echo "no" >&6; }
7381 fi
7382 
7383 
7384           if test "x$EXPR" = x; then
7385             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7386           fi
7387         else
7388           # Otherwise we believe it is a complete path. Use it as it is.
7389           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7390 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7391           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7392 $as_echo_n "checking for EXPR... " >&6; }
7393           if test ! -x "$tool_specified"; then
7394             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7395 $as_echo "not found" >&6; }
7396             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7397           fi
7398           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7399 $as_echo "$tool_specified" >&6; }
7400         fi
7401       fi
7402     fi
7403 
7404   fi
7405 
7406 
7407 
7408   if test "x$EXPR" = x; then
7409     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7410   fi
7411 
7412 
7413 
7414 
7415 
7416   # Publish this variable in the help.
7417 
7418 
7419   if [ -z "${FILE+x}" ]; then
7420     # The variable is not set by user, try to locate tool using the code snippet
7421     for ac_prog in file
7422 do
7423   # Extract the first word of "$ac_prog", so it can be a program name with args.
7424 set dummy $ac_prog; ac_word=$2
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7426 $as_echo_n "checking for $ac_word... " >&6; }
7427 if ${ac_cv_path_FILE+:} false; then :
7428   $as_echo_n "(cached) " >&6
7429 else
7430   case $FILE in
7431   [\\/]* | ?:[\\/]*)
7432   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7433   ;;
7434   *)
7435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7436 for as_dir in $PATH
7437 do
7438   IFS=$as_save_IFS
7439   test -z "$as_dir" && as_dir=.
7440     for ac_exec_ext in '' $ac_executable_extensions; do
7441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7442     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7444     break 2
7445   fi
7446 done
7447   done
7448 IFS=$as_save_IFS
7449 
7450   ;;
7451 esac
7452 fi
7453 FILE=$ac_cv_path_FILE
7454 if test -n "$FILE"; then
7455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7456 $as_echo "$FILE" >&6; }
7457 else
7458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7459 $as_echo "no" >&6; }
7460 fi
7461 
7462 
7463   test -n "$FILE" && break
7464 done
7465 
7466   else
7467     # The variable is set, but is it from the command line or the environment?
7468 
7469     # Try to remove the string !FILE! from our list.
7470     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7471     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7472       # If it failed, the variable was not from the command line. Ignore it,
7473       # but warn the user (except for BASH, which is always set by the calling BASH).
7474       if test "xFILE" != xBASH; then
7475         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7476 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7477       fi
7478       # Try to locate tool using the code snippet
7479       for ac_prog in file
7480 do
7481   # Extract the first word of "$ac_prog", so it can be a program name with args.
7482 set dummy $ac_prog; ac_word=$2
7483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7484 $as_echo_n "checking for $ac_word... " >&6; }
7485 if ${ac_cv_path_FILE+:} false; then :
7486   $as_echo_n "(cached) " >&6
7487 else
7488   case $FILE in
7489   [\\/]* | ?:[\\/]*)
7490   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7491   ;;
7492   *)
7493   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7494 for as_dir in $PATH
7495 do
7496   IFS=$as_save_IFS
7497   test -z "$as_dir" && as_dir=.
7498     for ac_exec_ext in '' $ac_executable_extensions; do
7499   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7500     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7501     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7502     break 2
7503   fi
7504 done
7505   done
7506 IFS=$as_save_IFS
7507 
7508   ;;
7509 esac
7510 fi
7511 FILE=$ac_cv_path_FILE
7512 if test -n "$FILE"; then
7513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7514 $as_echo "$FILE" >&6; }
7515 else
7516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7517 $as_echo "no" >&6; }
7518 fi
7519 
7520 
7521   test -n "$FILE" && break
7522 done
7523 
7524     else
7525       # If it succeeded, then it was overridden by the user. We will use it
7526       # for the tool.
7527 
7528       # First remove it from the list of overridden variables, so we can test
7529       # for unknown variables in the end.
7530       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7531 
7532       # Check if we try to supply an empty value
7533       if test "x$FILE" = x; then
7534         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7535 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7536         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7537 $as_echo_n "checking for FILE... " >&6; }
7538         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7539 $as_echo "disabled" >&6; }
7540       else
7541         # Check if the provided tool contains a complete path.
7542         tool_specified="$FILE"
7543         tool_basename="${tool_specified##*/}"
7544         if test "x$tool_basename" = "x$tool_specified"; then
7545           # A command without a complete path is provided, search $PATH.
7546           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7547 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7548           # Extract the first word of "$tool_basename", so it can be a program name with args.
7549 set dummy $tool_basename; ac_word=$2
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7551 $as_echo_n "checking for $ac_word... " >&6; }
7552 if ${ac_cv_path_FILE+:} false; then :
7553   $as_echo_n "(cached) " >&6
7554 else
7555   case $FILE in
7556   [\\/]* | ?:[\\/]*)
7557   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7558   ;;
7559   *)
7560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7561 for as_dir in $PATH
7562 do
7563   IFS=$as_save_IFS
7564   test -z "$as_dir" && as_dir=.
7565     for ac_exec_ext in '' $ac_executable_extensions; do
7566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7567     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7569     break 2
7570   fi
7571 done
7572   done
7573 IFS=$as_save_IFS
7574 
7575   ;;
7576 esac
7577 fi
7578 FILE=$ac_cv_path_FILE
7579 if test -n "$FILE"; then
7580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7581 $as_echo "$FILE" >&6; }
7582 else
7583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7584 $as_echo "no" >&6; }
7585 fi
7586 
7587 
7588           if test "x$FILE" = x; then
7589             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7590           fi
7591         else
7592           # Otherwise we believe it is a complete path. Use it as it is.
7593           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7594 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7595           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7596 $as_echo_n "checking for FILE... " >&6; }
7597           if test ! -x "$tool_specified"; then
7598             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7599 $as_echo "not found" >&6; }
7600             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7601           fi
7602           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7603 $as_echo "$tool_specified" >&6; }
7604         fi
7605       fi
7606     fi
7607 
7608   fi
7609 
7610 
7611 
7612   if test "x$FILE" = x; then
7613     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7614   fi
7615 
7616 
7617 
7618 
7619 
7620   # Publish this variable in the help.
7621 
7622 
7623   if [ -z "${FIND+x}" ]; then
7624     # The variable is not set by user, try to locate tool using the code snippet
7625     for ac_prog in find
7626 do
7627   # Extract the first word of "$ac_prog", so it can be a program name with args.
7628 set dummy $ac_prog; ac_word=$2
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7630 $as_echo_n "checking for $ac_word... " >&6; }
7631 if ${ac_cv_path_FIND+:} false; then :
7632   $as_echo_n "(cached) " >&6
7633 else
7634   case $FIND in
7635   [\\/]* | ?:[\\/]*)
7636   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7637   ;;
7638   *)
7639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7640 for as_dir in $PATH
7641 do
7642   IFS=$as_save_IFS
7643   test -z "$as_dir" && as_dir=.
7644     for ac_exec_ext in '' $ac_executable_extensions; do
7645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7646     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7648     break 2
7649   fi
7650 done
7651   done
7652 IFS=$as_save_IFS
7653 
7654   ;;
7655 esac
7656 fi
7657 FIND=$ac_cv_path_FIND
7658 if test -n "$FIND"; then
7659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7660 $as_echo "$FIND" >&6; }
7661 else
7662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7663 $as_echo "no" >&6; }
7664 fi
7665 
7666 
7667   test -n "$FIND" && break
7668 done
7669 
7670   else
7671     # The variable is set, but is it from the command line or the environment?
7672 
7673     # Try to remove the string !FIND! from our list.
7674     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7675     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7676       # If it failed, the variable was not from the command line. Ignore it,
7677       # but warn the user (except for BASH, which is always set by the calling BASH).
7678       if test "xFIND" != xBASH; then
7679         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7680 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7681       fi
7682       # Try to locate tool using the code snippet
7683       for ac_prog in find
7684 do
7685   # Extract the first word of "$ac_prog", so it can be a program name with args.
7686 set dummy $ac_prog; ac_word=$2
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7688 $as_echo_n "checking for $ac_word... " >&6; }
7689 if ${ac_cv_path_FIND+:} false; then :
7690   $as_echo_n "(cached) " >&6
7691 else
7692   case $FIND in
7693   [\\/]* | ?:[\\/]*)
7694   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7695   ;;
7696   *)
7697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7698 for as_dir in $PATH
7699 do
7700   IFS=$as_save_IFS
7701   test -z "$as_dir" && as_dir=.
7702     for ac_exec_ext in '' $ac_executable_extensions; do
7703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7704     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7706     break 2
7707   fi
7708 done
7709   done
7710 IFS=$as_save_IFS
7711 
7712   ;;
7713 esac
7714 fi
7715 FIND=$ac_cv_path_FIND
7716 if test -n "$FIND"; then
7717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7718 $as_echo "$FIND" >&6; }
7719 else
7720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7721 $as_echo "no" >&6; }
7722 fi
7723 
7724 
7725   test -n "$FIND" && break
7726 done
7727 
7728     else
7729       # If it succeeded, then it was overridden by the user. We will use it
7730       # for the tool.
7731 
7732       # First remove it from the list of overridden variables, so we can test
7733       # for unknown variables in the end.
7734       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7735 
7736       # Check if we try to supply an empty value
7737       if test "x$FIND" = x; then
7738         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7739 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7740         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7741 $as_echo_n "checking for FIND... " >&6; }
7742         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7743 $as_echo "disabled" >&6; }
7744       else
7745         # Check if the provided tool contains a complete path.
7746         tool_specified="$FIND"
7747         tool_basename="${tool_specified##*/}"
7748         if test "x$tool_basename" = "x$tool_specified"; then
7749           # A command without a complete path is provided, search $PATH.
7750           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7751 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7752           # Extract the first word of "$tool_basename", so it can be a program name with args.
7753 set dummy $tool_basename; ac_word=$2
7754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7755 $as_echo_n "checking for $ac_word... " >&6; }
7756 if ${ac_cv_path_FIND+:} false; then :
7757   $as_echo_n "(cached) " >&6
7758 else
7759   case $FIND in
7760   [\\/]* | ?:[\\/]*)
7761   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7762   ;;
7763   *)
7764   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7765 for as_dir in $PATH
7766 do
7767   IFS=$as_save_IFS
7768   test -z "$as_dir" && as_dir=.
7769     for ac_exec_ext in '' $ac_executable_extensions; do
7770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7771     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7773     break 2
7774   fi
7775 done
7776   done
7777 IFS=$as_save_IFS
7778 
7779   ;;
7780 esac
7781 fi
7782 FIND=$ac_cv_path_FIND
7783 if test -n "$FIND"; then
7784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7785 $as_echo "$FIND" >&6; }
7786 else
7787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7788 $as_echo "no" >&6; }
7789 fi
7790 
7791 
7792           if test "x$FIND" = x; then
7793             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7794           fi
7795         else
7796           # Otherwise we believe it is a complete path. Use it as it is.
7797           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7798 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7799           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7800 $as_echo_n "checking for FIND... " >&6; }
7801           if test ! -x "$tool_specified"; then
7802             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7803 $as_echo "not found" >&6; }
7804             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7805           fi
7806           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7807 $as_echo "$tool_specified" >&6; }
7808         fi
7809       fi
7810     fi
7811 
7812   fi
7813 
7814 
7815 
7816   if test "x$FIND" = x; then
7817     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7818   fi
7819 
7820 
7821 
7822 
7823 
7824   # Publish this variable in the help.
7825 
7826 
7827   if [ -z "${HEAD+x}" ]; then
7828     # The variable is not set by user, try to locate tool using the code snippet
7829     for ac_prog in head
7830 do
7831   # Extract the first word of "$ac_prog", so it can be a program name with args.
7832 set dummy $ac_prog; ac_word=$2
7833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7834 $as_echo_n "checking for $ac_word... " >&6; }
7835 if ${ac_cv_path_HEAD+:} false; then :
7836   $as_echo_n "(cached) " >&6
7837 else
7838   case $HEAD in
7839   [\\/]* | ?:[\\/]*)
7840   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7841   ;;
7842   *)
7843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7844 for as_dir in $PATH
7845 do
7846   IFS=$as_save_IFS
7847   test -z "$as_dir" && as_dir=.
7848     for ac_exec_ext in '' $ac_executable_extensions; do
7849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7850     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7852     break 2
7853   fi
7854 done
7855   done
7856 IFS=$as_save_IFS
7857 
7858   ;;
7859 esac
7860 fi
7861 HEAD=$ac_cv_path_HEAD
7862 if test -n "$HEAD"; then
7863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7864 $as_echo "$HEAD" >&6; }
7865 else
7866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7867 $as_echo "no" >&6; }
7868 fi
7869 
7870 
7871   test -n "$HEAD" && break
7872 done
7873 
7874   else
7875     # The variable is set, but is it from the command line or the environment?
7876 
7877     # Try to remove the string !HEAD! from our list.
7878     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7879     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7880       # If it failed, the variable was not from the command line. Ignore it,
7881       # but warn the user (except for BASH, which is always set by the calling BASH).
7882       if test "xHEAD" != xBASH; then
7883         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7884 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7885       fi
7886       # Try to locate tool using the code snippet
7887       for ac_prog in head
7888 do
7889   # Extract the first word of "$ac_prog", so it can be a program name with args.
7890 set dummy $ac_prog; ac_word=$2
7891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7892 $as_echo_n "checking for $ac_word... " >&6; }
7893 if ${ac_cv_path_HEAD+:} false; then :
7894   $as_echo_n "(cached) " >&6
7895 else
7896   case $HEAD in
7897   [\\/]* | ?:[\\/]*)
7898   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7899   ;;
7900   *)
7901   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7902 for as_dir in $PATH
7903 do
7904   IFS=$as_save_IFS
7905   test -z "$as_dir" && as_dir=.
7906     for ac_exec_ext in '' $ac_executable_extensions; do
7907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7908     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7910     break 2
7911   fi
7912 done
7913   done
7914 IFS=$as_save_IFS
7915 
7916   ;;
7917 esac
7918 fi
7919 HEAD=$ac_cv_path_HEAD
7920 if test -n "$HEAD"; then
7921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7922 $as_echo "$HEAD" >&6; }
7923 else
7924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7925 $as_echo "no" >&6; }
7926 fi
7927 
7928 
7929   test -n "$HEAD" && break
7930 done
7931 
7932     else
7933       # If it succeeded, then it was overridden by the user. We will use it
7934       # for the tool.
7935 
7936       # First remove it from the list of overridden variables, so we can test
7937       # for unknown variables in the end.
7938       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7939 
7940       # Check if we try to supply an empty value
7941       if test "x$HEAD" = x; then
7942         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7943 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7944         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7945 $as_echo_n "checking for HEAD... " >&6; }
7946         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7947 $as_echo "disabled" >&6; }
7948       else
7949         # Check if the provided tool contains a complete path.
7950         tool_specified="$HEAD"
7951         tool_basename="${tool_specified##*/}"
7952         if test "x$tool_basename" = "x$tool_specified"; then
7953           # A command without a complete path is provided, search $PATH.
7954           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7955 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7956           # Extract the first word of "$tool_basename", so it can be a program name with args.
7957 set dummy $tool_basename; ac_word=$2
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7959 $as_echo_n "checking for $ac_word... " >&6; }
7960 if ${ac_cv_path_HEAD+:} false; then :
7961   $as_echo_n "(cached) " >&6
7962 else
7963   case $HEAD in
7964   [\\/]* | ?:[\\/]*)
7965   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7966   ;;
7967   *)
7968   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7969 for as_dir in $PATH
7970 do
7971   IFS=$as_save_IFS
7972   test -z "$as_dir" && as_dir=.
7973     for ac_exec_ext in '' $ac_executable_extensions; do
7974   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7975     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7977     break 2
7978   fi
7979 done
7980   done
7981 IFS=$as_save_IFS
7982 
7983   ;;
7984 esac
7985 fi
7986 HEAD=$ac_cv_path_HEAD
7987 if test -n "$HEAD"; then
7988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7989 $as_echo "$HEAD" >&6; }
7990 else
7991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7992 $as_echo "no" >&6; }
7993 fi
7994 
7995 
7996           if test "x$HEAD" = x; then
7997             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7998           fi
7999         else
8000           # Otherwise we believe it is a complete path. Use it as it is.
8001           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8002 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8003           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8004 $as_echo_n "checking for HEAD... " >&6; }
8005           if test ! -x "$tool_specified"; then
8006             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8007 $as_echo "not found" >&6; }
8008             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8009           fi
8010           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8011 $as_echo "$tool_specified" >&6; }
8012         fi
8013       fi
8014     fi
8015 
8016   fi
8017 
8018 
8019 
8020   if test "x$HEAD" = x; then
8021     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8022   fi
8023 
8024 
8025 
8026 
8027 
8028   # Publish this variable in the help.
8029 
8030 
8031   if [ -z "${LN+x}" ]; then
8032     # The variable is not set by user, try to locate tool using the code snippet
8033     for ac_prog in ln
8034 do
8035   # Extract the first word of "$ac_prog", so it can be a program name with args.
8036 set dummy $ac_prog; ac_word=$2
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8038 $as_echo_n "checking for $ac_word... " >&6; }
8039 if ${ac_cv_path_LN+:} false; then :
8040   $as_echo_n "(cached) " >&6
8041 else
8042   case $LN in
8043   [\\/]* | ?:[\\/]*)
8044   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8045   ;;
8046   *)
8047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8048 for as_dir in $PATH
8049 do
8050   IFS=$as_save_IFS
8051   test -z "$as_dir" && as_dir=.
8052     for ac_exec_ext in '' $ac_executable_extensions; do
8053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8054     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8056     break 2
8057   fi
8058 done
8059   done
8060 IFS=$as_save_IFS
8061 
8062   ;;
8063 esac
8064 fi
8065 LN=$ac_cv_path_LN
8066 if test -n "$LN"; then
8067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8068 $as_echo "$LN" >&6; }
8069 else
8070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8071 $as_echo "no" >&6; }
8072 fi
8073 
8074 
8075   test -n "$LN" && break
8076 done
8077 
8078   else
8079     # The variable is set, but is it from the command line or the environment?
8080 
8081     # Try to remove the string !LN! from our list.
8082     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8083     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8084       # If it failed, the variable was not from the command line. Ignore it,
8085       # but warn the user (except for BASH, which is always set by the calling BASH).
8086       if test "xLN" != xBASH; then
8087         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8088 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8089       fi
8090       # Try to locate tool using the code snippet
8091       for ac_prog in ln
8092 do
8093   # Extract the first word of "$ac_prog", so it can be a program name with args.
8094 set dummy $ac_prog; ac_word=$2
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8096 $as_echo_n "checking for $ac_word... " >&6; }
8097 if ${ac_cv_path_LN+:} false; then :
8098   $as_echo_n "(cached) " >&6
8099 else
8100   case $LN in
8101   [\\/]* | ?:[\\/]*)
8102   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8103   ;;
8104   *)
8105   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8106 for as_dir in $PATH
8107 do
8108   IFS=$as_save_IFS
8109   test -z "$as_dir" && as_dir=.
8110     for ac_exec_ext in '' $ac_executable_extensions; do
8111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8112     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8114     break 2
8115   fi
8116 done
8117   done
8118 IFS=$as_save_IFS
8119 
8120   ;;
8121 esac
8122 fi
8123 LN=$ac_cv_path_LN
8124 if test -n "$LN"; then
8125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8126 $as_echo "$LN" >&6; }
8127 else
8128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8129 $as_echo "no" >&6; }
8130 fi
8131 
8132 
8133   test -n "$LN" && break
8134 done
8135 
8136     else
8137       # If it succeeded, then it was overridden by the user. We will use it
8138       # for the tool.
8139 
8140       # First remove it from the list of overridden variables, so we can test
8141       # for unknown variables in the end.
8142       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8143 
8144       # Check if we try to supply an empty value
8145       if test "x$LN" = x; then
8146         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8147 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8148         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8149 $as_echo_n "checking for LN... " >&6; }
8150         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8151 $as_echo "disabled" >&6; }
8152       else
8153         # Check if the provided tool contains a complete path.
8154         tool_specified="$LN"
8155         tool_basename="${tool_specified##*/}"
8156         if test "x$tool_basename" = "x$tool_specified"; then
8157           # A command without a complete path is provided, search $PATH.
8158           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8159 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8160           # Extract the first word of "$tool_basename", so it can be a program name with args.
8161 set dummy $tool_basename; ac_word=$2
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8163 $as_echo_n "checking for $ac_word... " >&6; }
8164 if ${ac_cv_path_LN+:} false; then :
8165   $as_echo_n "(cached) " >&6
8166 else
8167   case $LN in
8168   [\\/]* | ?:[\\/]*)
8169   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8170   ;;
8171   *)
8172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8173 for as_dir in $PATH
8174 do
8175   IFS=$as_save_IFS
8176   test -z "$as_dir" && as_dir=.
8177     for ac_exec_ext in '' $ac_executable_extensions; do
8178   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8179     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8181     break 2
8182   fi
8183 done
8184   done
8185 IFS=$as_save_IFS
8186 
8187   ;;
8188 esac
8189 fi
8190 LN=$ac_cv_path_LN
8191 if test -n "$LN"; then
8192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8193 $as_echo "$LN" >&6; }
8194 else
8195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8196 $as_echo "no" >&6; }
8197 fi
8198 
8199 
8200           if test "x$LN" = x; then
8201             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8202           fi
8203         else
8204           # Otherwise we believe it is a complete path. Use it as it is.
8205           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8206 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8207           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8208 $as_echo_n "checking for LN... " >&6; }
8209           if test ! -x "$tool_specified"; then
8210             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8211 $as_echo "not found" >&6; }
8212             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8213           fi
8214           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8215 $as_echo "$tool_specified" >&6; }
8216         fi
8217       fi
8218     fi
8219 
8220   fi
8221 
8222 
8223 
8224   if test "x$LN" = x; then
8225     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8226   fi
8227 
8228 
8229 
8230 
8231 
8232   # Publish this variable in the help.
8233 
8234 
8235   if [ -z "${LS+x}" ]; then
8236     # The variable is not set by user, try to locate tool using the code snippet
8237     for ac_prog in ls
8238 do
8239   # Extract the first word of "$ac_prog", so it can be a program name with args.
8240 set dummy $ac_prog; ac_word=$2
8241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8242 $as_echo_n "checking for $ac_word... " >&6; }
8243 if ${ac_cv_path_LS+:} false; then :
8244   $as_echo_n "(cached) " >&6
8245 else
8246   case $LS in
8247   [\\/]* | ?:[\\/]*)
8248   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8249   ;;
8250   *)
8251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8252 for as_dir in $PATH
8253 do
8254   IFS=$as_save_IFS
8255   test -z "$as_dir" && as_dir=.
8256     for ac_exec_ext in '' $ac_executable_extensions; do
8257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8258     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8260     break 2
8261   fi
8262 done
8263   done
8264 IFS=$as_save_IFS
8265 
8266   ;;
8267 esac
8268 fi
8269 LS=$ac_cv_path_LS
8270 if test -n "$LS"; then
8271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8272 $as_echo "$LS" >&6; }
8273 else
8274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8275 $as_echo "no" >&6; }
8276 fi
8277 
8278 
8279   test -n "$LS" && break
8280 done
8281 
8282   else
8283     # The variable is set, but is it from the command line or the environment?
8284 
8285     # Try to remove the string !LS! from our list.
8286     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8287     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8288       # If it failed, the variable was not from the command line. Ignore it,
8289       # but warn the user (except for BASH, which is always set by the calling BASH).
8290       if test "xLS" != xBASH; then
8291         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8292 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8293       fi
8294       # Try to locate tool using the code snippet
8295       for ac_prog in ls
8296 do
8297   # Extract the first word of "$ac_prog", so it can be a program name with args.
8298 set dummy $ac_prog; ac_word=$2
8299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8300 $as_echo_n "checking for $ac_word... " >&6; }
8301 if ${ac_cv_path_LS+:} false; then :
8302   $as_echo_n "(cached) " >&6
8303 else
8304   case $LS in
8305   [\\/]* | ?:[\\/]*)
8306   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8307   ;;
8308   *)
8309   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8310 for as_dir in $PATH
8311 do
8312   IFS=$as_save_IFS
8313   test -z "$as_dir" && as_dir=.
8314     for ac_exec_ext in '' $ac_executable_extensions; do
8315   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8316     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8317     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8318     break 2
8319   fi
8320 done
8321   done
8322 IFS=$as_save_IFS
8323 
8324   ;;
8325 esac
8326 fi
8327 LS=$ac_cv_path_LS
8328 if test -n "$LS"; then
8329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8330 $as_echo "$LS" >&6; }
8331 else
8332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8333 $as_echo "no" >&6; }
8334 fi
8335 
8336 
8337   test -n "$LS" && break
8338 done
8339 
8340     else
8341       # If it succeeded, then it was overridden by the user. We will use it
8342       # for the tool.
8343 
8344       # First remove it from the list of overridden variables, so we can test
8345       # for unknown variables in the end.
8346       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8347 
8348       # Check if we try to supply an empty value
8349       if test "x$LS" = x; then
8350         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8351 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8352         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8353 $as_echo_n "checking for LS... " >&6; }
8354         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8355 $as_echo "disabled" >&6; }
8356       else
8357         # Check if the provided tool contains a complete path.
8358         tool_specified="$LS"
8359         tool_basename="${tool_specified##*/}"
8360         if test "x$tool_basename" = "x$tool_specified"; then
8361           # A command without a complete path is provided, search $PATH.
8362           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8363 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8364           # Extract the first word of "$tool_basename", so it can be a program name with args.
8365 set dummy $tool_basename; ac_word=$2
8366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8367 $as_echo_n "checking for $ac_word... " >&6; }
8368 if ${ac_cv_path_LS+:} false; then :
8369   $as_echo_n "(cached) " >&6
8370 else
8371   case $LS in
8372   [\\/]* | ?:[\\/]*)
8373   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8374   ;;
8375   *)
8376   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8377 for as_dir in $PATH
8378 do
8379   IFS=$as_save_IFS
8380   test -z "$as_dir" && as_dir=.
8381     for ac_exec_ext in '' $ac_executable_extensions; do
8382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8383     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8385     break 2
8386   fi
8387 done
8388   done
8389 IFS=$as_save_IFS
8390 
8391   ;;
8392 esac
8393 fi
8394 LS=$ac_cv_path_LS
8395 if test -n "$LS"; then
8396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8397 $as_echo "$LS" >&6; }
8398 else
8399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8400 $as_echo "no" >&6; }
8401 fi
8402 
8403 
8404           if test "x$LS" = x; then
8405             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8406           fi
8407         else
8408           # Otherwise we believe it is a complete path. Use it as it is.
8409           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8410 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8411           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8412 $as_echo_n "checking for LS... " >&6; }
8413           if test ! -x "$tool_specified"; then
8414             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8415 $as_echo "not found" >&6; }
8416             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8417           fi
8418           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8419 $as_echo "$tool_specified" >&6; }
8420         fi
8421       fi
8422     fi
8423 
8424   fi
8425 
8426 
8427 
8428   if test "x$LS" = x; then
8429     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8430   fi
8431 
8432 
8433 
8434 
8435 
8436   # Publish this variable in the help.
8437 
8438 
8439   if [ -z "${MKDIR+x}" ]; then
8440     # The variable is not set by user, try to locate tool using the code snippet
8441     for ac_prog in mkdir
8442 do
8443   # Extract the first word of "$ac_prog", so it can be a program name with args.
8444 set dummy $ac_prog; ac_word=$2
8445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8446 $as_echo_n "checking for $ac_word... " >&6; }
8447 if ${ac_cv_path_MKDIR+:} false; then :
8448   $as_echo_n "(cached) " >&6
8449 else
8450   case $MKDIR in
8451   [\\/]* | ?:[\\/]*)
8452   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8453   ;;
8454   *)
8455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8456 for as_dir in $PATH
8457 do
8458   IFS=$as_save_IFS
8459   test -z "$as_dir" && as_dir=.
8460     for ac_exec_ext in '' $ac_executable_extensions; do
8461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8462     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8464     break 2
8465   fi
8466 done
8467   done
8468 IFS=$as_save_IFS
8469 
8470   ;;
8471 esac
8472 fi
8473 MKDIR=$ac_cv_path_MKDIR
8474 if test -n "$MKDIR"; then
8475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8476 $as_echo "$MKDIR" >&6; }
8477 else
8478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8479 $as_echo "no" >&6; }
8480 fi
8481 
8482 
8483   test -n "$MKDIR" && break
8484 done
8485 
8486   else
8487     # The variable is set, but is it from the command line or the environment?
8488 
8489     # Try to remove the string !MKDIR! from our list.
8490     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8491     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8492       # If it failed, the variable was not from the command line. Ignore it,
8493       # but warn the user (except for BASH, which is always set by the calling BASH).
8494       if test "xMKDIR" != xBASH; then
8495         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8496 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8497       fi
8498       # Try to locate tool using the code snippet
8499       for ac_prog in mkdir
8500 do
8501   # Extract the first word of "$ac_prog", so it can be a program name with args.
8502 set dummy $ac_prog; ac_word=$2
8503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8504 $as_echo_n "checking for $ac_word... " >&6; }
8505 if ${ac_cv_path_MKDIR+:} false; then :
8506   $as_echo_n "(cached) " >&6
8507 else
8508   case $MKDIR in
8509   [\\/]* | ?:[\\/]*)
8510   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8511   ;;
8512   *)
8513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8514 for as_dir in $PATH
8515 do
8516   IFS=$as_save_IFS
8517   test -z "$as_dir" && as_dir=.
8518     for ac_exec_ext in '' $ac_executable_extensions; do
8519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8520     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8522     break 2
8523   fi
8524 done
8525   done
8526 IFS=$as_save_IFS
8527 
8528   ;;
8529 esac
8530 fi
8531 MKDIR=$ac_cv_path_MKDIR
8532 if test -n "$MKDIR"; then
8533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8534 $as_echo "$MKDIR" >&6; }
8535 else
8536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537 $as_echo "no" >&6; }
8538 fi
8539 
8540 
8541   test -n "$MKDIR" && break
8542 done
8543 
8544     else
8545       # If it succeeded, then it was overridden by the user. We will use it
8546       # for the tool.
8547 
8548       # First remove it from the list of overridden variables, so we can test
8549       # for unknown variables in the end.
8550       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8551 
8552       # Check if we try to supply an empty value
8553       if test "x$MKDIR" = x; then
8554         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8555 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8556         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8557 $as_echo_n "checking for MKDIR... " >&6; }
8558         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8559 $as_echo "disabled" >&6; }
8560       else
8561         # Check if the provided tool contains a complete path.
8562         tool_specified="$MKDIR"
8563         tool_basename="${tool_specified##*/}"
8564         if test "x$tool_basename" = "x$tool_specified"; then
8565           # A command without a complete path is provided, search $PATH.
8566           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8567 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8568           # Extract the first word of "$tool_basename", so it can be a program name with args.
8569 set dummy $tool_basename; ac_word=$2
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8571 $as_echo_n "checking for $ac_word... " >&6; }
8572 if ${ac_cv_path_MKDIR+:} false; then :
8573   $as_echo_n "(cached) " >&6
8574 else
8575   case $MKDIR in
8576   [\\/]* | ?:[\\/]*)
8577   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8578   ;;
8579   *)
8580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8581 for as_dir in $PATH
8582 do
8583   IFS=$as_save_IFS
8584   test -z "$as_dir" && as_dir=.
8585     for ac_exec_ext in '' $ac_executable_extensions; do
8586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8587     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8589     break 2
8590   fi
8591 done
8592   done
8593 IFS=$as_save_IFS
8594 
8595   ;;
8596 esac
8597 fi
8598 MKDIR=$ac_cv_path_MKDIR
8599 if test -n "$MKDIR"; then
8600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8601 $as_echo "$MKDIR" >&6; }
8602 else
8603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8604 $as_echo "no" >&6; }
8605 fi
8606 
8607 
8608           if test "x$MKDIR" = x; then
8609             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8610           fi
8611         else
8612           # Otherwise we believe it is a complete path. Use it as it is.
8613           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8614 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8615           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8616 $as_echo_n "checking for MKDIR... " >&6; }
8617           if test ! -x "$tool_specified"; then
8618             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8619 $as_echo "not found" >&6; }
8620             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8621           fi
8622           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8623 $as_echo "$tool_specified" >&6; }
8624         fi
8625       fi
8626     fi
8627 
8628   fi
8629 
8630 
8631 
8632   if test "x$MKDIR" = x; then
8633     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8634   fi
8635 
8636 
8637 
8638 
8639 
8640   # Publish this variable in the help.
8641 
8642 
8643   if [ -z "${MKTEMP+x}" ]; then
8644     # The variable is not set by user, try to locate tool using the code snippet
8645     for ac_prog in mktemp
8646 do
8647   # Extract the first word of "$ac_prog", so it can be a program name with args.
8648 set dummy $ac_prog; ac_word=$2
8649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8650 $as_echo_n "checking for $ac_word... " >&6; }
8651 if ${ac_cv_path_MKTEMP+:} false; then :
8652   $as_echo_n "(cached) " >&6
8653 else
8654   case $MKTEMP in
8655   [\\/]* | ?:[\\/]*)
8656   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8657   ;;
8658   *)
8659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8660 for as_dir in $PATH
8661 do
8662   IFS=$as_save_IFS
8663   test -z "$as_dir" && as_dir=.
8664     for ac_exec_ext in '' $ac_executable_extensions; do
8665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8666     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8668     break 2
8669   fi
8670 done
8671   done
8672 IFS=$as_save_IFS
8673 
8674   ;;
8675 esac
8676 fi
8677 MKTEMP=$ac_cv_path_MKTEMP
8678 if test -n "$MKTEMP"; then
8679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8680 $as_echo "$MKTEMP" >&6; }
8681 else
8682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8683 $as_echo "no" >&6; }
8684 fi
8685 
8686 
8687   test -n "$MKTEMP" && break
8688 done
8689 
8690   else
8691     # The variable is set, but is it from the command line or the environment?
8692 
8693     # Try to remove the string !MKTEMP! from our list.
8694     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8695     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8696       # If it failed, the variable was not from the command line. Ignore it,
8697       # but warn the user (except for BASH, which is always set by the calling BASH).
8698       if test "xMKTEMP" != xBASH; then
8699         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8700 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8701       fi
8702       # Try to locate tool using the code snippet
8703       for ac_prog in mktemp
8704 do
8705   # Extract the first word of "$ac_prog", so it can be a program name with args.
8706 set dummy $ac_prog; ac_word=$2
8707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8708 $as_echo_n "checking for $ac_word... " >&6; }
8709 if ${ac_cv_path_MKTEMP+:} false; then :
8710   $as_echo_n "(cached) " >&6
8711 else
8712   case $MKTEMP in
8713   [\\/]* | ?:[\\/]*)
8714   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8715   ;;
8716   *)
8717   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8718 for as_dir in $PATH
8719 do
8720   IFS=$as_save_IFS
8721   test -z "$as_dir" && as_dir=.
8722     for ac_exec_ext in '' $ac_executable_extensions; do
8723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8724     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8726     break 2
8727   fi
8728 done
8729   done
8730 IFS=$as_save_IFS
8731 
8732   ;;
8733 esac
8734 fi
8735 MKTEMP=$ac_cv_path_MKTEMP
8736 if test -n "$MKTEMP"; then
8737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8738 $as_echo "$MKTEMP" >&6; }
8739 else
8740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8741 $as_echo "no" >&6; }
8742 fi
8743 
8744 
8745   test -n "$MKTEMP" && break
8746 done
8747 
8748     else
8749       # If it succeeded, then it was overridden by the user. We will use it
8750       # for the tool.
8751 
8752       # First remove it from the list of overridden variables, so we can test
8753       # for unknown variables in the end.
8754       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8755 
8756       # Check if we try to supply an empty value
8757       if test "x$MKTEMP" = x; then
8758         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8759 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8760         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8761 $as_echo_n "checking for MKTEMP... " >&6; }
8762         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8763 $as_echo "disabled" >&6; }
8764       else
8765         # Check if the provided tool contains a complete path.
8766         tool_specified="$MKTEMP"
8767         tool_basename="${tool_specified##*/}"
8768         if test "x$tool_basename" = "x$tool_specified"; then
8769           # A command without a complete path is provided, search $PATH.
8770           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8771 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8772           # Extract the first word of "$tool_basename", so it can be a program name with args.
8773 set dummy $tool_basename; ac_word=$2
8774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8775 $as_echo_n "checking for $ac_word... " >&6; }
8776 if ${ac_cv_path_MKTEMP+:} false; then :
8777   $as_echo_n "(cached) " >&6
8778 else
8779   case $MKTEMP in
8780   [\\/]* | ?:[\\/]*)
8781   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8782   ;;
8783   *)
8784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8785 for as_dir in $PATH
8786 do
8787   IFS=$as_save_IFS
8788   test -z "$as_dir" && as_dir=.
8789     for ac_exec_ext in '' $ac_executable_extensions; do
8790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8791     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8793     break 2
8794   fi
8795 done
8796   done
8797 IFS=$as_save_IFS
8798 
8799   ;;
8800 esac
8801 fi
8802 MKTEMP=$ac_cv_path_MKTEMP
8803 if test -n "$MKTEMP"; then
8804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8805 $as_echo "$MKTEMP" >&6; }
8806 else
8807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8808 $as_echo "no" >&6; }
8809 fi
8810 
8811 
8812           if test "x$MKTEMP" = x; then
8813             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8814           fi
8815         else
8816           # Otherwise we believe it is a complete path. Use it as it is.
8817           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8818 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8819           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8820 $as_echo_n "checking for MKTEMP... " >&6; }
8821           if test ! -x "$tool_specified"; then
8822             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8823 $as_echo "not found" >&6; }
8824             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8825           fi
8826           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8827 $as_echo "$tool_specified" >&6; }
8828         fi
8829       fi
8830     fi
8831 
8832   fi
8833 
8834 
8835 
8836   if test "x$MKTEMP" = x; then
8837     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8838   fi
8839 
8840 
8841 
8842 
8843 
8844   # Publish this variable in the help.
8845 
8846 
8847   if [ -z "${MV+x}" ]; then
8848     # The variable is not set by user, try to locate tool using the code snippet
8849     for ac_prog in mv
8850 do
8851   # Extract the first word of "$ac_prog", so it can be a program name with args.
8852 set dummy $ac_prog; ac_word=$2
8853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8854 $as_echo_n "checking for $ac_word... " >&6; }
8855 if ${ac_cv_path_MV+:} false; then :
8856   $as_echo_n "(cached) " >&6
8857 else
8858   case $MV in
8859   [\\/]* | ?:[\\/]*)
8860   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8861   ;;
8862   *)
8863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8864 for as_dir in $PATH
8865 do
8866   IFS=$as_save_IFS
8867   test -z "$as_dir" && as_dir=.
8868     for ac_exec_ext in '' $ac_executable_extensions; do
8869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8870     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8872     break 2
8873   fi
8874 done
8875   done
8876 IFS=$as_save_IFS
8877 
8878   ;;
8879 esac
8880 fi
8881 MV=$ac_cv_path_MV
8882 if test -n "$MV"; then
8883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8884 $as_echo "$MV" >&6; }
8885 else
8886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8887 $as_echo "no" >&6; }
8888 fi
8889 
8890 
8891   test -n "$MV" && break
8892 done
8893 
8894   else
8895     # The variable is set, but is it from the command line or the environment?
8896 
8897     # Try to remove the string !MV! from our list.
8898     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8899     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8900       # If it failed, the variable was not from the command line. Ignore it,
8901       # but warn the user (except for BASH, which is always set by the calling BASH).
8902       if test "xMV" != xBASH; then
8903         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8904 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8905       fi
8906       # Try to locate tool using the code snippet
8907       for ac_prog in mv
8908 do
8909   # Extract the first word of "$ac_prog", so it can be a program name with args.
8910 set dummy $ac_prog; ac_word=$2
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8912 $as_echo_n "checking for $ac_word... " >&6; }
8913 if ${ac_cv_path_MV+:} false; then :
8914   $as_echo_n "(cached) " >&6
8915 else
8916   case $MV in
8917   [\\/]* | ?:[\\/]*)
8918   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8919   ;;
8920   *)
8921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8922 for as_dir in $PATH
8923 do
8924   IFS=$as_save_IFS
8925   test -z "$as_dir" && as_dir=.
8926     for ac_exec_ext in '' $ac_executable_extensions; do
8927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8928     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8930     break 2
8931   fi
8932 done
8933   done
8934 IFS=$as_save_IFS
8935 
8936   ;;
8937 esac
8938 fi
8939 MV=$ac_cv_path_MV
8940 if test -n "$MV"; then
8941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8942 $as_echo "$MV" >&6; }
8943 else
8944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8945 $as_echo "no" >&6; }
8946 fi
8947 
8948 
8949   test -n "$MV" && break
8950 done
8951 
8952     else
8953       # If it succeeded, then it was overridden by the user. We will use it
8954       # for the tool.
8955 
8956       # First remove it from the list of overridden variables, so we can test
8957       # for unknown variables in the end.
8958       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8959 
8960       # Check if we try to supply an empty value
8961       if test "x$MV" = x; then
8962         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8963 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8964         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8965 $as_echo_n "checking for MV... " >&6; }
8966         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8967 $as_echo "disabled" >&6; }
8968       else
8969         # Check if the provided tool contains a complete path.
8970         tool_specified="$MV"
8971         tool_basename="${tool_specified##*/}"
8972         if test "x$tool_basename" = "x$tool_specified"; then
8973           # A command without a complete path is provided, search $PATH.
8974           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8975 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8976           # Extract the first word of "$tool_basename", so it can be a program name with args.
8977 set dummy $tool_basename; ac_word=$2
8978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8979 $as_echo_n "checking for $ac_word... " >&6; }
8980 if ${ac_cv_path_MV+:} false; then :
8981   $as_echo_n "(cached) " >&6
8982 else
8983   case $MV in
8984   [\\/]* | ?:[\\/]*)
8985   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8986   ;;
8987   *)
8988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8989 for as_dir in $PATH
8990 do
8991   IFS=$as_save_IFS
8992   test -z "$as_dir" && as_dir=.
8993     for ac_exec_ext in '' $ac_executable_extensions; do
8994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8995     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8997     break 2
8998   fi
8999 done
9000   done
9001 IFS=$as_save_IFS
9002 
9003   ;;
9004 esac
9005 fi
9006 MV=$ac_cv_path_MV
9007 if test -n "$MV"; then
9008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9009 $as_echo "$MV" >&6; }
9010 else
9011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9012 $as_echo "no" >&6; }
9013 fi
9014 
9015 
9016           if test "x$MV" = x; then
9017             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9018           fi
9019         else
9020           # Otherwise we believe it is a complete path. Use it as it is.
9021           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9022 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9023           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9024 $as_echo_n "checking for MV... " >&6; }
9025           if test ! -x "$tool_specified"; then
9026             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9027 $as_echo "not found" >&6; }
9028             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9029           fi
9030           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9031 $as_echo "$tool_specified" >&6; }
9032         fi
9033       fi
9034     fi
9035 
9036   fi
9037 
9038 
9039 
9040   if test "x$MV" = x; then
9041     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9042   fi
9043 
9044 
9045 
9046 
9047 
9048   # Publish this variable in the help.
9049 
9050 
9051   if [ -z "${NAWK+x}" ]; then
9052     # The variable is not set by user, try to locate tool using the code snippet
9053     for ac_prog in nawk gawk awk
9054 do
9055   # Extract the first word of "$ac_prog", so it can be a program name with args.
9056 set dummy $ac_prog; ac_word=$2
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9058 $as_echo_n "checking for $ac_word... " >&6; }
9059 if ${ac_cv_path_NAWK+:} false; then :
9060   $as_echo_n "(cached) " >&6
9061 else
9062   case $NAWK in
9063   [\\/]* | ?:[\\/]*)
9064   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9065   ;;
9066   *)
9067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9068 for as_dir in $PATH
9069 do
9070   IFS=$as_save_IFS
9071   test -z "$as_dir" && as_dir=.
9072     for ac_exec_ext in '' $ac_executable_extensions; do
9073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9074     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9076     break 2
9077   fi
9078 done
9079   done
9080 IFS=$as_save_IFS
9081 
9082   ;;
9083 esac
9084 fi
9085 NAWK=$ac_cv_path_NAWK
9086 if test -n "$NAWK"; then
9087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9088 $as_echo "$NAWK" >&6; }
9089 else
9090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091 $as_echo "no" >&6; }
9092 fi
9093 
9094 
9095   test -n "$NAWK" && break
9096 done
9097 
9098   else
9099     # The variable is set, but is it from the command line or the environment?
9100 
9101     # Try to remove the string !NAWK! from our list.
9102     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9103     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9104       # If it failed, the variable was not from the command line. Ignore it,
9105       # but warn the user (except for BASH, which is always set by the calling BASH).
9106       if test "xNAWK" != xBASH; then
9107         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9108 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9109       fi
9110       # Try to locate tool using the code snippet
9111       for ac_prog in nawk gawk awk
9112 do
9113   # Extract the first word of "$ac_prog", so it can be a program name with args.
9114 set dummy $ac_prog; ac_word=$2
9115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9116 $as_echo_n "checking for $ac_word... " >&6; }
9117 if ${ac_cv_path_NAWK+:} false; then :
9118   $as_echo_n "(cached) " >&6
9119 else
9120   case $NAWK in
9121   [\\/]* | ?:[\\/]*)
9122   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9123   ;;
9124   *)
9125   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9126 for as_dir in $PATH
9127 do
9128   IFS=$as_save_IFS
9129   test -z "$as_dir" && as_dir=.
9130     for ac_exec_ext in '' $ac_executable_extensions; do
9131   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9132     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9134     break 2
9135   fi
9136 done
9137   done
9138 IFS=$as_save_IFS
9139 
9140   ;;
9141 esac
9142 fi
9143 NAWK=$ac_cv_path_NAWK
9144 if test -n "$NAWK"; then
9145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9146 $as_echo "$NAWK" >&6; }
9147 else
9148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9149 $as_echo "no" >&6; }
9150 fi
9151 
9152 
9153   test -n "$NAWK" && break
9154 done
9155 
9156     else
9157       # If it succeeded, then it was overridden by the user. We will use it
9158       # for the tool.
9159 
9160       # First remove it from the list of overridden variables, so we can test
9161       # for unknown variables in the end.
9162       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9163 
9164       # Check if we try to supply an empty value
9165       if test "x$NAWK" = x; then
9166         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9167 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9168         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9169 $as_echo_n "checking for NAWK... " >&6; }
9170         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9171 $as_echo "disabled" >&6; }
9172       else
9173         # Check if the provided tool contains a complete path.
9174         tool_specified="$NAWK"
9175         tool_basename="${tool_specified##*/}"
9176         if test "x$tool_basename" = "x$tool_specified"; then
9177           # A command without a complete path is provided, search $PATH.
9178           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9179 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9180           # Extract the first word of "$tool_basename", so it can be a program name with args.
9181 set dummy $tool_basename; ac_word=$2
9182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9183 $as_echo_n "checking for $ac_word... " >&6; }
9184 if ${ac_cv_path_NAWK+:} false; then :
9185   $as_echo_n "(cached) " >&6
9186 else
9187   case $NAWK in
9188   [\\/]* | ?:[\\/]*)
9189   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9190   ;;
9191   *)
9192   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9193 for as_dir in $PATH
9194 do
9195   IFS=$as_save_IFS
9196   test -z "$as_dir" && as_dir=.
9197     for ac_exec_ext in '' $ac_executable_extensions; do
9198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9199     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9201     break 2
9202   fi
9203 done
9204   done
9205 IFS=$as_save_IFS
9206 
9207   ;;
9208 esac
9209 fi
9210 NAWK=$ac_cv_path_NAWK
9211 if test -n "$NAWK"; then
9212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9213 $as_echo "$NAWK" >&6; }
9214 else
9215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216 $as_echo "no" >&6; }
9217 fi
9218 
9219 
9220           if test "x$NAWK" = x; then
9221             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9222           fi
9223         else
9224           # Otherwise we believe it is a complete path. Use it as it is.
9225           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9226 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9227           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9228 $as_echo_n "checking for NAWK... " >&6; }
9229           if test ! -x "$tool_specified"; then
9230             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9231 $as_echo "not found" >&6; }
9232             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9233           fi
9234           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9235 $as_echo "$tool_specified" >&6; }
9236         fi
9237       fi
9238     fi
9239 
9240   fi
9241 
9242 
9243 
9244   if test "x$NAWK" = x; then
9245     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9246   fi
9247 
9248 
9249 
9250 
9251 
9252   # Publish this variable in the help.
9253 
9254 
9255   if [ -z "${PRINTF+x}" ]; then
9256     # The variable is not set by user, try to locate tool using the code snippet
9257     for ac_prog in printf
9258 do
9259   # Extract the first word of "$ac_prog", so it can be a program name with args.
9260 set dummy $ac_prog; ac_word=$2
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9262 $as_echo_n "checking for $ac_word... " >&6; }
9263 if ${ac_cv_path_PRINTF+:} false; then :
9264   $as_echo_n "(cached) " >&6
9265 else
9266   case $PRINTF in
9267   [\\/]* | ?:[\\/]*)
9268   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9269   ;;
9270   *)
9271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9272 for as_dir in $PATH
9273 do
9274   IFS=$as_save_IFS
9275   test -z "$as_dir" && as_dir=.
9276     for ac_exec_ext in '' $ac_executable_extensions; do
9277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9278     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9280     break 2
9281   fi
9282 done
9283   done
9284 IFS=$as_save_IFS
9285 
9286   ;;
9287 esac
9288 fi
9289 PRINTF=$ac_cv_path_PRINTF
9290 if test -n "$PRINTF"; then
9291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9292 $as_echo "$PRINTF" >&6; }
9293 else
9294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9295 $as_echo "no" >&6; }
9296 fi
9297 
9298 
9299   test -n "$PRINTF" && break
9300 done
9301 
9302   else
9303     # The variable is set, but is it from the command line or the environment?
9304 
9305     # Try to remove the string !PRINTF! from our list.
9306     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9307     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9308       # If it failed, the variable was not from the command line. Ignore it,
9309       # but warn the user (except for BASH, which is always set by the calling BASH).
9310       if test "xPRINTF" != xBASH; then
9311         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9312 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9313       fi
9314       # Try to locate tool using the code snippet
9315       for ac_prog in printf
9316 do
9317   # Extract the first word of "$ac_prog", so it can be a program name with args.
9318 set dummy $ac_prog; ac_word=$2
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9320 $as_echo_n "checking for $ac_word... " >&6; }
9321 if ${ac_cv_path_PRINTF+:} false; then :
9322   $as_echo_n "(cached) " >&6
9323 else
9324   case $PRINTF in
9325   [\\/]* | ?:[\\/]*)
9326   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9327   ;;
9328   *)
9329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9330 for as_dir in $PATH
9331 do
9332   IFS=$as_save_IFS
9333   test -z "$as_dir" && as_dir=.
9334     for ac_exec_ext in '' $ac_executable_extensions; do
9335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9336     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9338     break 2
9339   fi
9340 done
9341   done
9342 IFS=$as_save_IFS
9343 
9344   ;;
9345 esac
9346 fi
9347 PRINTF=$ac_cv_path_PRINTF
9348 if test -n "$PRINTF"; then
9349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9350 $as_echo "$PRINTF" >&6; }
9351 else
9352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9353 $as_echo "no" >&6; }
9354 fi
9355 
9356 
9357   test -n "$PRINTF" && break
9358 done
9359 
9360     else
9361       # If it succeeded, then it was overridden by the user. We will use it
9362       # for the tool.
9363 
9364       # First remove it from the list of overridden variables, so we can test
9365       # for unknown variables in the end.
9366       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9367 
9368       # Check if we try to supply an empty value
9369       if test "x$PRINTF" = x; then
9370         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9371 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9372         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9373 $as_echo_n "checking for PRINTF... " >&6; }
9374         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9375 $as_echo "disabled" >&6; }
9376       else
9377         # Check if the provided tool contains a complete path.
9378         tool_specified="$PRINTF"
9379         tool_basename="${tool_specified##*/}"
9380         if test "x$tool_basename" = "x$tool_specified"; then
9381           # A command without a complete path is provided, search $PATH.
9382           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9383 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9384           # Extract the first word of "$tool_basename", so it can be a program name with args.
9385 set dummy $tool_basename; ac_word=$2
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9387 $as_echo_n "checking for $ac_word... " >&6; }
9388 if ${ac_cv_path_PRINTF+:} false; then :
9389   $as_echo_n "(cached) " >&6
9390 else
9391   case $PRINTF in
9392   [\\/]* | ?:[\\/]*)
9393   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9394   ;;
9395   *)
9396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9397 for as_dir in $PATH
9398 do
9399   IFS=$as_save_IFS
9400   test -z "$as_dir" && as_dir=.
9401     for ac_exec_ext in '' $ac_executable_extensions; do
9402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9403     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9405     break 2
9406   fi
9407 done
9408   done
9409 IFS=$as_save_IFS
9410 
9411   ;;
9412 esac
9413 fi
9414 PRINTF=$ac_cv_path_PRINTF
9415 if test -n "$PRINTF"; then
9416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9417 $as_echo "$PRINTF" >&6; }
9418 else
9419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9420 $as_echo "no" >&6; }
9421 fi
9422 
9423 
9424           if test "x$PRINTF" = x; then
9425             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9426           fi
9427         else
9428           # Otherwise we believe it is a complete path. Use it as it is.
9429           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9430 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9431           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9432 $as_echo_n "checking for PRINTF... " >&6; }
9433           if test ! -x "$tool_specified"; then
9434             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9435 $as_echo "not found" >&6; }
9436             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9437           fi
9438           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9439 $as_echo "$tool_specified" >&6; }
9440         fi
9441       fi
9442     fi
9443 
9444   fi
9445 
9446 
9447 
9448   if test "x$PRINTF" = x; then
9449     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9450   fi
9451 
9452 
9453 
9454 
9455 
9456   # Publish this variable in the help.
9457 
9458 
9459   if [ -z "${RM+x}" ]; then
9460     # The variable is not set by user, try to locate tool using the code snippet
9461     for ac_prog in rm
9462 do
9463   # Extract the first word of "$ac_prog", so it can be a program name with args.
9464 set dummy $ac_prog; ac_word=$2
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9466 $as_echo_n "checking for $ac_word... " >&6; }
9467 if ${ac_cv_path_RM+:} false; then :
9468   $as_echo_n "(cached) " >&6
9469 else
9470   case $RM in
9471   [\\/]* | ?:[\\/]*)
9472   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9473   ;;
9474   *)
9475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9476 for as_dir in $PATH
9477 do
9478   IFS=$as_save_IFS
9479   test -z "$as_dir" && as_dir=.
9480     for ac_exec_ext in '' $ac_executable_extensions; do
9481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9482     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9484     break 2
9485   fi
9486 done
9487   done
9488 IFS=$as_save_IFS
9489 
9490   ;;
9491 esac
9492 fi
9493 RM=$ac_cv_path_RM
9494 if test -n "$RM"; then
9495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9496 $as_echo "$RM" >&6; }
9497 else
9498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9499 $as_echo "no" >&6; }
9500 fi
9501 
9502 
9503   test -n "$RM" && break
9504 done
9505 
9506   else
9507     # The variable is set, but is it from the command line or the environment?
9508 
9509     # Try to remove the string !RM! from our list.
9510     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9511     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9512       # If it failed, the variable was not from the command line. Ignore it,
9513       # but warn the user (except for BASH, which is always set by the calling BASH).
9514       if test "xRM" != xBASH; then
9515         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9516 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9517       fi
9518       # Try to locate tool using the code snippet
9519       for ac_prog in rm
9520 do
9521   # Extract the first word of "$ac_prog", so it can be a program name with args.
9522 set dummy $ac_prog; ac_word=$2
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9524 $as_echo_n "checking for $ac_word... " >&6; }
9525 if ${ac_cv_path_RM+:} false; then :
9526   $as_echo_n "(cached) " >&6
9527 else
9528   case $RM in
9529   [\\/]* | ?:[\\/]*)
9530   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9531   ;;
9532   *)
9533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9534 for as_dir in $PATH
9535 do
9536   IFS=$as_save_IFS
9537   test -z "$as_dir" && as_dir=.
9538     for ac_exec_ext in '' $ac_executable_extensions; do
9539   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9540     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9542     break 2
9543   fi
9544 done
9545   done
9546 IFS=$as_save_IFS
9547 
9548   ;;
9549 esac
9550 fi
9551 RM=$ac_cv_path_RM
9552 if test -n "$RM"; then
9553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9554 $as_echo "$RM" >&6; }
9555 else
9556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9557 $as_echo "no" >&6; }
9558 fi
9559 
9560 
9561   test -n "$RM" && break
9562 done
9563 
9564     else
9565       # If it succeeded, then it was overridden by the user. We will use it
9566       # for the tool.
9567 
9568       # First remove it from the list of overridden variables, so we can test
9569       # for unknown variables in the end.
9570       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9571 
9572       # Check if we try to supply an empty value
9573       if test "x$RM" = x; then
9574         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9575 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9576         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9577 $as_echo_n "checking for RM... " >&6; }
9578         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9579 $as_echo "disabled" >&6; }
9580       else
9581         # Check if the provided tool contains a complete path.
9582         tool_specified="$RM"
9583         tool_basename="${tool_specified##*/}"
9584         if test "x$tool_basename" = "x$tool_specified"; then
9585           # A command without a complete path is provided, search $PATH.
9586           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9587 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9588           # Extract the first word of "$tool_basename", so it can be a program name with args.
9589 set dummy $tool_basename; ac_word=$2
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9591 $as_echo_n "checking for $ac_word... " >&6; }
9592 if ${ac_cv_path_RM+:} false; then :
9593   $as_echo_n "(cached) " >&6
9594 else
9595   case $RM in
9596   [\\/]* | ?:[\\/]*)
9597   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9598   ;;
9599   *)
9600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9601 for as_dir in $PATH
9602 do
9603   IFS=$as_save_IFS
9604   test -z "$as_dir" && as_dir=.
9605     for ac_exec_ext in '' $ac_executable_extensions; do
9606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9607     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9609     break 2
9610   fi
9611 done
9612   done
9613 IFS=$as_save_IFS
9614 
9615   ;;
9616 esac
9617 fi
9618 RM=$ac_cv_path_RM
9619 if test -n "$RM"; then
9620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9621 $as_echo "$RM" >&6; }
9622 else
9623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9624 $as_echo "no" >&6; }
9625 fi
9626 
9627 
9628           if test "x$RM" = x; then
9629             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9630           fi
9631         else
9632           # Otherwise we believe it is a complete path. Use it as it is.
9633           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9634 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9635           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9636 $as_echo_n "checking for RM... " >&6; }
9637           if test ! -x "$tool_specified"; then
9638             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9639 $as_echo "not found" >&6; }
9640             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9641           fi
9642           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9643 $as_echo "$tool_specified" >&6; }
9644         fi
9645       fi
9646     fi
9647 
9648   fi
9649 
9650 
9651 
9652   if test "x$RM" = x; then
9653     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9654   fi
9655 
9656 
9657 
9658 
9659 
9660   # Publish this variable in the help.
9661 
9662 
9663   if [ -z "${RMDIR+x}" ]; then
9664     # The variable is not set by user, try to locate tool using the code snippet
9665     for ac_prog in rmdir
9666 do
9667   # Extract the first word of "$ac_prog", so it can be a program name with args.
9668 set dummy $ac_prog; ac_word=$2
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9670 $as_echo_n "checking for $ac_word... " >&6; }
9671 if ${ac_cv_path_RMDIR+:} false; then :
9672   $as_echo_n "(cached) " >&6
9673 else
9674   case $RMDIR in
9675   [\\/]* | ?:[\\/]*)
9676   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9677   ;;
9678   *)
9679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9680 for as_dir in $PATH
9681 do
9682   IFS=$as_save_IFS
9683   test -z "$as_dir" && as_dir=.
9684     for ac_exec_ext in '' $ac_executable_extensions; do
9685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9686     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9688     break 2
9689   fi
9690 done
9691   done
9692 IFS=$as_save_IFS
9693 
9694   ;;
9695 esac
9696 fi
9697 RMDIR=$ac_cv_path_RMDIR
9698 if test -n "$RMDIR"; then
9699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9700 $as_echo "$RMDIR" >&6; }
9701 else
9702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9703 $as_echo "no" >&6; }
9704 fi
9705 
9706 
9707   test -n "$RMDIR" && break
9708 done
9709 
9710   else
9711     # The variable is set, but is it from the command line or the environment?
9712 
9713     # Try to remove the string !RMDIR! from our list.
9714     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9715     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9716       # If it failed, the variable was not from the command line. Ignore it,
9717       # but warn the user (except for BASH, which is always set by the calling BASH).
9718       if test "xRMDIR" != xBASH; then
9719         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9720 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9721       fi
9722       # Try to locate tool using the code snippet
9723       for ac_prog in rmdir
9724 do
9725   # Extract the first word of "$ac_prog", so it can be a program name with args.
9726 set dummy $ac_prog; ac_word=$2
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9728 $as_echo_n "checking for $ac_word... " >&6; }
9729 if ${ac_cv_path_RMDIR+:} false; then :
9730   $as_echo_n "(cached) " >&6
9731 else
9732   case $RMDIR in
9733   [\\/]* | ?:[\\/]*)
9734   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9735   ;;
9736   *)
9737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9738 for as_dir in $PATH
9739 do
9740   IFS=$as_save_IFS
9741   test -z "$as_dir" && as_dir=.
9742     for ac_exec_ext in '' $ac_executable_extensions; do
9743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9744     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9746     break 2
9747   fi
9748 done
9749   done
9750 IFS=$as_save_IFS
9751 
9752   ;;
9753 esac
9754 fi
9755 RMDIR=$ac_cv_path_RMDIR
9756 if test -n "$RMDIR"; then
9757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9758 $as_echo "$RMDIR" >&6; }
9759 else
9760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9761 $as_echo "no" >&6; }
9762 fi
9763 
9764 
9765   test -n "$RMDIR" && break
9766 done
9767 
9768     else
9769       # If it succeeded, then it was overridden by the user. We will use it
9770       # for the tool.
9771 
9772       # First remove it from the list of overridden variables, so we can test
9773       # for unknown variables in the end.
9774       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9775 
9776       # Check if we try to supply an empty value
9777       if test "x$RMDIR" = x; then
9778         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9779 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9780         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9781 $as_echo_n "checking for RMDIR... " >&6; }
9782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9783 $as_echo "disabled" >&6; }
9784       else
9785         # Check if the provided tool contains a complete path.
9786         tool_specified="$RMDIR"
9787         tool_basename="${tool_specified##*/}"
9788         if test "x$tool_basename" = "x$tool_specified"; then
9789           # A command without a complete path is provided, search $PATH.
9790           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9791 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9792           # Extract the first word of "$tool_basename", so it can be a program name with args.
9793 set dummy $tool_basename; ac_word=$2
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9795 $as_echo_n "checking for $ac_word... " >&6; }
9796 if ${ac_cv_path_RMDIR+:} false; then :
9797   $as_echo_n "(cached) " >&6
9798 else
9799   case $RMDIR in
9800   [\\/]* | ?:[\\/]*)
9801   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9802   ;;
9803   *)
9804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9805 for as_dir in $PATH
9806 do
9807   IFS=$as_save_IFS
9808   test -z "$as_dir" && as_dir=.
9809     for ac_exec_ext in '' $ac_executable_extensions; do
9810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9811     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9813     break 2
9814   fi
9815 done
9816   done
9817 IFS=$as_save_IFS
9818 
9819   ;;
9820 esac
9821 fi
9822 RMDIR=$ac_cv_path_RMDIR
9823 if test -n "$RMDIR"; then
9824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9825 $as_echo "$RMDIR" >&6; }
9826 else
9827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828 $as_echo "no" >&6; }
9829 fi
9830 
9831 
9832           if test "x$RMDIR" = x; then
9833             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9834           fi
9835         else
9836           # Otherwise we believe it is a complete path. Use it as it is.
9837           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9838 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9839           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9840 $as_echo_n "checking for RMDIR... " >&6; }
9841           if test ! -x "$tool_specified"; then
9842             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9843 $as_echo "not found" >&6; }
9844             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9845           fi
9846           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9847 $as_echo "$tool_specified" >&6; }
9848         fi
9849       fi
9850     fi
9851 
9852   fi
9853 
9854 
9855 
9856   if test "x$RMDIR" = x; then
9857     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9858   fi
9859 
9860 
9861 
9862 
9863 
9864   # Publish this variable in the help.
9865 
9866 
9867   if [ -z "${SH+x}" ]; then
9868     # The variable is not set by user, try to locate tool using the code snippet
9869     for ac_prog in sh
9870 do
9871   # Extract the first word of "$ac_prog", so it can be a program name with args.
9872 set dummy $ac_prog; ac_word=$2
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9874 $as_echo_n "checking for $ac_word... " >&6; }
9875 if ${ac_cv_path_SH+:} false; then :
9876   $as_echo_n "(cached) " >&6
9877 else
9878   case $SH in
9879   [\\/]* | ?:[\\/]*)
9880   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9881   ;;
9882   *)
9883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9884 for as_dir in $PATH
9885 do
9886   IFS=$as_save_IFS
9887   test -z "$as_dir" && as_dir=.
9888     for ac_exec_ext in '' $ac_executable_extensions; do
9889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9890     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9892     break 2
9893   fi
9894 done
9895   done
9896 IFS=$as_save_IFS
9897 
9898   ;;
9899 esac
9900 fi
9901 SH=$ac_cv_path_SH
9902 if test -n "$SH"; then
9903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9904 $as_echo "$SH" >&6; }
9905 else
9906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9907 $as_echo "no" >&6; }
9908 fi
9909 
9910 
9911   test -n "$SH" && break
9912 done
9913 
9914   else
9915     # The variable is set, but is it from the command line or the environment?
9916 
9917     # Try to remove the string !SH! from our list.
9918     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9919     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9920       # If it failed, the variable was not from the command line. Ignore it,
9921       # but warn the user (except for BASH, which is always set by the calling BASH).
9922       if test "xSH" != xBASH; then
9923         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9924 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9925       fi
9926       # Try to locate tool using the code snippet
9927       for ac_prog in sh
9928 do
9929   # Extract the first word of "$ac_prog", so it can be a program name with args.
9930 set dummy $ac_prog; ac_word=$2
9931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9932 $as_echo_n "checking for $ac_word... " >&6; }
9933 if ${ac_cv_path_SH+:} false; then :
9934   $as_echo_n "(cached) " >&6
9935 else
9936   case $SH in
9937   [\\/]* | ?:[\\/]*)
9938   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9939   ;;
9940   *)
9941   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9942 for as_dir in $PATH
9943 do
9944   IFS=$as_save_IFS
9945   test -z "$as_dir" && as_dir=.
9946     for ac_exec_ext in '' $ac_executable_extensions; do
9947   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9948     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9950     break 2
9951   fi
9952 done
9953   done
9954 IFS=$as_save_IFS
9955 
9956   ;;
9957 esac
9958 fi
9959 SH=$ac_cv_path_SH
9960 if test -n "$SH"; then
9961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9962 $as_echo "$SH" >&6; }
9963 else
9964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9965 $as_echo "no" >&6; }
9966 fi
9967 
9968 
9969   test -n "$SH" && break
9970 done
9971 
9972     else
9973       # If it succeeded, then it was overridden by the user. We will use it
9974       # for the tool.
9975 
9976       # First remove it from the list of overridden variables, so we can test
9977       # for unknown variables in the end.
9978       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9979 
9980       # Check if we try to supply an empty value
9981       if test "x$SH" = x; then
9982         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9983 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9984         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9985 $as_echo_n "checking for SH... " >&6; }
9986         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9987 $as_echo "disabled" >&6; }
9988       else
9989         # Check if the provided tool contains a complete path.
9990         tool_specified="$SH"
9991         tool_basename="${tool_specified##*/}"
9992         if test "x$tool_basename" = "x$tool_specified"; then
9993           # A command without a complete path is provided, search $PATH.
9994           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9995 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9996           # Extract the first word of "$tool_basename", so it can be a program name with args.
9997 set dummy $tool_basename; ac_word=$2
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9999 $as_echo_n "checking for $ac_word... " >&6; }
10000 if ${ac_cv_path_SH+:} false; then :
10001   $as_echo_n "(cached) " >&6
10002 else
10003   case $SH in
10004   [\\/]* | ?:[\\/]*)
10005   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10006   ;;
10007   *)
10008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10009 for as_dir in $PATH
10010 do
10011   IFS=$as_save_IFS
10012   test -z "$as_dir" && as_dir=.
10013     for ac_exec_ext in '' $ac_executable_extensions; do
10014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10015     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10017     break 2
10018   fi
10019 done
10020   done
10021 IFS=$as_save_IFS
10022 
10023   ;;
10024 esac
10025 fi
10026 SH=$ac_cv_path_SH
10027 if test -n "$SH"; then
10028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10029 $as_echo "$SH" >&6; }
10030 else
10031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10032 $as_echo "no" >&6; }
10033 fi
10034 
10035 
10036           if test "x$SH" = x; then
10037             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10038           fi
10039         else
10040           # Otherwise we believe it is a complete path. Use it as it is.
10041           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10042 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10043           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10044 $as_echo_n "checking for SH... " >&6; }
10045           if test ! -x "$tool_specified"; then
10046             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10047 $as_echo "not found" >&6; }
10048             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10049           fi
10050           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10051 $as_echo "$tool_specified" >&6; }
10052         fi
10053       fi
10054     fi
10055 
10056   fi
10057 
10058 
10059 
10060   if test "x$SH" = x; then
10061     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10062   fi
10063 
10064 
10065 
10066 
10067 
10068   # Publish this variable in the help.
10069 
10070 
10071   if [ -z "${SORT+x}" ]; then
10072     # The variable is not set by user, try to locate tool using the code snippet
10073     for ac_prog in sort
10074 do
10075   # Extract the first word of "$ac_prog", so it can be a program name with args.
10076 set dummy $ac_prog; ac_word=$2
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10078 $as_echo_n "checking for $ac_word... " >&6; }
10079 if ${ac_cv_path_SORT+:} false; then :
10080   $as_echo_n "(cached) " >&6
10081 else
10082   case $SORT in
10083   [\\/]* | ?:[\\/]*)
10084   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10085   ;;
10086   *)
10087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10088 for as_dir in $PATH
10089 do
10090   IFS=$as_save_IFS
10091   test -z "$as_dir" && as_dir=.
10092     for ac_exec_ext in '' $ac_executable_extensions; do
10093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10094     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10096     break 2
10097   fi
10098 done
10099   done
10100 IFS=$as_save_IFS
10101 
10102   ;;
10103 esac
10104 fi
10105 SORT=$ac_cv_path_SORT
10106 if test -n "$SORT"; then
10107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10108 $as_echo "$SORT" >&6; }
10109 else
10110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10111 $as_echo "no" >&6; }
10112 fi
10113 
10114 
10115   test -n "$SORT" && break
10116 done
10117 
10118   else
10119     # The variable is set, but is it from the command line or the environment?
10120 
10121     # Try to remove the string !SORT! from our list.
10122     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10123     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10124       # If it failed, the variable was not from the command line. Ignore it,
10125       # but warn the user (except for BASH, which is always set by the calling BASH).
10126       if test "xSORT" != xBASH; then
10127         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10128 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10129       fi
10130       # Try to locate tool using the code snippet
10131       for ac_prog in sort
10132 do
10133   # Extract the first word of "$ac_prog", so it can be a program name with args.
10134 set dummy $ac_prog; ac_word=$2
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10136 $as_echo_n "checking for $ac_word... " >&6; }
10137 if ${ac_cv_path_SORT+:} false; then :
10138   $as_echo_n "(cached) " >&6
10139 else
10140   case $SORT in
10141   [\\/]* | ?:[\\/]*)
10142   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10143   ;;
10144   *)
10145   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10146 for as_dir in $PATH
10147 do
10148   IFS=$as_save_IFS
10149   test -z "$as_dir" && as_dir=.
10150     for ac_exec_ext in '' $ac_executable_extensions; do
10151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10152     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10153     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10154     break 2
10155   fi
10156 done
10157   done
10158 IFS=$as_save_IFS
10159 
10160   ;;
10161 esac
10162 fi
10163 SORT=$ac_cv_path_SORT
10164 if test -n "$SORT"; then
10165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10166 $as_echo "$SORT" >&6; }
10167 else
10168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10169 $as_echo "no" >&6; }
10170 fi
10171 
10172 
10173   test -n "$SORT" && break
10174 done
10175 
10176     else
10177       # If it succeeded, then it was overridden by the user. We will use it
10178       # for the tool.
10179 
10180       # First remove it from the list of overridden variables, so we can test
10181       # for unknown variables in the end.
10182       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10183 
10184       # Check if we try to supply an empty value
10185       if test "x$SORT" = x; then
10186         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10187 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10188         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10189 $as_echo_n "checking for SORT... " >&6; }
10190         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10191 $as_echo "disabled" >&6; }
10192       else
10193         # Check if the provided tool contains a complete path.
10194         tool_specified="$SORT"
10195         tool_basename="${tool_specified##*/}"
10196         if test "x$tool_basename" = "x$tool_specified"; then
10197           # A command without a complete path is provided, search $PATH.
10198           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10199 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10200           # Extract the first word of "$tool_basename", so it can be a program name with args.
10201 set dummy $tool_basename; ac_word=$2
10202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10203 $as_echo_n "checking for $ac_word... " >&6; }
10204 if ${ac_cv_path_SORT+:} false; then :
10205   $as_echo_n "(cached) " >&6
10206 else
10207   case $SORT in
10208   [\\/]* | ?:[\\/]*)
10209   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10210   ;;
10211   *)
10212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10213 for as_dir in $PATH
10214 do
10215   IFS=$as_save_IFS
10216   test -z "$as_dir" && as_dir=.
10217     for ac_exec_ext in '' $ac_executable_extensions; do
10218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10219     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10221     break 2
10222   fi
10223 done
10224   done
10225 IFS=$as_save_IFS
10226 
10227   ;;
10228 esac
10229 fi
10230 SORT=$ac_cv_path_SORT
10231 if test -n "$SORT"; then
10232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10233 $as_echo "$SORT" >&6; }
10234 else
10235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236 $as_echo "no" >&6; }
10237 fi
10238 
10239 
10240           if test "x$SORT" = x; then
10241             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10242           fi
10243         else
10244           # Otherwise we believe it is a complete path. Use it as it is.
10245           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10246 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10247           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10248 $as_echo_n "checking for SORT... " >&6; }
10249           if test ! -x "$tool_specified"; then
10250             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10251 $as_echo "not found" >&6; }
10252             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10253           fi
10254           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10255 $as_echo "$tool_specified" >&6; }
10256         fi
10257       fi
10258     fi
10259 
10260   fi
10261 
10262 
10263 
10264   if test "x$SORT" = x; then
10265     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10266   fi
10267 
10268 
10269 
10270 
10271 
10272   # Publish this variable in the help.
10273 
10274 
10275   if [ -z "${TAIL+x}" ]; then
10276     # The variable is not set by user, try to locate tool using the code snippet
10277     for ac_prog in tail
10278 do
10279   # Extract the first word of "$ac_prog", so it can be a program name with args.
10280 set dummy $ac_prog; ac_word=$2
10281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10282 $as_echo_n "checking for $ac_word... " >&6; }
10283 if ${ac_cv_path_TAIL+:} false; then :
10284   $as_echo_n "(cached) " >&6
10285 else
10286   case $TAIL in
10287   [\\/]* | ?:[\\/]*)
10288   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10289   ;;
10290   *)
10291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10292 for as_dir in $PATH
10293 do
10294   IFS=$as_save_IFS
10295   test -z "$as_dir" && as_dir=.
10296     for ac_exec_ext in '' $ac_executable_extensions; do
10297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10298     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10300     break 2
10301   fi
10302 done
10303   done
10304 IFS=$as_save_IFS
10305 
10306   ;;
10307 esac
10308 fi
10309 TAIL=$ac_cv_path_TAIL
10310 if test -n "$TAIL"; then
10311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10312 $as_echo "$TAIL" >&6; }
10313 else
10314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315 $as_echo "no" >&6; }
10316 fi
10317 
10318 
10319   test -n "$TAIL" && break
10320 done
10321 
10322   else
10323     # The variable is set, but is it from the command line or the environment?
10324 
10325     # Try to remove the string !TAIL! from our list.
10326     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10327     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10328       # If it failed, the variable was not from the command line. Ignore it,
10329       # but warn the user (except for BASH, which is always set by the calling BASH).
10330       if test "xTAIL" != xBASH; then
10331         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10332 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10333       fi
10334       # Try to locate tool using the code snippet
10335       for ac_prog in tail
10336 do
10337   # Extract the first word of "$ac_prog", so it can be a program name with args.
10338 set dummy $ac_prog; ac_word=$2
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10340 $as_echo_n "checking for $ac_word... " >&6; }
10341 if ${ac_cv_path_TAIL+:} false; then :
10342   $as_echo_n "(cached) " >&6
10343 else
10344   case $TAIL in
10345   [\\/]* | ?:[\\/]*)
10346   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10347   ;;
10348   *)
10349   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10350 for as_dir in $PATH
10351 do
10352   IFS=$as_save_IFS
10353   test -z "$as_dir" && as_dir=.
10354     for ac_exec_ext in '' $ac_executable_extensions; do
10355   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10356     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10357     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10358     break 2
10359   fi
10360 done
10361   done
10362 IFS=$as_save_IFS
10363 
10364   ;;
10365 esac
10366 fi
10367 TAIL=$ac_cv_path_TAIL
10368 if test -n "$TAIL"; then
10369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10370 $as_echo "$TAIL" >&6; }
10371 else
10372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10373 $as_echo "no" >&6; }
10374 fi
10375 
10376 
10377   test -n "$TAIL" && break
10378 done
10379 
10380     else
10381       # If it succeeded, then it was overridden by the user. We will use it
10382       # for the tool.
10383 
10384       # First remove it from the list of overridden variables, so we can test
10385       # for unknown variables in the end.
10386       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10387 
10388       # Check if we try to supply an empty value
10389       if test "x$TAIL" = x; then
10390         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10391 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10392         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10393 $as_echo_n "checking for TAIL... " >&6; }
10394         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10395 $as_echo "disabled" >&6; }
10396       else
10397         # Check if the provided tool contains a complete path.
10398         tool_specified="$TAIL"
10399         tool_basename="${tool_specified##*/}"
10400         if test "x$tool_basename" = "x$tool_specified"; then
10401           # A command without a complete path is provided, search $PATH.
10402           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10403 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10404           # Extract the first word of "$tool_basename", so it can be a program name with args.
10405 set dummy $tool_basename; ac_word=$2
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10407 $as_echo_n "checking for $ac_word... " >&6; }
10408 if ${ac_cv_path_TAIL+:} false; then :
10409   $as_echo_n "(cached) " >&6
10410 else
10411   case $TAIL in
10412   [\\/]* | ?:[\\/]*)
10413   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10414   ;;
10415   *)
10416   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10417 for as_dir in $PATH
10418 do
10419   IFS=$as_save_IFS
10420   test -z "$as_dir" && as_dir=.
10421     for ac_exec_ext in '' $ac_executable_extensions; do
10422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10423     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10425     break 2
10426   fi
10427 done
10428   done
10429 IFS=$as_save_IFS
10430 
10431   ;;
10432 esac
10433 fi
10434 TAIL=$ac_cv_path_TAIL
10435 if test -n "$TAIL"; then
10436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10437 $as_echo "$TAIL" >&6; }
10438 else
10439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10440 $as_echo "no" >&6; }
10441 fi
10442 
10443 
10444           if test "x$TAIL" = x; then
10445             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10446           fi
10447         else
10448           # Otherwise we believe it is a complete path. Use it as it is.
10449           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10450 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10451           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10452 $as_echo_n "checking for TAIL... " >&6; }
10453           if test ! -x "$tool_specified"; then
10454             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10455 $as_echo "not found" >&6; }
10456             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10457           fi
10458           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10459 $as_echo "$tool_specified" >&6; }
10460         fi
10461       fi
10462     fi
10463 
10464   fi
10465 
10466 
10467 
10468   if test "x$TAIL" = x; then
10469     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10470   fi
10471 
10472 
10473 
10474 
10475 
10476   # Publish this variable in the help.
10477 
10478 
10479   if [ -z "${TAR+x}" ]; then
10480     # The variable is not set by user, try to locate tool using the code snippet
10481     for ac_prog in tar
10482 do
10483   # Extract the first word of "$ac_prog", so it can be a program name with args.
10484 set dummy $ac_prog; ac_word=$2
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10486 $as_echo_n "checking for $ac_word... " >&6; }
10487 if ${ac_cv_path_TAR+:} false; then :
10488   $as_echo_n "(cached) " >&6
10489 else
10490   case $TAR in
10491   [\\/]* | ?:[\\/]*)
10492   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10493   ;;
10494   *)
10495   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10496 for as_dir in $PATH
10497 do
10498   IFS=$as_save_IFS
10499   test -z "$as_dir" && as_dir=.
10500     for ac_exec_ext in '' $ac_executable_extensions; do
10501   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10502     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10503     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10504     break 2
10505   fi
10506 done
10507   done
10508 IFS=$as_save_IFS
10509 
10510   ;;
10511 esac
10512 fi
10513 TAR=$ac_cv_path_TAR
10514 if test -n "$TAR"; then
10515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10516 $as_echo "$TAR" >&6; }
10517 else
10518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10519 $as_echo "no" >&6; }
10520 fi
10521 
10522 
10523   test -n "$TAR" && break
10524 done
10525 
10526   else
10527     # The variable is set, but is it from the command line or the environment?
10528 
10529     # Try to remove the string !TAR! from our list.
10530     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10531     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10532       # If it failed, the variable was not from the command line. Ignore it,
10533       # but warn the user (except for BASH, which is always set by the calling BASH).
10534       if test "xTAR" != xBASH; then
10535         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10536 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10537       fi
10538       # Try to locate tool using the code snippet
10539       for ac_prog in tar
10540 do
10541   # Extract the first word of "$ac_prog", so it can be a program name with args.
10542 set dummy $ac_prog; ac_word=$2
10543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10544 $as_echo_n "checking for $ac_word... " >&6; }
10545 if ${ac_cv_path_TAR+:} false; then :
10546   $as_echo_n "(cached) " >&6
10547 else
10548   case $TAR in
10549   [\\/]* | ?:[\\/]*)
10550   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10551   ;;
10552   *)
10553   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10554 for as_dir in $PATH
10555 do
10556   IFS=$as_save_IFS
10557   test -z "$as_dir" && as_dir=.
10558     for ac_exec_ext in '' $ac_executable_extensions; do
10559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10560     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10562     break 2
10563   fi
10564 done
10565   done
10566 IFS=$as_save_IFS
10567 
10568   ;;
10569 esac
10570 fi
10571 TAR=$ac_cv_path_TAR
10572 if test -n "$TAR"; then
10573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10574 $as_echo "$TAR" >&6; }
10575 else
10576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577 $as_echo "no" >&6; }
10578 fi
10579 
10580 
10581   test -n "$TAR" && break
10582 done
10583 
10584     else
10585       # If it succeeded, then it was overridden by the user. We will use it
10586       # for the tool.
10587 
10588       # First remove it from the list of overridden variables, so we can test
10589       # for unknown variables in the end.
10590       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10591 
10592       # Check if we try to supply an empty value
10593       if test "x$TAR" = x; then
10594         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10595 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10596         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10597 $as_echo_n "checking for TAR... " >&6; }
10598         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10599 $as_echo "disabled" >&6; }
10600       else
10601         # Check if the provided tool contains a complete path.
10602         tool_specified="$TAR"
10603         tool_basename="${tool_specified##*/}"
10604         if test "x$tool_basename" = "x$tool_specified"; then
10605           # A command without a complete path is provided, search $PATH.
10606           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10607 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10608           # Extract the first word of "$tool_basename", so it can be a program name with args.
10609 set dummy $tool_basename; ac_word=$2
10610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10611 $as_echo_n "checking for $ac_word... " >&6; }
10612 if ${ac_cv_path_TAR+:} false; then :
10613   $as_echo_n "(cached) " >&6
10614 else
10615   case $TAR in
10616   [\\/]* | ?:[\\/]*)
10617   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10618   ;;
10619   *)
10620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10621 for as_dir in $PATH
10622 do
10623   IFS=$as_save_IFS
10624   test -z "$as_dir" && as_dir=.
10625     for ac_exec_ext in '' $ac_executable_extensions; do
10626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10627     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10629     break 2
10630   fi
10631 done
10632   done
10633 IFS=$as_save_IFS
10634 
10635   ;;
10636 esac
10637 fi
10638 TAR=$ac_cv_path_TAR
10639 if test -n "$TAR"; then
10640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10641 $as_echo "$TAR" >&6; }
10642 else
10643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10644 $as_echo "no" >&6; }
10645 fi
10646 
10647 
10648           if test "x$TAR" = x; then
10649             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10650           fi
10651         else
10652           # Otherwise we believe it is a complete path. Use it as it is.
10653           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10654 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10655           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10656 $as_echo_n "checking for TAR... " >&6; }
10657           if test ! -x "$tool_specified"; then
10658             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10659 $as_echo "not found" >&6; }
10660             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10661           fi
10662           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10663 $as_echo "$tool_specified" >&6; }
10664         fi
10665       fi
10666     fi
10667 
10668   fi
10669 
10670 
10671 
10672   if test "x$TAR" = x; then
10673     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10674   fi
10675 
10676 
10677 
10678 
10679 
10680   # Publish this variable in the help.
10681 
10682 
10683   if [ -z "${TEE+x}" ]; then
10684     # The variable is not set by user, try to locate tool using the code snippet
10685     for ac_prog in tee
10686 do
10687   # Extract the first word of "$ac_prog", so it can be a program name with args.
10688 set dummy $ac_prog; ac_word=$2
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10690 $as_echo_n "checking for $ac_word... " >&6; }
10691 if ${ac_cv_path_TEE+:} false; then :
10692   $as_echo_n "(cached) " >&6
10693 else
10694   case $TEE in
10695   [\\/]* | ?:[\\/]*)
10696   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10697   ;;
10698   *)
10699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10700 for as_dir in $PATH
10701 do
10702   IFS=$as_save_IFS
10703   test -z "$as_dir" && as_dir=.
10704     for ac_exec_ext in '' $ac_executable_extensions; do
10705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10706     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10708     break 2
10709   fi
10710 done
10711   done
10712 IFS=$as_save_IFS
10713 
10714   ;;
10715 esac
10716 fi
10717 TEE=$ac_cv_path_TEE
10718 if test -n "$TEE"; then
10719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10720 $as_echo "$TEE" >&6; }
10721 else
10722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10723 $as_echo "no" >&6; }
10724 fi
10725 
10726 
10727   test -n "$TEE" && break
10728 done
10729 
10730   else
10731     # The variable is set, but is it from the command line or the environment?
10732 
10733     # Try to remove the string !TEE! from our list.
10734     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10735     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10736       # If it failed, the variable was not from the command line. Ignore it,
10737       # but warn the user (except for BASH, which is always set by the calling BASH).
10738       if test "xTEE" != xBASH; then
10739         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10740 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10741       fi
10742       # Try to locate tool using the code snippet
10743       for ac_prog in tee
10744 do
10745   # Extract the first word of "$ac_prog", so it can be a program name with args.
10746 set dummy $ac_prog; ac_word=$2
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10748 $as_echo_n "checking for $ac_word... " >&6; }
10749 if ${ac_cv_path_TEE+:} false; then :
10750   $as_echo_n "(cached) " >&6
10751 else
10752   case $TEE in
10753   [\\/]* | ?:[\\/]*)
10754   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10755   ;;
10756   *)
10757   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10758 for as_dir in $PATH
10759 do
10760   IFS=$as_save_IFS
10761   test -z "$as_dir" && as_dir=.
10762     for ac_exec_ext in '' $ac_executable_extensions; do
10763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10764     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10766     break 2
10767   fi
10768 done
10769   done
10770 IFS=$as_save_IFS
10771 
10772   ;;
10773 esac
10774 fi
10775 TEE=$ac_cv_path_TEE
10776 if test -n "$TEE"; then
10777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10778 $as_echo "$TEE" >&6; }
10779 else
10780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10781 $as_echo "no" >&6; }
10782 fi
10783 
10784 
10785   test -n "$TEE" && break
10786 done
10787 
10788     else
10789       # If it succeeded, then it was overridden by the user. We will use it
10790       # for the tool.
10791 
10792       # First remove it from the list of overridden variables, so we can test
10793       # for unknown variables in the end.
10794       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10795 
10796       # Check if we try to supply an empty value
10797       if test "x$TEE" = x; then
10798         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10799 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10800         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10801 $as_echo_n "checking for TEE... " >&6; }
10802         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10803 $as_echo "disabled" >&6; }
10804       else
10805         # Check if the provided tool contains a complete path.
10806         tool_specified="$TEE"
10807         tool_basename="${tool_specified##*/}"
10808         if test "x$tool_basename" = "x$tool_specified"; then
10809           # A command without a complete path is provided, search $PATH.
10810           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10811 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10812           # Extract the first word of "$tool_basename", so it can be a program name with args.
10813 set dummy $tool_basename; ac_word=$2
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10815 $as_echo_n "checking for $ac_word... " >&6; }
10816 if ${ac_cv_path_TEE+:} false; then :
10817   $as_echo_n "(cached) " >&6
10818 else
10819   case $TEE in
10820   [\\/]* | ?:[\\/]*)
10821   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10822   ;;
10823   *)
10824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10825 for as_dir in $PATH
10826 do
10827   IFS=$as_save_IFS
10828   test -z "$as_dir" && as_dir=.
10829     for ac_exec_ext in '' $ac_executable_extensions; do
10830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10831     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10833     break 2
10834   fi
10835 done
10836   done
10837 IFS=$as_save_IFS
10838 
10839   ;;
10840 esac
10841 fi
10842 TEE=$ac_cv_path_TEE
10843 if test -n "$TEE"; then
10844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10845 $as_echo "$TEE" >&6; }
10846 else
10847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10848 $as_echo "no" >&6; }
10849 fi
10850 
10851 
10852           if test "x$TEE" = x; then
10853             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10854           fi
10855         else
10856           # Otherwise we believe it is a complete path. Use it as it is.
10857           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10858 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10859           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10860 $as_echo_n "checking for TEE... " >&6; }
10861           if test ! -x "$tool_specified"; then
10862             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10863 $as_echo "not found" >&6; }
10864             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10865           fi
10866           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10867 $as_echo "$tool_specified" >&6; }
10868         fi
10869       fi
10870     fi
10871 
10872   fi
10873 
10874 
10875 
10876   if test "x$TEE" = x; then
10877     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10878   fi
10879 
10880 
10881 
10882 
10883 
10884   # Publish this variable in the help.
10885 
10886 
10887   if [ -z "${TOUCH+x}" ]; then
10888     # The variable is not set by user, try to locate tool using the code snippet
10889     for ac_prog in touch
10890 do
10891   # Extract the first word of "$ac_prog", so it can be a program name with args.
10892 set dummy $ac_prog; ac_word=$2
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10894 $as_echo_n "checking for $ac_word... " >&6; }
10895 if ${ac_cv_path_TOUCH+:} false; then :
10896   $as_echo_n "(cached) " >&6
10897 else
10898   case $TOUCH in
10899   [\\/]* | ?:[\\/]*)
10900   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10901   ;;
10902   *)
10903   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10904 for as_dir in $PATH
10905 do
10906   IFS=$as_save_IFS
10907   test -z "$as_dir" && as_dir=.
10908     for ac_exec_ext in '' $ac_executable_extensions; do
10909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10910     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10912     break 2
10913   fi
10914 done
10915   done
10916 IFS=$as_save_IFS
10917 
10918   ;;
10919 esac
10920 fi
10921 TOUCH=$ac_cv_path_TOUCH
10922 if test -n "$TOUCH"; then
10923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10924 $as_echo "$TOUCH" >&6; }
10925 else
10926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10927 $as_echo "no" >&6; }
10928 fi
10929 
10930 
10931   test -n "$TOUCH" && break
10932 done
10933 
10934   else
10935     # The variable is set, but is it from the command line or the environment?
10936 
10937     # Try to remove the string !TOUCH! from our list.
10938     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10939     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10940       # If it failed, the variable was not from the command line. Ignore it,
10941       # but warn the user (except for BASH, which is always set by the calling BASH).
10942       if test "xTOUCH" != xBASH; then
10943         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10944 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10945       fi
10946       # Try to locate tool using the code snippet
10947       for ac_prog in touch
10948 do
10949   # Extract the first word of "$ac_prog", so it can be a program name with args.
10950 set dummy $ac_prog; ac_word=$2
10951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10952 $as_echo_n "checking for $ac_word... " >&6; }
10953 if ${ac_cv_path_TOUCH+:} false; then :
10954   $as_echo_n "(cached) " >&6
10955 else
10956   case $TOUCH in
10957   [\\/]* | ?:[\\/]*)
10958   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10959   ;;
10960   *)
10961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10962 for as_dir in $PATH
10963 do
10964   IFS=$as_save_IFS
10965   test -z "$as_dir" && as_dir=.
10966     for ac_exec_ext in '' $ac_executable_extensions; do
10967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10968     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10970     break 2
10971   fi
10972 done
10973   done
10974 IFS=$as_save_IFS
10975 
10976   ;;
10977 esac
10978 fi
10979 TOUCH=$ac_cv_path_TOUCH
10980 if test -n "$TOUCH"; then
10981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10982 $as_echo "$TOUCH" >&6; }
10983 else
10984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10985 $as_echo "no" >&6; }
10986 fi
10987 
10988 
10989   test -n "$TOUCH" && break
10990 done
10991 
10992     else
10993       # If it succeeded, then it was overridden by the user. We will use it
10994       # for the tool.
10995 
10996       # First remove it from the list of overridden variables, so we can test
10997       # for unknown variables in the end.
10998       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10999 
11000       # Check if we try to supply an empty value
11001       if test "x$TOUCH" = x; then
11002         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11003 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11004         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11005 $as_echo_n "checking for TOUCH... " >&6; }
11006         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11007 $as_echo "disabled" >&6; }
11008       else
11009         # Check if the provided tool contains a complete path.
11010         tool_specified="$TOUCH"
11011         tool_basename="${tool_specified##*/}"
11012         if test "x$tool_basename" = "x$tool_specified"; then
11013           # A command without a complete path is provided, search $PATH.
11014           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11015 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11016           # Extract the first word of "$tool_basename", so it can be a program name with args.
11017 set dummy $tool_basename; ac_word=$2
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11019 $as_echo_n "checking for $ac_word... " >&6; }
11020 if ${ac_cv_path_TOUCH+:} false; then :
11021   $as_echo_n "(cached) " >&6
11022 else
11023   case $TOUCH in
11024   [\\/]* | ?:[\\/]*)
11025   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11026   ;;
11027   *)
11028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11029 for as_dir in $PATH
11030 do
11031   IFS=$as_save_IFS
11032   test -z "$as_dir" && as_dir=.
11033     for ac_exec_ext in '' $ac_executable_extensions; do
11034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11035     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11037     break 2
11038   fi
11039 done
11040   done
11041 IFS=$as_save_IFS
11042 
11043   ;;
11044 esac
11045 fi
11046 TOUCH=$ac_cv_path_TOUCH
11047 if test -n "$TOUCH"; then
11048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11049 $as_echo "$TOUCH" >&6; }
11050 else
11051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11052 $as_echo "no" >&6; }
11053 fi
11054 
11055 
11056           if test "x$TOUCH" = x; then
11057             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11058           fi
11059         else
11060           # Otherwise we believe it is a complete path. Use it as it is.
11061           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11062 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11063           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11064 $as_echo_n "checking for TOUCH... " >&6; }
11065           if test ! -x "$tool_specified"; then
11066             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11067 $as_echo "not found" >&6; }
11068             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11069           fi
11070           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11071 $as_echo "$tool_specified" >&6; }
11072         fi
11073       fi
11074     fi
11075 
11076   fi
11077 
11078 
11079 
11080   if test "x$TOUCH" = x; then
11081     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11082   fi
11083 
11084 
11085 
11086 
11087 
11088   # Publish this variable in the help.
11089 
11090 
11091   if [ -z "${TR+x}" ]; then
11092     # The variable is not set by user, try to locate tool using the code snippet
11093     for ac_prog in tr
11094 do
11095   # Extract the first word of "$ac_prog", so it can be a program name with args.
11096 set dummy $ac_prog; ac_word=$2
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11098 $as_echo_n "checking for $ac_word... " >&6; }
11099 if ${ac_cv_path_TR+:} false; then :
11100   $as_echo_n "(cached) " >&6
11101 else
11102   case $TR in
11103   [\\/]* | ?:[\\/]*)
11104   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11105   ;;
11106   *)
11107   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11108 for as_dir in $PATH
11109 do
11110   IFS=$as_save_IFS
11111   test -z "$as_dir" && as_dir=.
11112     for ac_exec_ext in '' $ac_executable_extensions; do
11113   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11114     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11115     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11116     break 2
11117   fi
11118 done
11119   done
11120 IFS=$as_save_IFS
11121 
11122   ;;
11123 esac
11124 fi
11125 TR=$ac_cv_path_TR
11126 if test -n "$TR"; then
11127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11128 $as_echo "$TR" >&6; }
11129 else
11130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131 $as_echo "no" >&6; }
11132 fi
11133 
11134 
11135   test -n "$TR" && break
11136 done
11137 
11138   else
11139     # The variable is set, but is it from the command line or the environment?
11140 
11141     # Try to remove the string !TR! from our list.
11142     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11143     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11144       # If it failed, the variable was not from the command line. Ignore it,
11145       # but warn the user (except for BASH, which is always set by the calling BASH).
11146       if test "xTR" != xBASH; then
11147         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11148 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11149       fi
11150       # Try to locate tool using the code snippet
11151       for ac_prog in tr
11152 do
11153   # Extract the first word of "$ac_prog", so it can be a program name with args.
11154 set dummy $ac_prog; ac_word=$2
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11156 $as_echo_n "checking for $ac_word... " >&6; }
11157 if ${ac_cv_path_TR+:} false; then :
11158   $as_echo_n "(cached) " >&6
11159 else
11160   case $TR in
11161   [\\/]* | ?:[\\/]*)
11162   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11163   ;;
11164   *)
11165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11166 for as_dir in $PATH
11167 do
11168   IFS=$as_save_IFS
11169   test -z "$as_dir" && as_dir=.
11170     for ac_exec_ext in '' $ac_executable_extensions; do
11171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11172     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11174     break 2
11175   fi
11176 done
11177   done
11178 IFS=$as_save_IFS
11179 
11180   ;;
11181 esac
11182 fi
11183 TR=$ac_cv_path_TR
11184 if test -n "$TR"; then
11185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11186 $as_echo "$TR" >&6; }
11187 else
11188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11189 $as_echo "no" >&6; }
11190 fi
11191 
11192 
11193   test -n "$TR" && break
11194 done
11195 
11196     else
11197       # If it succeeded, then it was overridden by the user. We will use it
11198       # for the tool.
11199 
11200       # First remove it from the list of overridden variables, so we can test
11201       # for unknown variables in the end.
11202       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11203 
11204       # Check if we try to supply an empty value
11205       if test "x$TR" = x; then
11206         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11207 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11208         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11209 $as_echo_n "checking for TR... " >&6; }
11210         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11211 $as_echo "disabled" >&6; }
11212       else
11213         # Check if the provided tool contains a complete path.
11214         tool_specified="$TR"
11215         tool_basename="${tool_specified##*/}"
11216         if test "x$tool_basename" = "x$tool_specified"; then
11217           # A command without a complete path is provided, search $PATH.
11218           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11219 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11220           # Extract the first word of "$tool_basename", so it can be a program name with args.
11221 set dummy $tool_basename; ac_word=$2
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11223 $as_echo_n "checking for $ac_word... " >&6; }
11224 if ${ac_cv_path_TR+:} false; then :
11225   $as_echo_n "(cached) " >&6
11226 else
11227   case $TR in
11228   [\\/]* | ?:[\\/]*)
11229   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11230   ;;
11231   *)
11232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11233 for as_dir in $PATH
11234 do
11235   IFS=$as_save_IFS
11236   test -z "$as_dir" && as_dir=.
11237     for ac_exec_ext in '' $ac_executable_extensions; do
11238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11239     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11241     break 2
11242   fi
11243 done
11244   done
11245 IFS=$as_save_IFS
11246 
11247   ;;
11248 esac
11249 fi
11250 TR=$ac_cv_path_TR
11251 if test -n "$TR"; then
11252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11253 $as_echo "$TR" >&6; }
11254 else
11255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11256 $as_echo "no" >&6; }
11257 fi
11258 
11259 
11260           if test "x$TR" = x; then
11261             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11262           fi
11263         else
11264           # Otherwise we believe it is a complete path. Use it as it is.
11265           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11266 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11267           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11268 $as_echo_n "checking for TR... " >&6; }
11269           if test ! -x "$tool_specified"; then
11270             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11271 $as_echo "not found" >&6; }
11272             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11273           fi
11274           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11275 $as_echo "$tool_specified" >&6; }
11276         fi
11277       fi
11278     fi
11279 
11280   fi
11281 
11282 
11283 
11284   if test "x$TR" = x; then
11285     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11286   fi
11287 
11288 
11289 
11290 
11291 
11292   # Publish this variable in the help.
11293 
11294 
11295   if [ -z "${UNAME+x}" ]; then
11296     # The variable is not set by user, try to locate tool using the code snippet
11297     for ac_prog in uname
11298 do
11299   # Extract the first word of "$ac_prog", so it can be a program name with args.
11300 set dummy $ac_prog; ac_word=$2
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11302 $as_echo_n "checking for $ac_word... " >&6; }
11303 if ${ac_cv_path_UNAME+:} false; then :
11304   $as_echo_n "(cached) " >&6
11305 else
11306   case $UNAME in
11307   [\\/]* | ?:[\\/]*)
11308   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11309   ;;
11310   *)
11311   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11312 for as_dir in $PATH
11313 do
11314   IFS=$as_save_IFS
11315   test -z "$as_dir" && as_dir=.
11316     for ac_exec_ext in '' $ac_executable_extensions; do
11317   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11318     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11320     break 2
11321   fi
11322 done
11323   done
11324 IFS=$as_save_IFS
11325 
11326   ;;
11327 esac
11328 fi
11329 UNAME=$ac_cv_path_UNAME
11330 if test -n "$UNAME"; then
11331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11332 $as_echo "$UNAME" >&6; }
11333 else
11334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335 $as_echo "no" >&6; }
11336 fi
11337 
11338 
11339   test -n "$UNAME" && break
11340 done
11341 
11342   else
11343     # The variable is set, but is it from the command line or the environment?
11344 
11345     # Try to remove the string !UNAME! from our list.
11346     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11347     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11348       # If it failed, the variable was not from the command line. Ignore it,
11349       # but warn the user (except for BASH, which is always set by the calling BASH).
11350       if test "xUNAME" != xBASH; then
11351         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11352 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11353       fi
11354       # Try to locate tool using the code snippet
11355       for ac_prog in uname
11356 do
11357   # Extract the first word of "$ac_prog", so it can be a program name with args.
11358 set dummy $ac_prog; ac_word=$2
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11360 $as_echo_n "checking for $ac_word... " >&6; }
11361 if ${ac_cv_path_UNAME+:} false; then :
11362   $as_echo_n "(cached) " >&6
11363 else
11364   case $UNAME in
11365   [\\/]* | ?:[\\/]*)
11366   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11367   ;;
11368   *)
11369   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11370 for as_dir in $PATH
11371 do
11372   IFS=$as_save_IFS
11373   test -z "$as_dir" && as_dir=.
11374     for ac_exec_ext in '' $ac_executable_extensions; do
11375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11376     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11378     break 2
11379   fi
11380 done
11381   done
11382 IFS=$as_save_IFS
11383 
11384   ;;
11385 esac
11386 fi
11387 UNAME=$ac_cv_path_UNAME
11388 if test -n "$UNAME"; then
11389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11390 $as_echo "$UNAME" >&6; }
11391 else
11392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11393 $as_echo "no" >&6; }
11394 fi
11395 
11396 
11397   test -n "$UNAME" && break
11398 done
11399 
11400     else
11401       # If it succeeded, then it was overridden by the user. We will use it
11402       # for the tool.
11403 
11404       # First remove it from the list of overridden variables, so we can test
11405       # for unknown variables in the end.
11406       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11407 
11408       # Check if we try to supply an empty value
11409       if test "x$UNAME" = x; then
11410         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11411 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11412         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11413 $as_echo_n "checking for UNAME... " >&6; }
11414         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11415 $as_echo "disabled" >&6; }
11416       else
11417         # Check if the provided tool contains a complete path.
11418         tool_specified="$UNAME"
11419         tool_basename="${tool_specified##*/}"
11420         if test "x$tool_basename" = "x$tool_specified"; then
11421           # A command without a complete path is provided, search $PATH.
11422           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11423 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11424           # Extract the first word of "$tool_basename", so it can be a program name with args.
11425 set dummy $tool_basename; ac_word=$2
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11427 $as_echo_n "checking for $ac_word... " >&6; }
11428 if ${ac_cv_path_UNAME+:} false; then :
11429   $as_echo_n "(cached) " >&6
11430 else
11431   case $UNAME in
11432   [\\/]* | ?:[\\/]*)
11433   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11434   ;;
11435   *)
11436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11437 for as_dir in $PATH
11438 do
11439   IFS=$as_save_IFS
11440   test -z "$as_dir" && as_dir=.
11441     for ac_exec_ext in '' $ac_executable_extensions; do
11442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11443     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11445     break 2
11446   fi
11447 done
11448   done
11449 IFS=$as_save_IFS
11450 
11451   ;;
11452 esac
11453 fi
11454 UNAME=$ac_cv_path_UNAME
11455 if test -n "$UNAME"; then
11456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11457 $as_echo "$UNAME" >&6; }
11458 else
11459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460 $as_echo "no" >&6; }
11461 fi
11462 
11463 
11464           if test "x$UNAME" = x; then
11465             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11466           fi
11467         else
11468           # Otherwise we believe it is a complete path. Use it as it is.
11469           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11470 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11471           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11472 $as_echo_n "checking for UNAME... " >&6; }
11473           if test ! -x "$tool_specified"; then
11474             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11475 $as_echo "not found" >&6; }
11476             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11477           fi
11478           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11479 $as_echo "$tool_specified" >&6; }
11480         fi
11481       fi
11482     fi
11483 
11484   fi
11485 
11486 
11487 
11488   if test "x$UNAME" = x; then
11489     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11490   fi
11491 
11492 
11493 
11494 
11495 
11496   # Publish this variable in the help.
11497 
11498 
11499   if [ -z "${UNIQ+x}" ]; then
11500     # The variable is not set by user, try to locate tool using the code snippet
11501     for ac_prog in uniq
11502 do
11503   # Extract the first word of "$ac_prog", so it can be a program name with args.
11504 set dummy $ac_prog; ac_word=$2
11505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11506 $as_echo_n "checking for $ac_word... " >&6; }
11507 if ${ac_cv_path_UNIQ+:} false; then :
11508   $as_echo_n "(cached) " >&6
11509 else
11510   case $UNIQ in
11511   [\\/]* | ?:[\\/]*)
11512   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11513   ;;
11514   *)
11515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11516 for as_dir in $PATH
11517 do
11518   IFS=$as_save_IFS
11519   test -z "$as_dir" && as_dir=.
11520     for ac_exec_ext in '' $ac_executable_extensions; do
11521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11522     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11524     break 2
11525   fi
11526 done
11527   done
11528 IFS=$as_save_IFS
11529 
11530   ;;
11531 esac
11532 fi
11533 UNIQ=$ac_cv_path_UNIQ
11534 if test -n "$UNIQ"; then
11535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11536 $as_echo "$UNIQ" >&6; }
11537 else
11538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539 $as_echo "no" >&6; }
11540 fi
11541 
11542 
11543   test -n "$UNIQ" && break
11544 done
11545 
11546   else
11547     # The variable is set, but is it from the command line or the environment?
11548 
11549     # Try to remove the string !UNIQ! from our list.
11550     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11551     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11552       # If it failed, the variable was not from the command line. Ignore it,
11553       # but warn the user (except for BASH, which is always set by the calling BASH).
11554       if test "xUNIQ" != xBASH; then
11555         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11556 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11557       fi
11558       # Try to locate tool using the code snippet
11559       for ac_prog in uniq
11560 do
11561   # Extract the first word of "$ac_prog", so it can be a program name with args.
11562 set dummy $ac_prog; ac_word=$2
11563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11564 $as_echo_n "checking for $ac_word... " >&6; }
11565 if ${ac_cv_path_UNIQ+:} false; then :
11566   $as_echo_n "(cached) " >&6
11567 else
11568   case $UNIQ in
11569   [\\/]* | ?:[\\/]*)
11570   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11571   ;;
11572   *)
11573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11574 for as_dir in $PATH
11575 do
11576   IFS=$as_save_IFS
11577   test -z "$as_dir" && as_dir=.
11578     for ac_exec_ext in '' $ac_executable_extensions; do
11579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11580     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11582     break 2
11583   fi
11584 done
11585   done
11586 IFS=$as_save_IFS
11587 
11588   ;;
11589 esac
11590 fi
11591 UNIQ=$ac_cv_path_UNIQ
11592 if test -n "$UNIQ"; then
11593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11594 $as_echo "$UNIQ" >&6; }
11595 else
11596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597 $as_echo "no" >&6; }
11598 fi
11599 
11600 
11601   test -n "$UNIQ" && break
11602 done
11603 
11604     else
11605       # If it succeeded, then it was overridden by the user. We will use it
11606       # for the tool.
11607 
11608       # First remove it from the list of overridden variables, so we can test
11609       # for unknown variables in the end.
11610       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11611 
11612       # Check if we try to supply an empty value
11613       if test "x$UNIQ" = x; then
11614         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11615 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11616         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11617 $as_echo_n "checking for UNIQ... " >&6; }
11618         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11619 $as_echo "disabled" >&6; }
11620       else
11621         # Check if the provided tool contains a complete path.
11622         tool_specified="$UNIQ"
11623         tool_basename="${tool_specified##*/}"
11624         if test "x$tool_basename" = "x$tool_specified"; then
11625           # A command without a complete path is provided, search $PATH.
11626           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11627 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11628           # Extract the first word of "$tool_basename", so it can be a program name with args.
11629 set dummy $tool_basename; ac_word=$2
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11631 $as_echo_n "checking for $ac_word... " >&6; }
11632 if ${ac_cv_path_UNIQ+:} false; then :
11633   $as_echo_n "(cached) " >&6
11634 else
11635   case $UNIQ in
11636   [\\/]* | ?:[\\/]*)
11637   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11638   ;;
11639   *)
11640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11641 for as_dir in $PATH
11642 do
11643   IFS=$as_save_IFS
11644   test -z "$as_dir" && as_dir=.
11645     for ac_exec_ext in '' $ac_executable_extensions; do
11646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11647     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11649     break 2
11650   fi
11651 done
11652   done
11653 IFS=$as_save_IFS
11654 
11655   ;;
11656 esac
11657 fi
11658 UNIQ=$ac_cv_path_UNIQ
11659 if test -n "$UNIQ"; then
11660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11661 $as_echo "$UNIQ" >&6; }
11662 else
11663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11664 $as_echo "no" >&6; }
11665 fi
11666 
11667 
11668           if test "x$UNIQ" = x; then
11669             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11670           fi
11671         else
11672           # Otherwise we believe it is a complete path. Use it as it is.
11673           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11674 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11675           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11676 $as_echo_n "checking for UNIQ... " >&6; }
11677           if test ! -x "$tool_specified"; then
11678             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11679 $as_echo "not found" >&6; }
11680             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11681           fi
11682           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11683 $as_echo "$tool_specified" >&6; }
11684         fi
11685       fi
11686     fi
11687 
11688   fi
11689 
11690 
11691 
11692   if test "x$UNIQ" = x; then
11693     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11694   fi
11695 
11696 
11697 
11698 
11699 
11700   # Publish this variable in the help.
11701 
11702 
11703   if [ -z "${WC+x}" ]; then
11704     # The variable is not set by user, try to locate tool using the code snippet
11705     for ac_prog in wc
11706 do
11707   # Extract the first word of "$ac_prog", so it can be a program name with args.
11708 set dummy $ac_prog; ac_word=$2
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11710 $as_echo_n "checking for $ac_word... " >&6; }
11711 if ${ac_cv_path_WC+:} false; then :
11712   $as_echo_n "(cached) " >&6
11713 else
11714   case $WC in
11715   [\\/]* | ?:[\\/]*)
11716   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11717   ;;
11718   *)
11719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11720 for as_dir in $PATH
11721 do
11722   IFS=$as_save_IFS
11723   test -z "$as_dir" && as_dir=.
11724     for ac_exec_ext in '' $ac_executable_extensions; do
11725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11726     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11728     break 2
11729   fi
11730 done
11731   done
11732 IFS=$as_save_IFS
11733 
11734   ;;
11735 esac
11736 fi
11737 WC=$ac_cv_path_WC
11738 if test -n "$WC"; then
11739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11740 $as_echo "$WC" >&6; }
11741 else
11742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11743 $as_echo "no" >&6; }
11744 fi
11745 
11746 
11747   test -n "$WC" && break
11748 done
11749 
11750   else
11751     # The variable is set, but is it from the command line or the environment?
11752 
11753     # Try to remove the string !WC! from our list.
11754     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11755     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11756       # If it failed, the variable was not from the command line. Ignore it,
11757       # but warn the user (except for BASH, which is always set by the calling BASH).
11758       if test "xWC" != xBASH; then
11759         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11760 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11761       fi
11762       # Try to locate tool using the code snippet
11763       for ac_prog in wc
11764 do
11765   # Extract the first word of "$ac_prog", so it can be a program name with args.
11766 set dummy $ac_prog; ac_word=$2
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11768 $as_echo_n "checking for $ac_word... " >&6; }
11769 if ${ac_cv_path_WC+:} false; then :
11770   $as_echo_n "(cached) " >&6
11771 else
11772   case $WC in
11773   [\\/]* | ?:[\\/]*)
11774   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11775   ;;
11776   *)
11777   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11778 for as_dir in $PATH
11779 do
11780   IFS=$as_save_IFS
11781   test -z "$as_dir" && as_dir=.
11782     for ac_exec_ext in '' $ac_executable_extensions; do
11783   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11784     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11785     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11786     break 2
11787   fi
11788 done
11789   done
11790 IFS=$as_save_IFS
11791 
11792   ;;
11793 esac
11794 fi
11795 WC=$ac_cv_path_WC
11796 if test -n "$WC"; then
11797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11798 $as_echo "$WC" >&6; }
11799 else
11800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11801 $as_echo "no" >&6; }
11802 fi
11803 
11804 
11805   test -n "$WC" && break
11806 done
11807 
11808     else
11809       # If it succeeded, then it was overridden by the user. We will use it
11810       # for the tool.
11811 
11812       # First remove it from the list of overridden variables, so we can test
11813       # for unknown variables in the end.
11814       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11815 
11816       # Check if we try to supply an empty value
11817       if test "x$WC" = x; then
11818         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11819 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11820         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11821 $as_echo_n "checking for WC... " >&6; }
11822         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11823 $as_echo "disabled" >&6; }
11824       else
11825         # Check if the provided tool contains a complete path.
11826         tool_specified="$WC"
11827         tool_basename="${tool_specified##*/}"
11828         if test "x$tool_basename" = "x$tool_specified"; then
11829           # A command without a complete path is provided, search $PATH.
11830           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11831 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11832           # Extract the first word of "$tool_basename", so it can be a program name with args.
11833 set dummy $tool_basename; ac_word=$2
11834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11835 $as_echo_n "checking for $ac_word... " >&6; }
11836 if ${ac_cv_path_WC+:} false; then :
11837   $as_echo_n "(cached) " >&6
11838 else
11839   case $WC in
11840   [\\/]* | ?:[\\/]*)
11841   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11842   ;;
11843   *)
11844   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11845 for as_dir in $PATH
11846 do
11847   IFS=$as_save_IFS
11848   test -z "$as_dir" && as_dir=.
11849     for ac_exec_ext in '' $ac_executable_extensions; do
11850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11851     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11853     break 2
11854   fi
11855 done
11856   done
11857 IFS=$as_save_IFS
11858 
11859   ;;
11860 esac
11861 fi
11862 WC=$ac_cv_path_WC
11863 if test -n "$WC"; then
11864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11865 $as_echo "$WC" >&6; }
11866 else
11867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11868 $as_echo "no" >&6; }
11869 fi
11870 
11871 
11872           if test "x$WC" = x; then
11873             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11874           fi
11875         else
11876           # Otherwise we believe it is a complete path. Use it as it is.
11877           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11878 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11879           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11880 $as_echo_n "checking for WC... " >&6; }
11881           if test ! -x "$tool_specified"; then
11882             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11883 $as_echo "not found" >&6; }
11884             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11885           fi
11886           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11887 $as_echo "$tool_specified" >&6; }
11888         fi
11889       fi
11890     fi
11891 
11892   fi
11893 
11894 
11895 
11896   if test "x$WC" = x; then
11897     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11898   fi
11899 
11900 
11901 
11902 
11903 
11904   # Publish this variable in the help.
11905 
11906 
11907   if [ -z "${WHICH+x}" ]; then
11908     # The variable is not set by user, try to locate tool using the code snippet
11909     for ac_prog in which
11910 do
11911   # Extract the first word of "$ac_prog", so it can be a program name with args.
11912 set dummy $ac_prog; ac_word=$2
11913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11914 $as_echo_n "checking for $ac_word... " >&6; }
11915 if ${ac_cv_path_WHICH+:} false; then :
11916   $as_echo_n "(cached) " >&6
11917 else
11918   case $WHICH in
11919   [\\/]* | ?:[\\/]*)
11920   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11921   ;;
11922   *)
11923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11924 for as_dir in $PATH
11925 do
11926   IFS=$as_save_IFS
11927   test -z "$as_dir" && as_dir=.
11928     for ac_exec_ext in '' $ac_executable_extensions; do
11929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11930     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11932     break 2
11933   fi
11934 done
11935   done
11936 IFS=$as_save_IFS
11937 
11938   ;;
11939 esac
11940 fi
11941 WHICH=$ac_cv_path_WHICH
11942 if test -n "$WHICH"; then
11943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11944 $as_echo "$WHICH" >&6; }
11945 else
11946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11947 $as_echo "no" >&6; }
11948 fi
11949 
11950 
11951   test -n "$WHICH" && break
11952 done
11953 
11954   else
11955     # The variable is set, but is it from the command line or the environment?
11956 
11957     # Try to remove the string !WHICH! from our list.
11958     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11959     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11960       # If it failed, the variable was not from the command line. Ignore it,
11961       # but warn the user (except for BASH, which is always set by the calling BASH).
11962       if test "xWHICH" != xBASH; then
11963         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11964 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11965       fi
11966       # Try to locate tool using the code snippet
11967       for ac_prog in which
11968 do
11969   # Extract the first word of "$ac_prog", so it can be a program name with args.
11970 set dummy $ac_prog; ac_word=$2
11971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11972 $as_echo_n "checking for $ac_word... " >&6; }
11973 if ${ac_cv_path_WHICH+:} false; then :
11974   $as_echo_n "(cached) " >&6
11975 else
11976   case $WHICH in
11977   [\\/]* | ?:[\\/]*)
11978   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11979   ;;
11980   *)
11981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11982 for as_dir in $PATH
11983 do
11984   IFS=$as_save_IFS
11985   test -z "$as_dir" && as_dir=.
11986     for ac_exec_ext in '' $ac_executable_extensions; do
11987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11988     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11990     break 2
11991   fi
11992 done
11993   done
11994 IFS=$as_save_IFS
11995 
11996   ;;
11997 esac
11998 fi
11999 WHICH=$ac_cv_path_WHICH
12000 if test -n "$WHICH"; then
12001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12002 $as_echo "$WHICH" >&6; }
12003 else
12004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12005 $as_echo "no" >&6; }
12006 fi
12007 
12008 
12009   test -n "$WHICH" && break
12010 done
12011 
12012     else
12013       # If it succeeded, then it was overridden by the user. We will use it
12014       # for the tool.
12015 
12016       # First remove it from the list of overridden variables, so we can test
12017       # for unknown variables in the end.
12018       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12019 
12020       # Check if we try to supply an empty value
12021       if test "x$WHICH" = x; then
12022         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12023 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12024         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12025 $as_echo_n "checking for WHICH... " >&6; }
12026         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12027 $as_echo "disabled" >&6; }
12028       else
12029         # Check if the provided tool contains a complete path.
12030         tool_specified="$WHICH"
12031         tool_basename="${tool_specified##*/}"
12032         if test "x$tool_basename" = "x$tool_specified"; then
12033           # A command without a complete path is provided, search $PATH.
12034           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12035 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12036           # Extract the first word of "$tool_basename", so it can be a program name with args.
12037 set dummy $tool_basename; ac_word=$2
12038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12039 $as_echo_n "checking for $ac_word... " >&6; }
12040 if ${ac_cv_path_WHICH+:} false; then :
12041   $as_echo_n "(cached) " >&6
12042 else
12043   case $WHICH in
12044   [\\/]* | ?:[\\/]*)
12045   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12046   ;;
12047   *)
12048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12049 for as_dir in $PATH
12050 do
12051   IFS=$as_save_IFS
12052   test -z "$as_dir" && as_dir=.
12053     for ac_exec_ext in '' $ac_executable_extensions; do
12054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12055     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12057     break 2
12058   fi
12059 done
12060   done
12061 IFS=$as_save_IFS
12062 
12063   ;;
12064 esac
12065 fi
12066 WHICH=$ac_cv_path_WHICH
12067 if test -n "$WHICH"; then
12068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12069 $as_echo "$WHICH" >&6; }
12070 else
12071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12072 $as_echo "no" >&6; }
12073 fi
12074 
12075 
12076           if test "x$WHICH" = x; then
12077             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12078           fi
12079         else
12080           # Otherwise we believe it is a complete path. Use it as it is.
12081           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12082 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12083           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12084 $as_echo_n "checking for WHICH... " >&6; }
12085           if test ! -x "$tool_specified"; then
12086             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12087 $as_echo "not found" >&6; }
12088             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12089           fi
12090           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12091 $as_echo "$tool_specified" >&6; }
12092         fi
12093       fi
12094     fi
12095 
12096   fi
12097 
12098 
12099 
12100   if test "x$WHICH" = x; then
12101     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12102   fi
12103 
12104 
12105 
12106 
12107 
12108   # Publish this variable in the help.
12109 
12110 
12111   if [ -z "${XARGS+x}" ]; then
12112     # The variable is not set by user, try to locate tool using the code snippet
12113     for ac_prog in xargs
12114 do
12115   # Extract the first word of "$ac_prog", so it can be a program name with args.
12116 set dummy $ac_prog; ac_word=$2
12117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12118 $as_echo_n "checking for $ac_word... " >&6; }
12119 if ${ac_cv_path_XARGS+:} false; then :
12120   $as_echo_n "(cached) " >&6
12121 else
12122   case $XARGS in
12123   [\\/]* | ?:[\\/]*)
12124   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12125   ;;
12126   *)
12127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12128 for as_dir in $PATH
12129 do
12130   IFS=$as_save_IFS
12131   test -z "$as_dir" && as_dir=.
12132     for ac_exec_ext in '' $ac_executable_extensions; do
12133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12134     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12136     break 2
12137   fi
12138 done
12139   done
12140 IFS=$as_save_IFS
12141 
12142   ;;
12143 esac
12144 fi
12145 XARGS=$ac_cv_path_XARGS
12146 if test -n "$XARGS"; then
12147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12148 $as_echo "$XARGS" >&6; }
12149 else
12150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151 $as_echo "no" >&6; }
12152 fi
12153 
12154 
12155   test -n "$XARGS" && break
12156 done
12157 
12158   else
12159     # The variable is set, but is it from the command line or the environment?
12160 
12161     # Try to remove the string !XARGS! from our list.
12162     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12163     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12164       # If it failed, the variable was not from the command line. Ignore it,
12165       # but warn the user (except for BASH, which is always set by the calling BASH).
12166       if test "xXARGS" != xBASH; then
12167         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12168 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12169       fi
12170       # Try to locate tool using the code snippet
12171       for ac_prog in xargs
12172 do
12173   # Extract the first word of "$ac_prog", so it can be a program name with args.
12174 set dummy $ac_prog; ac_word=$2
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12176 $as_echo_n "checking for $ac_word... " >&6; }
12177 if ${ac_cv_path_XARGS+:} false; then :
12178   $as_echo_n "(cached) " >&6
12179 else
12180   case $XARGS in
12181   [\\/]* | ?:[\\/]*)
12182   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12183   ;;
12184   *)
12185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12186 for as_dir in $PATH
12187 do
12188   IFS=$as_save_IFS
12189   test -z "$as_dir" && as_dir=.
12190     for ac_exec_ext in '' $ac_executable_extensions; do
12191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12192     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12194     break 2
12195   fi
12196 done
12197   done
12198 IFS=$as_save_IFS
12199 
12200   ;;
12201 esac
12202 fi
12203 XARGS=$ac_cv_path_XARGS
12204 if test -n "$XARGS"; then
12205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12206 $as_echo "$XARGS" >&6; }
12207 else
12208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12209 $as_echo "no" >&6; }
12210 fi
12211 
12212 
12213   test -n "$XARGS" && break
12214 done
12215 
12216     else
12217       # If it succeeded, then it was overridden by the user. We will use it
12218       # for the tool.
12219 
12220       # First remove it from the list of overridden variables, so we can test
12221       # for unknown variables in the end.
12222       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12223 
12224       # Check if we try to supply an empty value
12225       if test "x$XARGS" = x; then
12226         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12227 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12228         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12229 $as_echo_n "checking for XARGS... " >&6; }
12230         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12231 $as_echo "disabled" >&6; }
12232       else
12233         # Check if the provided tool contains a complete path.
12234         tool_specified="$XARGS"
12235         tool_basename="${tool_specified##*/}"
12236         if test "x$tool_basename" = "x$tool_specified"; then
12237           # A command without a complete path is provided, search $PATH.
12238           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12239 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12240           # Extract the first word of "$tool_basename", so it can be a program name with args.
12241 set dummy $tool_basename; ac_word=$2
12242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12243 $as_echo_n "checking for $ac_word... " >&6; }
12244 if ${ac_cv_path_XARGS+:} false; then :
12245   $as_echo_n "(cached) " >&6
12246 else
12247   case $XARGS in
12248   [\\/]* | ?:[\\/]*)
12249   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12250   ;;
12251   *)
12252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12253 for as_dir in $PATH
12254 do
12255   IFS=$as_save_IFS
12256   test -z "$as_dir" && as_dir=.
12257     for ac_exec_ext in '' $ac_executable_extensions; do
12258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12259     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12261     break 2
12262   fi
12263 done
12264   done
12265 IFS=$as_save_IFS
12266 
12267   ;;
12268 esac
12269 fi
12270 XARGS=$ac_cv_path_XARGS
12271 if test -n "$XARGS"; then
12272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12273 $as_echo "$XARGS" >&6; }
12274 else
12275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12276 $as_echo "no" >&6; }
12277 fi
12278 
12279 
12280           if test "x$XARGS" = x; then
12281             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12282           fi
12283         else
12284           # Otherwise we believe it is a complete path. Use it as it is.
12285           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12286 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12287           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12288 $as_echo_n "checking for XARGS... " >&6; }
12289           if test ! -x "$tool_specified"; then
12290             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12291 $as_echo "not found" >&6; }
12292             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12293           fi
12294           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12295 $as_echo "$tool_specified" >&6; }
12296         fi
12297       fi
12298     fi
12299 
12300   fi
12301 
12302 
12303 
12304   if test "x$XARGS" = x; then
12305     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12306   fi
12307 
12308 
12309 
12310   # Then required tools that require some special treatment.
12311 
12312 
12313   # Publish this variable in the help.
12314 
12315 
12316   if [ -z "${AWK+x}" ]; then
12317     # The variable is not set by user, try to locate tool using the code snippet
12318     for ac_prog in gawk mawk nawk awk
12319 do
12320   # Extract the first word of "$ac_prog", so it can be a program name with args.
12321 set dummy $ac_prog; ac_word=$2
12322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12323 $as_echo_n "checking for $ac_word... " >&6; }
12324 if ${ac_cv_prog_AWK+:} false; then :
12325   $as_echo_n "(cached) " >&6
12326 else
12327   if test -n "$AWK"; then
12328   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12329 else
12330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12331 for as_dir in $PATH
12332 do
12333   IFS=$as_save_IFS
12334   test -z "$as_dir" && as_dir=.
12335     for ac_exec_ext in '' $ac_executable_extensions; do
12336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12337     ac_cv_prog_AWK="$ac_prog"
12338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12339     break 2
12340   fi
12341 done
12342   done
12343 IFS=$as_save_IFS
12344 
12345 fi
12346 fi
12347 AWK=$ac_cv_prog_AWK
12348 if test -n "$AWK"; then
12349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12350 $as_echo "$AWK" >&6; }
12351 else
12352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12353 $as_echo "no" >&6; }
12354 fi
12355 
12356 
12357   test -n "$AWK" && break
12358 done
12359 
12360   else
12361     # The variable is set, but is it from the command line or the environment?
12362 
12363     # Try to remove the string !AWK! from our list.
12364     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12365     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12366       # If it failed, the variable was not from the command line. Ignore it,
12367       # but warn the user (except for BASH, which is always set by the calling BASH).
12368       if test "xAWK" != xBASH; then
12369         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12370 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12371       fi
12372       # Try to locate tool using the code snippet
12373       for ac_prog in gawk mawk nawk awk
12374 do
12375   # Extract the first word of "$ac_prog", so it can be a program name with args.
12376 set dummy $ac_prog; ac_word=$2
12377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12378 $as_echo_n "checking for $ac_word... " >&6; }
12379 if ${ac_cv_prog_AWK+:} false; then :
12380   $as_echo_n "(cached) " >&6
12381 else
12382   if test -n "$AWK"; then
12383   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12384 else
12385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12386 for as_dir in $PATH
12387 do
12388   IFS=$as_save_IFS
12389   test -z "$as_dir" && as_dir=.
12390     for ac_exec_ext in '' $ac_executable_extensions; do
12391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12392     ac_cv_prog_AWK="$ac_prog"
12393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12394     break 2
12395   fi
12396 done
12397   done
12398 IFS=$as_save_IFS
12399 
12400 fi
12401 fi
12402 AWK=$ac_cv_prog_AWK
12403 if test -n "$AWK"; then
12404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12405 $as_echo "$AWK" >&6; }
12406 else
12407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12408 $as_echo "no" >&6; }
12409 fi
12410 
12411 
12412   test -n "$AWK" && break
12413 done
12414 
12415     else
12416       # If it succeeded, then it was overridden by the user. We will use it
12417       # for the tool.
12418 
12419       # First remove it from the list of overridden variables, so we can test
12420       # for unknown variables in the end.
12421       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12422 
12423       # Check if we try to supply an empty value
12424       if test "x$AWK" = x; then
12425         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12426 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12427         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12428 $as_echo_n "checking for AWK... " >&6; }
12429         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12430 $as_echo "disabled" >&6; }
12431       else
12432         # Check if the provided tool contains a complete path.
12433         tool_specified="$AWK"
12434         tool_basename="${tool_specified##*/}"
12435         if test "x$tool_basename" = "x$tool_specified"; then
12436           # A command without a complete path is provided, search $PATH.
12437           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12438 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12439           # Extract the first word of "$tool_basename", so it can be a program name with args.
12440 set dummy $tool_basename; ac_word=$2
12441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12442 $as_echo_n "checking for $ac_word... " >&6; }
12443 if ${ac_cv_path_AWK+:} false; then :
12444   $as_echo_n "(cached) " >&6
12445 else
12446   case $AWK in
12447   [\\/]* | ?:[\\/]*)
12448   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12449   ;;
12450   *)
12451   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12452 for as_dir in $PATH
12453 do
12454   IFS=$as_save_IFS
12455   test -z "$as_dir" && as_dir=.
12456     for ac_exec_ext in '' $ac_executable_extensions; do
12457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12458     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12460     break 2
12461   fi
12462 done
12463   done
12464 IFS=$as_save_IFS
12465 
12466   ;;
12467 esac
12468 fi
12469 AWK=$ac_cv_path_AWK
12470 if test -n "$AWK"; then
12471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12472 $as_echo "$AWK" >&6; }
12473 else
12474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12475 $as_echo "no" >&6; }
12476 fi
12477 
12478 
12479           if test "x$AWK" = x; then
12480             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12481           fi
12482         else
12483           # Otherwise we believe it is a complete path. Use it as it is.
12484           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12485 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12486           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12487 $as_echo_n "checking for AWK... " >&6; }
12488           if test ! -x "$tool_specified"; then
12489             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12490 $as_echo "not found" >&6; }
12491             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12492           fi
12493           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12494 $as_echo "$tool_specified" >&6; }
12495         fi
12496       fi
12497     fi
12498 
12499   fi
12500 
12501 
12502   if test "x$AWK" = x; then
12503     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12504   fi
12505 
12506 
12507 
12508 
12509   # Publish this variable in the help.
12510 
12511 
12512   if [ -z "${GREP+x}" ]; then
12513     # The variable is not set by user, try to locate tool using the code snippet
12514     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12515 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12516 if ${ac_cv_path_GREP+:} false; then :
12517   $as_echo_n "(cached) " >&6
12518 else
12519   if test -z "$GREP"; then
12520   ac_path_GREP_found=false
12521   # Loop through the user's path and test for each of PROGNAME-LIST
12522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12523 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12524 do
12525   IFS=$as_save_IFS
12526   test -z "$as_dir" && as_dir=.
12527     for ac_prog in grep ggrep; do
12528     for ac_exec_ext in '' $ac_executable_extensions; do
12529       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12530       as_fn_executable_p "$ac_path_GREP" || continue
12531 # Check for GNU ac_path_GREP and select it if it is found.
12532   # Check for GNU $ac_path_GREP
12533 case `"$ac_path_GREP" --version 2>&1` in
12534 *GNU*)
12535   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12536 *)
12537   ac_count=0
12538   $as_echo_n 0123456789 >"conftest.in"
12539   while :
12540   do
12541     cat "conftest.in" "conftest.in" >"conftest.tmp"
12542     mv "conftest.tmp" "conftest.in"
12543     cp "conftest.in" "conftest.nl"
12544     $as_echo 'GREP' >> "conftest.nl"
12545     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12546     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12547     as_fn_arith $ac_count + 1 && ac_count=$as_val
12548     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12549       # Best one so far, save it but keep looking for a better one
12550       ac_cv_path_GREP="$ac_path_GREP"
12551       ac_path_GREP_max=$ac_count
12552     fi
12553     # 10*(2^10) chars as input seems more than enough
12554     test $ac_count -gt 10 && break
12555   done
12556   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12557 esac
12558 
12559       $ac_path_GREP_found && break 3
12560     done
12561   done
12562   done
12563 IFS=$as_save_IFS
12564   if test -z "$ac_cv_path_GREP"; then
12565     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12566   fi
12567 else
12568   ac_cv_path_GREP=$GREP
12569 fi
12570 
12571 fi
12572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12573 $as_echo "$ac_cv_path_GREP" >&6; }
12574  GREP="$ac_cv_path_GREP"
12575 
12576 
12577   else
12578     # The variable is set, but is it from the command line or the environment?
12579 
12580     # Try to remove the string !GREP! from our list.
12581     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12582     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12583       # If it failed, the variable was not from the command line. Ignore it,
12584       # but warn the user (except for BASH, which is always set by the calling BASH).
12585       if test "xGREP" != xBASH; then
12586         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12587 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12588       fi
12589       # Try to locate tool using the code snippet
12590       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12591 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12592 if ${ac_cv_path_GREP+:} false; then :
12593   $as_echo_n "(cached) " >&6
12594 else
12595   if test -z "$GREP"; then
12596   ac_path_GREP_found=false
12597   # Loop through the user's path and test for each of PROGNAME-LIST
12598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12599 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12600 do
12601   IFS=$as_save_IFS
12602   test -z "$as_dir" && as_dir=.
12603     for ac_prog in grep ggrep; do
12604     for ac_exec_ext in '' $ac_executable_extensions; do
12605       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12606       as_fn_executable_p "$ac_path_GREP" || continue
12607 # Check for GNU ac_path_GREP and select it if it is found.
12608   # Check for GNU $ac_path_GREP
12609 case `"$ac_path_GREP" --version 2>&1` in
12610 *GNU*)
12611   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12612 *)
12613   ac_count=0
12614   $as_echo_n 0123456789 >"conftest.in"
12615   while :
12616   do
12617     cat "conftest.in" "conftest.in" >"conftest.tmp"
12618     mv "conftest.tmp" "conftest.in"
12619     cp "conftest.in" "conftest.nl"
12620     $as_echo 'GREP' >> "conftest.nl"
12621     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12622     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12623     as_fn_arith $ac_count + 1 && ac_count=$as_val
12624     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12625       # Best one so far, save it but keep looking for a better one
12626       ac_cv_path_GREP="$ac_path_GREP"
12627       ac_path_GREP_max=$ac_count
12628     fi
12629     # 10*(2^10) chars as input seems more than enough
12630     test $ac_count -gt 10 && break
12631   done
12632   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12633 esac
12634 
12635       $ac_path_GREP_found && break 3
12636     done
12637   done
12638   done
12639 IFS=$as_save_IFS
12640   if test -z "$ac_cv_path_GREP"; then
12641     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12642   fi
12643 else
12644   ac_cv_path_GREP=$GREP
12645 fi
12646 
12647 fi
12648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12649 $as_echo "$ac_cv_path_GREP" >&6; }
12650  GREP="$ac_cv_path_GREP"
12651 
12652 
12653     else
12654       # If it succeeded, then it was overridden by the user. We will use it
12655       # for the tool.
12656 
12657       # First remove it from the list of overridden variables, so we can test
12658       # for unknown variables in the end.
12659       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12660 
12661       # Check if we try to supply an empty value
12662       if test "x$GREP" = x; then
12663         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12664 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12665         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12666 $as_echo_n "checking for GREP... " >&6; }
12667         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12668 $as_echo "disabled" >&6; }
12669       else
12670         # Check if the provided tool contains a complete path.
12671         tool_specified="$GREP"
12672         tool_basename="${tool_specified##*/}"
12673         if test "x$tool_basename" = "x$tool_specified"; then
12674           # A command without a complete path is provided, search $PATH.
12675           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12676 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12677           # Extract the first word of "$tool_basename", so it can be a program name with args.
12678 set dummy $tool_basename; ac_word=$2
12679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12680 $as_echo_n "checking for $ac_word... " >&6; }
12681 if ${ac_cv_path_GREP+:} false; then :
12682   $as_echo_n "(cached) " >&6
12683 else
12684   case $GREP in
12685   [\\/]* | ?:[\\/]*)
12686   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12687   ;;
12688   *)
12689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12690 for as_dir in $PATH
12691 do
12692   IFS=$as_save_IFS
12693   test -z "$as_dir" && as_dir=.
12694     for ac_exec_ext in '' $ac_executable_extensions; do
12695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12696     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12698     break 2
12699   fi
12700 done
12701   done
12702 IFS=$as_save_IFS
12703 
12704   ;;
12705 esac
12706 fi
12707 GREP=$ac_cv_path_GREP
12708 if test -n "$GREP"; then
12709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12710 $as_echo "$GREP" >&6; }
12711 else
12712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12713 $as_echo "no" >&6; }
12714 fi
12715 
12716 
12717           if test "x$GREP" = x; then
12718             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12719           fi
12720         else
12721           # Otherwise we believe it is a complete path. Use it as it is.
12722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12723 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12724           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12725 $as_echo_n "checking for GREP... " >&6; }
12726           if test ! -x "$tool_specified"; then
12727             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12728 $as_echo "not found" >&6; }
12729             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12730           fi
12731           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12732 $as_echo "$tool_specified" >&6; }
12733         fi
12734       fi
12735     fi
12736 
12737   fi
12738 
12739 
12740   if test "x$GREP" = x; then
12741     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12742   fi
12743 
12744 
12745 
12746 
12747   # Publish this variable in the help.
12748 
12749 
12750   if [ -z "${EGREP+x}" ]; then
12751     # The variable is not set by user, try to locate tool using the code snippet
12752     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12753 $as_echo_n "checking for egrep... " >&6; }
12754 if ${ac_cv_path_EGREP+:} false; then :
12755   $as_echo_n "(cached) " >&6
12756 else
12757   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12758    then ac_cv_path_EGREP="$GREP -E"
12759    else
12760      if test -z "$EGREP"; then
12761   ac_path_EGREP_found=false
12762   # Loop through the user's path and test for each of PROGNAME-LIST
12763   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12764 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12765 do
12766   IFS=$as_save_IFS
12767   test -z "$as_dir" && as_dir=.
12768     for ac_prog in egrep; do
12769     for ac_exec_ext in '' $ac_executable_extensions; do
12770       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12771       as_fn_executable_p "$ac_path_EGREP" || continue
12772 # Check for GNU ac_path_EGREP and select it if it is found.
12773   # Check for GNU $ac_path_EGREP
12774 case `"$ac_path_EGREP" --version 2>&1` in
12775 *GNU*)
12776   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12777 *)
12778   ac_count=0
12779   $as_echo_n 0123456789 >"conftest.in"
12780   while :
12781   do
12782     cat "conftest.in" "conftest.in" >"conftest.tmp"
12783     mv "conftest.tmp" "conftest.in"
12784     cp "conftest.in" "conftest.nl"
12785     $as_echo 'EGREP' >> "conftest.nl"
12786     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12787     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12788     as_fn_arith $ac_count + 1 && ac_count=$as_val
12789     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12790       # Best one so far, save it but keep looking for a better one
12791       ac_cv_path_EGREP="$ac_path_EGREP"
12792       ac_path_EGREP_max=$ac_count
12793     fi
12794     # 10*(2^10) chars as input seems more than enough
12795     test $ac_count -gt 10 && break
12796   done
12797   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12798 esac
12799 
12800       $ac_path_EGREP_found && break 3
12801     done
12802   done
12803   done
12804 IFS=$as_save_IFS
12805   if test -z "$ac_cv_path_EGREP"; then
12806     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12807   fi
12808 else
12809   ac_cv_path_EGREP=$EGREP
12810 fi
12811 
12812    fi
12813 fi
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12815 $as_echo "$ac_cv_path_EGREP" >&6; }
12816  EGREP="$ac_cv_path_EGREP"
12817 
12818 
12819   else
12820     # The variable is set, but is it from the command line or the environment?
12821 
12822     # Try to remove the string !EGREP! from our list.
12823     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12824     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12825       # If it failed, the variable was not from the command line. Ignore it,
12826       # but warn the user (except for BASH, which is always set by the calling BASH).
12827       if test "xEGREP" != xBASH; then
12828         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12829 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12830       fi
12831       # Try to locate tool using the code snippet
12832       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12833 $as_echo_n "checking for egrep... " >&6; }
12834 if ${ac_cv_path_EGREP+:} false; then :
12835   $as_echo_n "(cached) " >&6
12836 else
12837   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12838    then ac_cv_path_EGREP="$GREP -E"
12839    else
12840      if test -z "$EGREP"; then
12841   ac_path_EGREP_found=false
12842   # Loop through the user's path and test for each of PROGNAME-LIST
12843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12844 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12845 do
12846   IFS=$as_save_IFS
12847   test -z "$as_dir" && as_dir=.
12848     for ac_prog in egrep; do
12849     for ac_exec_ext in '' $ac_executable_extensions; do
12850       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12851       as_fn_executable_p "$ac_path_EGREP" || continue
12852 # Check for GNU ac_path_EGREP and select it if it is found.
12853   # Check for GNU $ac_path_EGREP
12854 case `"$ac_path_EGREP" --version 2>&1` in
12855 *GNU*)
12856   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12857 *)
12858   ac_count=0
12859   $as_echo_n 0123456789 >"conftest.in"
12860   while :
12861   do
12862     cat "conftest.in" "conftest.in" >"conftest.tmp"
12863     mv "conftest.tmp" "conftest.in"
12864     cp "conftest.in" "conftest.nl"
12865     $as_echo 'EGREP' >> "conftest.nl"
12866     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12867     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12868     as_fn_arith $ac_count + 1 && ac_count=$as_val
12869     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12870       # Best one so far, save it but keep looking for a better one
12871       ac_cv_path_EGREP="$ac_path_EGREP"
12872       ac_path_EGREP_max=$ac_count
12873     fi
12874     # 10*(2^10) chars as input seems more than enough
12875     test $ac_count -gt 10 && break
12876   done
12877   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12878 esac
12879 
12880       $ac_path_EGREP_found && break 3
12881     done
12882   done
12883   done
12884 IFS=$as_save_IFS
12885   if test -z "$ac_cv_path_EGREP"; then
12886     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12887   fi
12888 else
12889   ac_cv_path_EGREP=$EGREP
12890 fi
12891 
12892    fi
12893 fi
12894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12895 $as_echo "$ac_cv_path_EGREP" >&6; }
12896  EGREP="$ac_cv_path_EGREP"
12897 
12898 
12899     else
12900       # If it succeeded, then it was overridden by the user. We will use it
12901       # for the tool.
12902 
12903       # First remove it from the list of overridden variables, so we can test
12904       # for unknown variables in the end.
12905       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12906 
12907       # Check if we try to supply an empty value
12908       if test "x$EGREP" = x; then
12909         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12910 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12911         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12912 $as_echo_n "checking for EGREP... " >&6; }
12913         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12914 $as_echo "disabled" >&6; }
12915       else
12916         # Check if the provided tool contains a complete path.
12917         tool_specified="$EGREP"
12918         tool_basename="${tool_specified##*/}"
12919         if test "x$tool_basename" = "x$tool_specified"; then
12920           # A command without a complete path is provided, search $PATH.
12921           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12922 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12923           # Extract the first word of "$tool_basename", so it can be a program name with args.
12924 set dummy $tool_basename; ac_word=$2
12925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12926 $as_echo_n "checking for $ac_word... " >&6; }
12927 if ${ac_cv_path_EGREP+:} false; then :
12928   $as_echo_n "(cached) " >&6
12929 else
12930   case $EGREP in
12931   [\\/]* | ?:[\\/]*)
12932   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12933   ;;
12934   *)
12935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12936 for as_dir in $PATH
12937 do
12938   IFS=$as_save_IFS
12939   test -z "$as_dir" && as_dir=.
12940     for ac_exec_ext in '' $ac_executable_extensions; do
12941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12942     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12944     break 2
12945   fi
12946 done
12947   done
12948 IFS=$as_save_IFS
12949 
12950   ;;
12951 esac
12952 fi
12953 EGREP=$ac_cv_path_EGREP
12954 if test -n "$EGREP"; then
12955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12956 $as_echo "$EGREP" >&6; }
12957 else
12958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12959 $as_echo "no" >&6; }
12960 fi
12961 
12962 
12963           if test "x$EGREP" = x; then
12964             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12965           fi
12966         else
12967           # Otherwise we believe it is a complete path. Use it as it is.
12968           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12969 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12970           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12971 $as_echo_n "checking for EGREP... " >&6; }
12972           if test ! -x "$tool_specified"; then
12973             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12974 $as_echo "not found" >&6; }
12975             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12976           fi
12977           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12978 $as_echo "$tool_specified" >&6; }
12979         fi
12980       fi
12981     fi
12982 
12983   fi
12984 
12985 
12986   if test "x$EGREP" = x; then
12987     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12988   fi
12989 
12990 
12991 
12992 
12993   # Publish this variable in the help.
12994 
12995 
12996   if [ -z "${FGREP+x}" ]; then
12997     # The variable is not set by user, try to locate tool using the code snippet
12998     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12999 $as_echo_n "checking for fgrep... " >&6; }
13000 if ${ac_cv_path_FGREP+:} false; then :
13001   $as_echo_n "(cached) " >&6
13002 else
13003   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13004    then ac_cv_path_FGREP="$GREP -F"
13005    else
13006      if test -z "$FGREP"; then
13007   ac_path_FGREP_found=false
13008   # Loop through the user's path and test for each of PROGNAME-LIST
13009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13010 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13011 do
13012   IFS=$as_save_IFS
13013   test -z "$as_dir" && as_dir=.
13014     for ac_prog in fgrep; do
13015     for ac_exec_ext in '' $ac_executable_extensions; do
13016       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13017       as_fn_executable_p "$ac_path_FGREP" || continue
13018 # Check for GNU ac_path_FGREP and select it if it is found.
13019   # Check for GNU $ac_path_FGREP
13020 case `"$ac_path_FGREP" --version 2>&1` in
13021 *GNU*)
13022   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13023 *)
13024   ac_count=0
13025   $as_echo_n 0123456789 >"conftest.in"
13026   while :
13027   do
13028     cat "conftest.in" "conftest.in" >"conftest.tmp"
13029     mv "conftest.tmp" "conftest.in"
13030     cp "conftest.in" "conftest.nl"
13031     $as_echo 'FGREP' >> "conftest.nl"
13032     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13033     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13034     as_fn_arith $ac_count + 1 && ac_count=$as_val
13035     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13036       # Best one so far, save it but keep looking for a better one
13037       ac_cv_path_FGREP="$ac_path_FGREP"
13038       ac_path_FGREP_max=$ac_count
13039     fi
13040     # 10*(2^10) chars as input seems more than enough
13041     test $ac_count -gt 10 && break
13042   done
13043   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13044 esac
13045 
13046       $ac_path_FGREP_found && break 3
13047     done
13048   done
13049   done
13050 IFS=$as_save_IFS
13051   if test -z "$ac_cv_path_FGREP"; then
13052     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13053   fi
13054 else
13055   ac_cv_path_FGREP=$FGREP
13056 fi
13057 
13058    fi
13059 fi
13060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13061 $as_echo "$ac_cv_path_FGREP" >&6; }
13062  FGREP="$ac_cv_path_FGREP"
13063 
13064 
13065   else
13066     # The variable is set, but is it from the command line or the environment?
13067 
13068     # Try to remove the string !FGREP! from our list.
13069     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13070     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13071       # If it failed, the variable was not from the command line. Ignore it,
13072       # but warn the user (except for BASH, which is always set by the calling BASH).
13073       if test "xFGREP" != xBASH; then
13074         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13075 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13076       fi
13077       # Try to locate tool using the code snippet
13078       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13079 $as_echo_n "checking for fgrep... " >&6; }
13080 if ${ac_cv_path_FGREP+:} false; then :
13081   $as_echo_n "(cached) " >&6
13082 else
13083   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13084    then ac_cv_path_FGREP="$GREP -F"
13085    else
13086      if test -z "$FGREP"; then
13087   ac_path_FGREP_found=false
13088   # Loop through the user's path and test for each of PROGNAME-LIST
13089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13090 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13091 do
13092   IFS=$as_save_IFS
13093   test -z "$as_dir" && as_dir=.
13094     for ac_prog in fgrep; do
13095     for ac_exec_ext in '' $ac_executable_extensions; do
13096       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13097       as_fn_executable_p "$ac_path_FGREP" || continue
13098 # Check for GNU ac_path_FGREP and select it if it is found.
13099   # Check for GNU $ac_path_FGREP
13100 case `"$ac_path_FGREP" --version 2>&1` in
13101 *GNU*)
13102   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13103 *)
13104   ac_count=0
13105   $as_echo_n 0123456789 >"conftest.in"
13106   while :
13107   do
13108     cat "conftest.in" "conftest.in" >"conftest.tmp"
13109     mv "conftest.tmp" "conftest.in"
13110     cp "conftest.in" "conftest.nl"
13111     $as_echo 'FGREP' >> "conftest.nl"
13112     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13113     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13114     as_fn_arith $ac_count + 1 && ac_count=$as_val
13115     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13116       # Best one so far, save it but keep looking for a better one
13117       ac_cv_path_FGREP="$ac_path_FGREP"
13118       ac_path_FGREP_max=$ac_count
13119     fi
13120     # 10*(2^10) chars as input seems more than enough
13121     test $ac_count -gt 10 && break
13122   done
13123   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13124 esac
13125 
13126       $ac_path_FGREP_found && break 3
13127     done
13128   done
13129   done
13130 IFS=$as_save_IFS
13131   if test -z "$ac_cv_path_FGREP"; then
13132     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13133   fi
13134 else
13135   ac_cv_path_FGREP=$FGREP
13136 fi
13137 
13138    fi
13139 fi
13140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13141 $as_echo "$ac_cv_path_FGREP" >&6; }
13142  FGREP="$ac_cv_path_FGREP"
13143 
13144 
13145     else
13146       # If it succeeded, then it was overridden by the user. We will use it
13147       # for the tool.
13148 
13149       # First remove it from the list of overridden variables, so we can test
13150       # for unknown variables in the end.
13151       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13152 
13153       # Check if we try to supply an empty value
13154       if test "x$FGREP" = x; then
13155         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13156 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13157         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13158 $as_echo_n "checking for FGREP... " >&6; }
13159         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13160 $as_echo "disabled" >&6; }
13161       else
13162         # Check if the provided tool contains a complete path.
13163         tool_specified="$FGREP"
13164         tool_basename="${tool_specified##*/}"
13165         if test "x$tool_basename" = "x$tool_specified"; then
13166           # A command without a complete path is provided, search $PATH.
13167           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13168 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13169           # Extract the first word of "$tool_basename", so it can be a program name with args.
13170 set dummy $tool_basename; ac_word=$2
13171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13172 $as_echo_n "checking for $ac_word... " >&6; }
13173 if ${ac_cv_path_FGREP+:} false; then :
13174   $as_echo_n "(cached) " >&6
13175 else
13176   case $FGREP in
13177   [\\/]* | ?:[\\/]*)
13178   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13179   ;;
13180   *)
13181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13182 for as_dir in $PATH
13183 do
13184   IFS=$as_save_IFS
13185   test -z "$as_dir" && as_dir=.
13186     for ac_exec_ext in '' $ac_executable_extensions; do
13187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13188     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13190     break 2
13191   fi
13192 done
13193   done
13194 IFS=$as_save_IFS
13195 
13196   ;;
13197 esac
13198 fi
13199 FGREP=$ac_cv_path_FGREP
13200 if test -n "$FGREP"; then
13201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13202 $as_echo "$FGREP" >&6; }
13203 else
13204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13205 $as_echo "no" >&6; }
13206 fi
13207 
13208 
13209           if test "x$FGREP" = x; then
13210             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13211           fi
13212         else
13213           # Otherwise we believe it is a complete path. Use it as it is.
13214           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13215 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13216           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13217 $as_echo_n "checking for FGREP... " >&6; }
13218           if test ! -x "$tool_specified"; then
13219             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13220 $as_echo "not found" >&6; }
13221             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13222           fi
13223           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13224 $as_echo "$tool_specified" >&6; }
13225         fi
13226       fi
13227     fi
13228 
13229   fi
13230 
13231 
13232   if test "x$FGREP" = x; then
13233     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13234   fi
13235 
13236 
13237 
13238 
13239   # Publish this variable in the help.
13240 
13241 
13242   if [ -z "${SED+x}" ]; then
13243     # The variable is not set by user, try to locate tool using the code snippet
13244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13245 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13246 if ${ac_cv_path_SED+:} false; then :
13247   $as_echo_n "(cached) " >&6
13248 else
13249             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13250      for ac_i in 1 2 3 4 5 6 7; do
13251        ac_script="$ac_script$as_nl$ac_script"
13252      done
13253      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13254      { ac_script=; unset ac_script;}
13255      if test -z "$SED"; then
13256   ac_path_SED_found=false
13257   # Loop through the user's path and test for each of PROGNAME-LIST
13258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13259 for as_dir in $PATH
13260 do
13261   IFS=$as_save_IFS
13262   test -z "$as_dir" && as_dir=.
13263     for ac_prog in sed gsed; do
13264     for ac_exec_ext in '' $ac_executable_extensions; do
13265       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13266       as_fn_executable_p "$ac_path_SED" || continue
13267 # Check for GNU ac_path_SED and select it if it is found.
13268   # Check for GNU $ac_path_SED
13269 case `"$ac_path_SED" --version 2>&1` in
13270 *GNU*)
13271   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13272 *)
13273   ac_count=0
13274   $as_echo_n 0123456789 >"conftest.in"
13275   while :
13276   do
13277     cat "conftest.in" "conftest.in" >"conftest.tmp"
13278     mv "conftest.tmp" "conftest.in"
13279     cp "conftest.in" "conftest.nl"
13280     $as_echo '' >> "conftest.nl"
13281     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13282     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13283     as_fn_arith $ac_count + 1 && ac_count=$as_val
13284     if test $ac_count -gt ${ac_path_SED_max-0}; then
13285       # Best one so far, save it but keep looking for a better one
13286       ac_cv_path_SED="$ac_path_SED"
13287       ac_path_SED_max=$ac_count
13288     fi
13289     # 10*(2^10) chars as input seems more than enough
13290     test $ac_count -gt 10 && break
13291   done
13292   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13293 esac
13294 
13295       $ac_path_SED_found && break 3
13296     done
13297   done
13298   done
13299 IFS=$as_save_IFS
13300   if test -z "$ac_cv_path_SED"; then
13301     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13302   fi
13303 else
13304   ac_cv_path_SED=$SED
13305 fi
13306 
13307 fi
13308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13309 $as_echo "$ac_cv_path_SED" >&6; }
13310  SED="$ac_cv_path_SED"
13311   rm -f conftest.sed
13312 
13313   else
13314     # The variable is set, but is it from the command line or the environment?
13315 
13316     # Try to remove the string !SED! from our list.
13317     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13318     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13319       # If it failed, the variable was not from the command line. Ignore it,
13320       # but warn the user (except for BASH, which is always set by the calling BASH).
13321       if test "xSED" != xBASH; then
13322         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13323 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13324       fi
13325       # Try to locate tool using the code snippet
13326       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13327 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13328 if ${ac_cv_path_SED+:} false; then :
13329   $as_echo_n "(cached) " >&6
13330 else
13331             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13332      for ac_i in 1 2 3 4 5 6 7; do
13333        ac_script="$ac_script$as_nl$ac_script"
13334      done
13335      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13336      { ac_script=; unset ac_script;}
13337      if test -z "$SED"; then
13338   ac_path_SED_found=false
13339   # Loop through the user's path and test for each of PROGNAME-LIST
13340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13341 for as_dir in $PATH
13342 do
13343   IFS=$as_save_IFS
13344   test -z "$as_dir" && as_dir=.
13345     for ac_prog in sed gsed; do
13346     for ac_exec_ext in '' $ac_executable_extensions; do
13347       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13348       as_fn_executable_p "$ac_path_SED" || continue
13349 # Check for GNU ac_path_SED and select it if it is found.
13350   # Check for GNU $ac_path_SED
13351 case `"$ac_path_SED" --version 2>&1` in
13352 *GNU*)
13353   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13354 *)
13355   ac_count=0
13356   $as_echo_n 0123456789 >"conftest.in"
13357   while :
13358   do
13359     cat "conftest.in" "conftest.in" >"conftest.tmp"
13360     mv "conftest.tmp" "conftest.in"
13361     cp "conftest.in" "conftest.nl"
13362     $as_echo '' >> "conftest.nl"
13363     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13364     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13365     as_fn_arith $ac_count + 1 && ac_count=$as_val
13366     if test $ac_count -gt ${ac_path_SED_max-0}; then
13367       # Best one so far, save it but keep looking for a better one
13368       ac_cv_path_SED="$ac_path_SED"
13369       ac_path_SED_max=$ac_count
13370     fi
13371     # 10*(2^10) chars as input seems more than enough
13372     test $ac_count -gt 10 && break
13373   done
13374   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13375 esac
13376 
13377       $ac_path_SED_found && break 3
13378     done
13379   done
13380   done
13381 IFS=$as_save_IFS
13382   if test -z "$ac_cv_path_SED"; then
13383     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13384   fi
13385 else
13386   ac_cv_path_SED=$SED
13387 fi
13388 
13389 fi
13390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13391 $as_echo "$ac_cv_path_SED" >&6; }
13392  SED="$ac_cv_path_SED"
13393   rm -f conftest.sed
13394 
13395     else
13396       # If it succeeded, then it was overridden by the user. We will use it
13397       # for the tool.
13398 
13399       # First remove it from the list of overridden variables, so we can test
13400       # for unknown variables in the end.
13401       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13402 
13403       # Check if we try to supply an empty value
13404       if test "x$SED" = x; then
13405         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13406 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13407         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13408 $as_echo_n "checking for SED... " >&6; }
13409         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13410 $as_echo "disabled" >&6; }
13411       else
13412         # Check if the provided tool contains a complete path.
13413         tool_specified="$SED"
13414         tool_basename="${tool_specified##*/}"
13415         if test "x$tool_basename" = "x$tool_specified"; then
13416           # A command without a complete path is provided, search $PATH.
13417           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13418 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13419           # Extract the first word of "$tool_basename", so it can be a program name with args.
13420 set dummy $tool_basename; ac_word=$2
13421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13422 $as_echo_n "checking for $ac_word... " >&6; }
13423 if ${ac_cv_path_SED+:} false; then :
13424   $as_echo_n "(cached) " >&6
13425 else
13426   case $SED in
13427   [\\/]* | ?:[\\/]*)
13428   ac_cv_path_SED="$SED" # Let the user override the test with a path.
13429   ;;
13430   *)
13431   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13432 for as_dir in $PATH
13433 do
13434   IFS=$as_save_IFS
13435   test -z "$as_dir" && as_dir=.
13436     for ac_exec_ext in '' $ac_executable_extensions; do
13437   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13438     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13439     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13440     break 2
13441   fi
13442 done
13443   done
13444 IFS=$as_save_IFS
13445 
13446   ;;
13447 esac
13448 fi
13449 SED=$ac_cv_path_SED
13450 if test -n "$SED"; then
13451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13452 $as_echo "$SED" >&6; }
13453 else
13454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13455 $as_echo "no" >&6; }
13456 fi
13457 
13458 
13459           if test "x$SED" = x; then
13460             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13461           fi
13462         else
13463           # Otherwise we believe it is a complete path. Use it as it is.
13464           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13465 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13466           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13467 $as_echo_n "checking for SED... " >&6; }
13468           if test ! -x "$tool_specified"; then
13469             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13470 $as_echo "not found" >&6; }
13471             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13472           fi
13473           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13474 $as_echo "$tool_specified" >&6; }
13475         fi
13476       fi
13477     fi
13478 
13479   fi
13480 
13481 
13482   if test "x$SED" = x; then
13483     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13484   fi
13485 
13486 
13487 
13488   # Always force rm.
13489   RM="$RM -f"
13490 
13491   # pwd behaves differently on various platforms and some don't support the -L flag.
13492   # Always use the bash builtin pwd to get uniform behavior.
13493   THEPWDCMD=pwd
13494 
13495   # These are not required on all platforms
13496 
13497 
13498   # Publish this variable in the help.
13499 
13500 
13501   if [ -z "${CYGPATH+x}" ]; then
13502     # The variable is not set by user, try to locate tool using the code snippet
13503     for ac_prog in cygpath
13504 do
13505   # Extract the first word of "$ac_prog", so it can be a program name with args.
13506 set dummy $ac_prog; ac_word=$2
13507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13508 $as_echo_n "checking for $ac_word... " >&6; }
13509 if ${ac_cv_path_CYGPATH+:} false; then :
13510   $as_echo_n "(cached) " >&6
13511 else
13512   case $CYGPATH in
13513   [\\/]* | ?:[\\/]*)
13514   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13515   ;;
13516   *)
13517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13518 for as_dir in $PATH
13519 do
13520   IFS=$as_save_IFS
13521   test -z "$as_dir" && as_dir=.
13522     for ac_exec_ext in '' $ac_executable_extensions; do
13523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13524     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13526     break 2
13527   fi
13528 done
13529   done
13530 IFS=$as_save_IFS
13531 
13532   ;;
13533 esac
13534 fi
13535 CYGPATH=$ac_cv_path_CYGPATH
13536 if test -n "$CYGPATH"; then
13537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13538 $as_echo "$CYGPATH" >&6; }
13539 else
13540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13541 $as_echo "no" >&6; }
13542 fi
13543 
13544 
13545   test -n "$CYGPATH" && break
13546 done
13547 
13548   else
13549     # The variable is set, but is it from the command line or the environment?
13550 
13551     # Try to remove the string !CYGPATH! from our list.
13552     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13553     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13554       # If it failed, the variable was not from the command line. Ignore it,
13555       # but warn the user (except for BASH, which is always set by the calling BASH).
13556       if test "xCYGPATH" != xBASH; then
13557         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13558 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13559       fi
13560       # Try to locate tool using the code snippet
13561       for ac_prog in cygpath
13562 do
13563   # Extract the first word of "$ac_prog", so it can be a program name with args.
13564 set dummy $ac_prog; ac_word=$2
13565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13566 $as_echo_n "checking for $ac_word... " >&6; }
13567 if ${ac_cv_path_CYGPATH+:} false; then :
13568   $as_echo_n "(cached) " >&6
13569 else
13570   case $CYGPATH in
13571   [\\/]* | ?:[\\/]*)
13572   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13573   ;;
13574   *)
13575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13576 for as_dir in $PATH
13577 do
13578   IFS=$as_save_IFS
13579   test -z "$as_dir" && as_dir=.
13580     for ac_exec_ext in '' $ac_executable_extensions; do
13581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13582     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13584     break 2
13585   fi
13586 done
13587   done
13588 IFS=$as_save_IFS
13589 
13590   ;;
13591 esac
13592 fi
13593 CYGPATH=$ac_cv_path_CYGPATH
13594 if test -n "$CYGPATH"; then
13595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13596 $as_echo "$CYGPATH" >&6; }
13597 else
13598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13599 $as_echo "no" >&6; }
13600 fi
13601 
13602 
13603   test -n "$CYGPATH" && break
13604 done
13605 
13606     else
13607       # If it succeeded, then it was overridden by the user. We will use it
13608       # for the tool.
13609 
13610       # First remove it from the list of overridden variables, so we can test
13611       # for unknown variables in the end.
13612       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13613 
13614       # Check if we try to supply an empty value
13615       if test "x$CYGPATH" = x; then
13616         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13617 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13618         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13619 $as_echo_n "checking for CYGPATH... " >&6; }
13620         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13621 $as_echo "disabled" >&6; }
13622       else
13623         # Check if the provided tool contains a complete path.
13624         tool_specified="$CYGPATH"
13625         tool_basename="${tool_specified##*/}"
13626         if test "x$tool_basename" = "x$tool_specified"; then
13627           # A command without a complete path is provided, search $PATH.
13628           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13629 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13630           # Extract the first word of "$tool_basename", so it can be a program name with args.
13631 set dummy $tool_basename; ac_word=$2
13632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13633 $as_echo_n "checking for $ac_word... " >&6; }
13634 if ${ac_cv_path_CYGPATH+:} false; then :
13635   $as_echo_n "(cached) " >&6
13636 else
13637   case $CYGPATH in
13638   [\\/]* | ?:[\\/]*)
13639   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13640   ;;
13641   *)
13642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13643 for as_dir in $PATH
13644 do
13645   IFS=$as_save_IFS
13646   test -z "$as_dir" && as_dir=.
13647     for ac_exec_ext in '' $ac_executable_extensions; do
13648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13649     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13651     break 2
13652   fi
13653 done
13654   done
13655 IFS=$as_save_IFS
13656 
13657   ;;
13658 esac
13659 fi
13660 CYGPATH=$ac_cv_path_CYGPATH
13661 if test -n "$CYGPATH"; then
13662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13663 $as_echo "$CYGPATH" >&6; }
13664 else
13665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13666 $as_echo "no" >&6; }
13667 fi
13668 
13669 
13670           if test "x$CYGPATH" = x; then
13671             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13672           fi
13673         else
13674           # Otherwise we believe it is a complete path. Use it as it is.
13675           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13676 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13677           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13678 $as_echo_n "checking for CYGPATH... " >&6; }
13679           if test ! -x "$tool_specified"; then
13680             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13681 $as_echo "not found" >&6; }
13682             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13683           fi
13684           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13685 $as_echo "$tool_specified" >&6; }
13686         fi
13687       fi
13688     fi
13689 
13690   fi
13691 
13692 
13693 
13694 
13695   # Publish this variable in the help.
13696 
13697 
13698   if [ -z "${READLINK+x}" ]; then
13699     # The variable is not set by user, try to locate tool using the code snippet
13700     for ac_prog in greadlink readlink
13701 do
13702   # Extract the first word of "$ac_prog", so it can be a program name with args.
13703 set dummy $ac_prog; ac_word=$2
13704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13705 $as_echo_n "checking for $ac_word... " >&6; }
13706 if ${ac_cv_path_READLINK+:} false; then :
13707   $as_echo_n "(cached) " >&6
13708 else
13709   case $READLINK in
13710   [\\/]* | ?:[\\/]*)
13711   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13712   ;;
13713   *)
13714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13715 for as_dir in $PATH
13716 do
13717   IFS=$as_save_IFS
13718   test -z "$as_dir" && as_dir=.
13719     for ac_exec_ext in '' $ac_executable_extensions; do
13720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13721     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13723     break 2
13724   fi
13725 done
13726   done
13727 IFS=$as_save_IFS
13728 
13729   ;;
13730 esac
13731 fi
13732 READLINK=$ac_cv_path_READLINK
13733 if test -n "$READLINK"; then
13734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13735 $as_echo "$READLINK" >&6; }
13736 else
13737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13738 $as_echo "no" >&6; }
13739 fi
13740 
13741 
13742   test -n "$READLINK" && break
13743 done
13744 
13745   else
13746     # The variable is set, but is it from the command line or the environment?
13747 
13748     # Try to remove the string !READLINK! from our list.
13749     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13750     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13751       # If it failed, the variable was not from the command line. Ignore it,
13752       # but warn the user (except for BASH, which is always set by the calling BASH).
13753       if test "xREADLINK" != xBASH; then
13754         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13755 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13756       fi
13757       # Try to locate tool using the code snippet
13758       for ac_prog in greadlink readlink
13759 do
13760   # Extract the first word of "$ac_prog", so it can be a program name with args.
13761 set dummy $ac_prog; ac_word=$2
13762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13763 $as_echo_n "checking for $ac_word... " >&6; }
13764 if ${ac_cv_path_READLINK+:} false; then :
13765   $as_echo_n "(cached) " >&6
13766 else
13767   case $READLINK in
13768   [\\/]* | ?:[\\/]*)
13769   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13770   ;;
13771   *)
13772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13773 for as_dir in $PATH
13774 do
13775   IFS=$as_save_IFS
13776   test -z "$as_dir" && as_dir=.
13777     for ac_exec_ext in '' $ac_executable_extensions; do
13778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13779     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13781     break 2
13782   fi
13783 done
13784   done
13785 IFS=$as_save_IFS
13786 
13787   ;;
13788 esac
13789 fi
13790 READLINK=$ac_cv_path_READLINK
13791 if test -n "$READLINK"; then
13792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13793 $as_echo "$READLINK" >&6; }
13794 else
13795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13796 $as_echo "no" >&6; }
13797 fi
13798 
13799 
13800   test -n "$READLINK" && break
13801 done
13802 
13803     else
13804       # If it succeeded, then it was overridden by the user. We will use it
13805       # for the tool.
13806 
13807       # First remove it from the list of overridden variables, so we can test
13808       # for unknown variables in the end.
13809       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13810 
13811       # Check if we try to supply an empty value
13812       if test "x$READLINK" = x; then
13813         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13814 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13815         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13816 $as_echo_n "checking for READLINK... " >&6; }
13817         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13818 $as_echo "disabled" >&6; }
13819       else
13820         # Check if the provided tool contains a complete path.
13821         tool_specified="$READLINK"
13822         tool_basename="${tool_specified##*/}"
13823         if test "x$tool_basename" = "x$tool_specified"; then
13824           # A command without a complete path is provided, search $PATH.
13825           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13826 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13827           # Extract the first word of "$tool_basename", so it can be a program name with args.
13828 set dummy $tool_basename; ac_word=$2
13829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13830 $as_echo_n "checking for $ac_word... " >&6; }
13831 if ${ac_cv_path_READLINK+:} false; then :
13832   $as_echo_n "(cached) " >&6
13833 else
13834   case $READLINK in
13835   [\\/]* | ?:[\\/]*)
13836   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13837   ;;
13838   *)
13839   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13840 for as_dir in $PATH
13841 do
13842   IFS=$as_save_IFS
13843   test -z "$as_dir" && as_dir=.
13844     for ac_exec_ext in '' $ac_executable_extensions; do
13845   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13846     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13847     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13848     break 2
13849   fi
13850 done
13851   done
13852 IFS=$as_save_IFS
13853 
13854   ;;
13855 esac
13856 fi
13857 READLINK=$ac_cv_path_READLINK
13858 if test -n "$READLINK"; then
13859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13860 $as_echo "$READLINK" >&6; }
13861 else
13862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13863 $as_echo "no" >&6; }
13864 fi
13865 
13866 
13867           if test "x$READLINK" = x; then
13868             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13869           fi
13870         else
13871           # Otherwise we believe it is a complete path. Use it as it is.
13872           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13873 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13874           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13875 $as_echo_n "checking for READLINK... " >&6; }
13876           if test ! -x "$tool_specified"; then
13877             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13878 $as_echo "not found" >&6; }
13879             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13880           fi
13881           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13882 $as_echo "$tool_specified" >&6; }
13883         fi
13884       fi
13885     fi
13886 
13887   fi
13888 
13889 
13890 
13891 
13892   # Publish this variable in the help.
13893 
13894 
13895   if [ -z "${DF+x}" ]; then
13896     # The variable is not set by user, try to locate tool using the code snippet
13897     for ac_prog in df
13898 do
13899   # Extract the first word of "$ac_prog", so it can be a program name with args.
13900 set dummy $ac_prog; ac_word=$2
13901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13902 $as_echo_n "checking for $ac_word... " >&6; }
13903 if ${ac_cv_path_DF+:} false; then :
13904   $as_echo_n "(cached) " >&6
13905 else
13906   case $DF in
13907   [\\/]* | ?:[\\/]*)
13908   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13909   ;;
13910   *)
13911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13912 for as_dir in $PATH
13913 do
13914   IFS=$as_save_IFS
13915   test -z "$as_dir" && as_dir=.
13916     for ac_exec_ext in '' $ac_executable_extensions; do
13917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13918     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13920     break 2
13921   fi
13922 done
13923   done
13924 IFS=$as_save_IFS
13925 
13926   ;;
13927 esac
13928 fi
13929 DF=$ac_cv_path_DF
13930 if test -n "$DF"; then
13931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13932 $as_echo "$DF" >&6; }
13933 else
13934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13935 $as_echo "no" >&6; }
13936 fi
13937 
13938 
13939   test -n "$DF" && break
13940 done
13941 
13942   else
13943     # The variable is set, but is it from the command line or the environment?
13944 
13945     # Try to remove the string !DF! from our list.
13946     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13947     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13948       # If it failed, the variable was not from the command line. Ignore it,
13949       # but warn the user (except for BASH, which is always set by the calling BASH).
13950       if test "xDF" != xBASH; then
13951         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13952 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13953       fi
13954       # Try to locate tool using the code snippet
13955       for ac_prog in df
13956 do
13957   # Extract the first word of "$ac_prog", so it can be a program name with args.
13958 set dummy $ac_prog; ac_word=$2
13959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13960 $as_echo_n "checking for $ac_word... " >&6; }
13961 if ${ac_cv_path_DF+:} false; then :
13962   $as_echo_n "(cached) " >&6
13963 else
13964   case $DF in
13965   [\\/]* | ?:[\\/]*)
13966   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13967   ;;
13968   *)
13969   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13970 for as_dir in $PATH
13971 do
13972   IFS=$as_save_IFS
13973   test -z "$as_dir" && as_dir=.
13974     for ac_exec_ext in '' $ac_executable_extensions; do
13975   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13976     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13977     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13978     break 2
13979   fi
13980 done
13981   done
13982 IFS=$as_save_IFS
13983 
13984   ;;
13985 esac
13986 fi
13987 DF=$ac_cv_path_DF
13988 if test -n "$DF"; then
13989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13990 $as_echo "$DF" >&6; }
13991 else
13992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13993 $as_echo "no" >&6; }
13994 fi
13995 
13996 
13997   test -n "$DF" && break
13998 done
13999 
14000     else
14001       # If it succeeded, then it was overridden by the user. We will use it
14002       # for the tool.
14003 
14004       # First remove it from the list of overridden variables, so we can test
14005       # for unknown variables in the end.
14006       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14007 
14008       # Check if we try to supply an empty value
14009       if test "x$DF" = x; then
14010         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14011 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14012         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14013 $as_echo_n "checking for DF... " >&6; }
14014         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14015 $as_echo "disabled" >&6; }
14016       else
14017         # Check if the provided tool contains a complete path.
14018         tool_specified="$DF"
14019         tool_basename="${tool_specified##*/}"
14020         if test "x$tool_basename" = "x$tool_specified"; then
14021           # A command without a complete path is provided, search $PATH.
14022           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14023 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14024           # Extract the first word of "$tool_basename", so it can be a program name with args.
14025 set dummy $tool_basename; ac_word=$2
14026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14027 $as_echo_n "checking for $ac_word... " >&6; }
14028 if ${ac_cv_path_DF+:} false; then :
14029   $as_echo_n "(cached) " >&6
14030 else
14031   case $DF in
14032   [\\/]* | ?:[\\/]*)
14033   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14034   ;;
14035   *)
14036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14037 for as_dir in $PATH
14038 do
14039   IFS=$as_save_IFS
14040   test -z "$as_dir" && as_dir=.
14041     for ac_exec_ext in '' $ac_executable_extensions; do
14042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14043     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14045     break 2
14046   fi
14047 done
14048   done
14049 IFS=$as_save_IFS
14050 
14051   ;;
14052 esac
14053 fi
14054 DF=$ac_cv_path_DF
14055 if test -n "$DF"; then
14056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14057 $as_echo "$DF" >&6; }
14058 else
14059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14060 $as_echo "no" >&6; }
14061 fi
14062 
14063 
14064           if test "x$DF" = x; then
14065             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14066           fi
14067         else
14068           # Otherwise we believe it is a complete path. Use it as it is.
14069           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14070 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14071           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14072 $as_echo_n "checking for DF... " >&6; }
14073           if test ! -x "$tool_specified"; then
14074             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14075 $as_echo "not found" >&6; }
14076             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14077           fi
14078           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14079 $as_echo "$tool_specified" >&6; }
14080         fi
14081       fi
14082     fi
14083 
14084   fi
14085 
14086 
14087 
14088 
14089   # Publish this variable in the help.
14090 
14091 
14092   if [ -z "${CPIO+x}" ]; then
14093     # The variable is not set by user, try to locate tool using the code snippet
14094     for ac_prog in cpio bsdcpio
14095 do
14096   # Extract the first word of "$ac_prog", so it can be a program name with args.
14097 set dummy $ac_prog; ac_word=$2
14098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14099 $as_echo_n "checking for $ac_word... " >&6; }
14100 if ${ac_cv_path_CPIO+:} false; then :
14101   $as_echo_n "(cached) " >&6
14102 else
14103   case $CPIO in
14104   [\\/]* | ?:[\\/]*)
14105   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14106   ;;
14107   *)
14108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14109 for as_dir in $PATH
14110 do
14111   IFS=$as_save_IFS
14112   test -z "$as_dir" && as_dir=.
14113     for ac_exec_ext in '' $ac_executable_extensions; do
14114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14115     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14117     break 2
14118   fi
14119 done
14120   done
14121 IFS=$as_save_IFS
14122 
14123   ;;
14124 esac
14125 fi
14126 CPIO=$ac_cv_path_CPIO
14127 if test -n "$CPIO"; then
14128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14129 $as_echo "$CPIO" >&6; }
14130 else
14131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14132 $as_echo "no" >&6; }
14133 fi
14134 
14135 
14136   test -n "$CPIO" && break
14137 done
14138 
14139   else
14140     # The variable is set, but is it from the command line or the environment?
14141 
14142     # Try to remove the string !CPIO! from our list.
14143     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14144     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14145       # If it failed, the variable was not from the command line. Ignore it,
14146       # but warn the user (except for BASH, which is always set by the calling BASH).
14147       if test "xCPIO" != xBASH; then
14148         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14149 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14150       fi
14151       # Try to locate tool using the code snippet
14152       for ac_prog in cpio bsdcpio
14153 do
14154   # Extract the first word of "$ac_prog", so it can be a program name with args.
14155 set dummy $ac_prog; ac_word=$2
14156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14157 $as_echo_n "checking for $ac_word... " >&6; }
14158 if ${ac_cv_path_CPIO+:} false; then :
14159   $as_echo_n "(cached) " >&6
14160 else
14161   case $CPIO in
14162   [\\/]* | ?:[\\/]*)
14163   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14164   ;;
14165   *)
14166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14167 for as_dir in $PATH
14168 do
14169   IFS=$as_save_IFS
14170   test -z "$as_dir" && as_dir=.
14171     for ac_exec_ext in '' $ac_executable_extensions; do
14172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14173     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14175     break 2
14176   fi
14177 done
14178   done
14179 IFS=$as_save_IFS
14180 
14181   ;;
14182 esac
14183 fi
14184 CPIO=$ac_cv_path_CPIO
14185 if test -n "$CPIO"; then
14186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14187 $as_echo "$CPIO" >&6; }
14188 else
14189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14190 $as_echo "no" >&6; }
14191 fi
14192 
14193 
14194   test -n "$CPIO" && break
14195 done
14196 
14197     else
14198       # If it succeeded, then it was overridden by the user. We will use it
14199       # for the tool.
14200 
14201       # First remove it from the list of overridden variables, so we can test
14202       # for unknown variables in the end.
14203       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14204 
14205       # Check if we try to supply an empty value
14206       if test "x$CPIO" = x; then
14207         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14208 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14209         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14210 $as_echo_n "checking for CPIO... " >&6; }
14211         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14212 $as_echo "disabled" >&6; }
14213       else
14214         # Check if the provided tool contains a complete path.
14215         tool_specified="$CPIO"
14216         tool_basename="${tool_specified##*/}"
14217         if test "x$tool_basename" = "x$tool_specified"; then
14218           # A command without a complete path is provided, search $PATH.
14219           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14220 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14221           # Extract the first word of "$tool_basename", so it can be a program name with args.
14222 set dummy $tool_basename; ac_word=$2
14223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14224 $as_echo_n "checking for $ac_word... " >&6; }
14225 if ${ac_cv_path_CPIO+:} false; then :
14226   $as_echo_n "(cached) " >&6
14227 else
14228   case $CPIO in
14229   [\\/]* | ?:[\\/]*)
14230   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14231   ;;
14232   *)
14233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14234 for as_dir in $PATH
14235 do
14236   IFS=$as_save_IFS
14237   test -z "$as_dir" && as_dir=.
14238     for ac_exec_ext in '' $ac_executable_extensions; do
14239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14240     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14242     break 2
14243   fi
14244 done
14245   done
14246 IFS=$as_save_IFS
14247 
14248   ;;
14249 esac
14250 fi
14251 CPIO=$ac_cv_path_CPIO
14252 if test -n "$CPIO"; then
14253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14254 $as_echo "$CPIO" >&6; }
14255 else
14256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14257 $as_echo "no" >&6; }
14258 fi
14259 
14260 
14261           if test "x$CPIO" = x; then
14262             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14263           fi
14264         else
14265           # Otherwise we believe it is a complete path. Use it as it is.
14266           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14267 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14268           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14269 $as_echo_n "checking for CPIO... " >&6; }
14270           if test ! -x "$tool_specified"; then
14271             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14272 $as_echo "not found" >&6; }
14273             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14274           fi
14275           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14276 $as_echo "$tool_specified" >&6; }
14277         fi
14278       fi
14279     fi
14280 
14281   fi
14282 
14283 
14284 
14285 
14286   # Publish this variable in the help.
14287 
14288 
14289   if [ -z "${NICE+x}" ]; then
14290     # The variable is not set by user, try to locate tool using the code snippet
14291     for ac_prog in nice
14292 do
14293   # Extract the first word of "$ac_prog", so it can be a program name with args.
14294 set dummy $ac_prog; ac_word=$2
14295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14296 $as_echo_n "checking for $ac_word... " >&6; }
14297 if ${ac_cv_path_NICE+:} false; then :
14298   $as_echo_n "(cached) " >&6
14299 else
14300   case $NICE in
14301   [\\/]* | ?:[\\/]*)
14302   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14303   ;;
14304   *)
14305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14306 for as_dir in $PATH
14307 do
14308   IFS=$as_save_IFS
14309   test -z "$as_dir" && as_dir=.
14310     for ac_exec_ext in '' $ac_executable_extensions; do
14311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14312     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14314     break 2
14315   fi
14316 done
14317   done
14318 IFS=$as_save_IFS
14319 
14320   ;;
14321 esac
14322 fi
14323 NICE=$ac_cv_path_NICE
14324 if test -n "$NICE"; then
14325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14326 $as_echo "$NICE" >&6; }
14327 else
14328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14329 $as_echo "no" >&6; }
14330 fi
14331 
14332 
14333   test -n "$NICE" && break
14334 done
14335 
14336   else
14337     # The variable is set, but is it from the command line or the environment?
14338 
14339     # Try to remove the string !NICE! from our list.
14340     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14341     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14342       # If it failed, the variable was not from the command line. Ignore it,
14343       # but warn the user (except for BASH, which is always set by the calling BASH).
14344       if test "xNICE" != xBASH; then
14345         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14346 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14347       fi
14348       # Try to locate tool using the code snippet
14349       for ac_prog in nice
14350 do
14351   # Extract the first word of "$ac_prog", so it can be a program name with args.
14352 set dummy $ac_prog; ac_word=$2
14353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14354 $as_echo_n "checking for $ac_word... " >&6; }
14355 if ${ac_cv_path_NICE+:} false; then :
14356   $as_echo_n "(cached) " >&6
14357 else
14358   case $NICE in
14359   [\\/]* | ?:[\\/]*)
14360   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14361   ;;
14362   *)
14363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14364 for as_dir in $PATH
14365 do
14366   IFS=$as_save_IFS
14367   test -z "$as_dir" && as_dir=.
14368     for ac_exec_ext in '' $ac_executable_extensions; do
14369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14370     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14372     break 2
14373   fi
14374 done
14375   done
14376 IFS=$as_save_IFS
14377 
14378   ;;
14379 esac
14380 fi
14381 NICE=$ac_cv_path_NICE
14382 if test -n "$NICE"; then
14383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14384 $as_echo "$NICE" >&6; }
14385 else
14386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14387 $as_echo "no" >&6; }
14388 fi
14389 
14390 
14391   test -n "$NICE" && break
14392 done
14393 
14394     else
14395       # If it succeeded, then it was overridden by the user. We will use it
14396       # for the tool.
14397 
14398       # First remove it from the list of overridden variables, so we can test
14399       # for unknown variables in the end.
14400       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14401 
14402       # Check if we try to supply an empty value
14403       if test "x$NICE" = x; then
14404         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14405 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14406         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14407 $as_echo_n "checking for NICE... " >&6; }
14408         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14409 $as_echo "disabled" >&6; }
14410       else
14411         # Check if the provided tool contains a complete path.
14412         tool_specified="$NICE"
14413         tool_basename="${tool_specified##*/}"
14414         if test "x$tool_basename" = "x$tool_specified"; then
14415           # A command without a complete path is provided, search $PATH.
14416           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14417 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14418           # Extract the first word of "$tool_basename", so it can be a program name with args.
14419 set dummy $tool_basename; ac_word=$2
14420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14421 $as_echo_n "checking for $ac_word... " >&6; }
14422 if ${ac_cv_path_NICE+:} false; then :
14423   $as_echo_n "(cached) " >&6
14424 else
14425   case $NICE in
14426   [\\/]* | ?:[\\/]*)
14427   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14428   ;;
14429   *)
14430   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14431 for as_dir in $PATH
14432 do
14433   IFS=$as_save_IFS
14434   test -z "$as_dir" && as_dir=.
14435     for ac_exec_ext in '' $ac_executable_extensions; do
14436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14437     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14439     break 2
14440   fi
14441 done
14442   done
14443 IFS=$as_save_IFS
14444 
14445   ;;
14446 esac
14447 fi
14448 NICE=$ac_cv_path_NICE
14449 if test -n "$NICE"; then
14450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14451 $as_echo "$NICE" >&6; }
14452 else
14453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14454 $as_echo "no" >&6; }
14455 fi
14456 
14457 
14458           if test "x$NICE" = x; then
14459             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14460           fi
14461         else
14462           # Otherwise we believe it is a complete path. Use it as it is.
14463           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14464 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14465           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14466 $as_echo_n "checking for NICE... " >&6; }
14467           if test ! -x "$tool_specified"; then
14468             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14469 $as_echo "not found" >&6; }
14470             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14471           fi
14472           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14473 $as_echo "$tool_specified" >&6; }
14474         fi
14475       fi
14476     fi
14477 
14478   fi
14479 
14480 
14481 
14482 
14483 # Now we can determine OpenJDK build and target platforms. This is required to
14484 # have early on.
14485 # Make sure we can run config.sub.
14486 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14487   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14488 
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14490 $as_echo_n "checking build system type... " >&6; }
14491 if ${ac_cv_build+:} false; then :
14492   $as_echo_n "(cached) " >&6
14493 else
14494   ac_build_alias=$build_alias
14495 test "x$ac_build_alias" = x &&
14496   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14497 test "x$ac_build_alias" = x &&
14498   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14499 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14500   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14501 
14502 fi
14503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14504 $as_echo "$ac_cv_build" >&6; }
14505 case $ac_cv_build in
14506 *-*-*) ;;
14507 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14508 esac
14509 build=$ac_cv_build
14510 ac_save_IFS=$IFS; IFS='-'
14511 set x $ac_cv_build
14512 shift
14513 build_cpu=$1
14514 build_vendor=$2
14515 shift; shift
14516 # Remember, the first character of IFS is used to create $*,
14517 # except with old shells:
14518 build_os=$*
14519 IFS=$ac_save_IFS
14520 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14521 
14522 
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14524 $as_echo_n "checking host system type... " >&6; }
14525 if ${ac_cv_host+:} false; then :
14526   $as_echo_n "(cached) " >&6
14527 else
14528   if test "x$host_alias" = x; then
14529   ac_cv_host=$ac_cv_build
14530 else
14531   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14532     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14533 fi
14534 
14535 fi
14536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14537 $as_echo "$ac_cv_host" >&6; }
14538 case $ac_cv_host in
14539 *-*-*) ;;
14540 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14541 esac
14542 host=$ac_cv_host
14543 ac_save_IFS=$IFS; IFS='-'
14544 set x $ac_cv_host
14545 shift
14546 host_cpu=$1
14547 host_vendor=$2
14548 shift; shift
14549 # Remember, the first character of IFS is used to create $*,
14550 # except with old shells:
14551 host_os=$*
14552 IFS=$ac_save_IFS
14553 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14554 
14555 
14556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14557 $as_echo_n "checking target system type... " >&6; }
14558 if ${ac_cv_target+:} false; then :
14559   $as_echo_n "(cached) " >&6
14560 else
14561   if test "x$target_alias" = x; then
14562   ac_cv_target=$ac_cv_host
14563 else
14564   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14565     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14566 fi
14567 
14568 fi
14569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14570 $as_echo "$ac_cv_target" >&6; }
14571 case $ac_cv_target in
14572 *-*-*) ;;
14573 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14574 esac
14575 target=$ac_cv_target
14576 ac_save_IFS=$IFS; IFS='-'
14577 set x $ac_cv_target
14578 shift
14579 target_cpu=$1
14580 target_vendor=$2
14581 shift; shift
14582 # Remember, the first character of IFS is used to create $*,
14583 # except with old shells:
14584 target_os=$*
14585 IFS=$ac_save_IFS
14586 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14587 
14588 
14589 # The aliases save the names the user supplied, while $host etc.
14590 # will get canonicalized.
14591 test -n "$target_alias" &&
14592   test "$program_prefix$program_suffix$program_transform_name" = \
14593     NONENONEs,x,x, &&
14594   program_prefix=${target_alias}-
14595 
14596   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14597   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14598   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14599   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14600   # to use the configure naming style.
14601 
14602 
14603 
14604 
14605 
14606   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14607   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14608   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14609   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14610   OPENJDK_TARGET_AUTOCONF_NAME="$host"
14611   OPENJDK_BUILD_AUTOCONF_NAME="$build"
14612 
14613 
14614 
14615   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14616 
14617   case "$build_os" in
14618     *linux*)
14619       VAR_OS=linux
14620       VAR_OS_TYPE=unix
14621       ;;
14622     *solaris*)
14623       VAR_OS=solaris
14624       VAR_OS_TYPE=unix
14625       ;;
14626     *darwin*)
14627       VAR_OS=macosx
14628       VAR_OS_TYPE=unix
14629       ;;
14630     *bsd*)
14631       VAR_OS=bsd
14632       VAR_OS_TYPE=unix
14633       ;;
14634     *cygwin*)
14635       VAR_OS=windows
14636       VAR_OS_ENV=windows.cygwin
14637       ;;
14638     *mingw*)
14639       VAR_OS=windows
14640       VAR_OS_ENV=windows.msys
14641       ;;
14642     *aix*)
14643       VAR_OS=aix
14644       VAR_OS_TYPE=unix
14645       ;;
14646     *)
14647       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14648       ;;
14649   esac
14650 
14651 
14652   # First argument is the cpu name from the trip/quad
14653   case "$build_cpu" in
14654     x86_64)
14655       VAR_CPU=x86_64
14656       VAR_CPU_ARCH=x86
14657       VAR_CPU_BITS=64
14658       VAR_CPU_ENDIAN=little
14659       ;;
14660     i?86)
14661       VAR_CPU=x86
14662       VAR_CPU_ARCH=x86
14663       VAR_CPU_BITS=32
14664       VAR_CPU_ENDIAN=little
14665       ;;
14666     arm*)
14667       VAR_CPU=arm
14668       VAR_CPU_ARCH=arm
14669       VAR_CPU_BITS=32
14670       VAR_CPU_ENDIAN=little
14671       ;;
14672     aarch64)
14673       VAR_CPU=aarch64
14674       VAR_CPU_ARCH=aarch64
14675       VAR_CPU_BITS=64
14676       VAR_CPU_ENDIAN=little
14677       ;;
14678     powerpc)
14679       VAR_CPU=ppc
14680       VAR_CPU_ARCH=ppc
14681       VAR_CPU_BITS=32
14682       VAR_CPU_ENDIAN=big
14683       ;;
14684     powerpc64)
14685       VAR_CPU=ppc64
14686       VAR_CPU_ARCH=ppc
14687       VAR_CPU_BITS=64
14688       VAR_CPU_ENDIAN=big
14689       ;;
14690     powerpc64le)
14691       VAR_CPU=ppc64
14692       VAR_CPU_ARCH=ppc
14693       VAR_CPU_BITS=64
14694       VAR_CPU_ENDIAN=little
14695       ;;
14696     s390)
14697       VAR_CPU=s390
14698       VAR_CPU_ARCH=s390
14699       VAR_CPU_BITS=32
14700       VAR_CPU_ENDIAN=big
14701       ;;
14702     s390x)
14703       VAR_CPU=s390x
14704       VAR_CPU_ARCH=s390
14705       VAR_CPU_BITS=64
14706       VAR_CPU_ENDIAN=big
14707       ;;
14708     sparc)
14709       VAR_CPU=sparc
14710       VAR_CPU_ARCH=sparc
14711       VAR_CPU_BITS=32
14712       VAR_CPU_ENDIAN=big
14713       ;;
14714     sparcv9|sparc64)
14715       VAR_CPU=sparcv9
14716       VAR_CPU_ARCH=sparc
14717       VAR_CPU_BITS=64
14718       VAR_CPU_ENDIAN=big
14719       ;;
14720     *)
14721       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14722       ;;
14723   esac
14724 
14725   # ..and setup our own variables. (Do this explicitely to facilitate searching)
14726   OPENJDK_BUILD_OS="$VAR_OS"
14727   if test "x$VAR_OS_TYPE" != x; then
14728     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14729   else
14730     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14731   fi
14732   if test "x$VAR_OS_ENV" != x; then
14733     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14734   else
14735     OPENJDK_BUILD_OS_ENV="$VAR_OS"
14736   fi
14737   OPENJDK_BUILD_CPU="$VAR_CPU"
14738   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14739   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14740   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14741 
14742 
14743 
14744 
14745 
14746 
14747 
14748 
14749   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14750 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
14751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14752 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14753 
14754   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14755 
14756   case "$host_os" in
14757     *linux*)
14758       VAR_OS=linux
14759       VAR_OS_TYPE=unix
14760       ;;
14761     *solaris*)
14762       VAR_OS=solaris
14763       VAR_OS_TYPE=unix
14764       ;;
14765     *darwin*)
14766       VAR_OS=macosx
14767       VAR_OS_TYPE=unix
14768       ;;
14769     *bsd*)
14770       VAR_OS=bsd
14771       VAR_OS_TYPE=unix
14772       ;;
14773     *cygwin*)
14774       VAR_OS=windows
14775       VAR_OS_ENV=windows.cygwin
14776       ;;
14777     *mingw*)
14778       VAR_OS=windows
14779       VAR_OS_ENV=windows.msys
14780       ;;
14781     *aix*)
14782       VAR_OS=aix
14783       VAR_OS_TYPE=unix
14784       ;;
14785     *)
14786       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14787       ;;
14788   esac
14789 
14790 
14791   # First argument is the cpu name from the trip/quad
14792   case "$host_cpu" in
14793     x86_64)
14794       VAR_CPU=x86_64
14795       VAR_CPU_ARCH=x86
14796       VAR_CPU_BITS=64
14797       VAR_CPU_ENDIAN=little
14798       ;;
14799     i?86)
14800       VAR_CPU=x86
14801       VAR_CPU_ARCH=x86
14802       VAR_CPU_BITS=32
14803       VAR_CPU_ENDIAN=little
14804       ;;
14805     arm*)
14806       VAR_CPU=arm
14807       VAR_CPU_ARCH=arm
14808       VAR_CPU_BITS=32
14809       VAR_CPU_ENDIAN=little
14810       ;;
14811     aarch64)
14812       VAR_CPU=aarch64
14813       VAR_CPU_ARCH=aarch64
14814       VAR_CPU_BITS=64
14815       VAR_CPU_ENDIAN=little
14816       ;;
14817     powerpc)
14818       VAR_CPU=ppc
14819       VAR_CPU_ARCH=ppc
14820       VAR_CPU_BITS=32
14821       VAR_CPU_ENDIAN=big
14822       ;;
14823     powerpc64)
14824       VAR_CPU=ppc64
14825       VAR_CPU_ARCH=ppc
14826       VAR_CPU_BITS=64
14827       VAR_CPU_ENDIAN=big
14828       ;;
14829     powerpc64le)
14830       VAR_CPU=ppc64
14831       VAR_CPU_ARCH=ppc
14832       VAR_CPU_BITS=64
14833       VAR_CPU_ENDIAN=little
14834       ;;
14835     s390)
14836       VAR_CPU=s390
14837       VAR_CPU_ARCH=s390
14838       VAR_CPU_BITS=32
14839       VAR_CPU_ENDIAN=big
14840       ;;
14841     s390x)
14842       VAR_CPU=s390x
14843       VAR_CPU_ARCH=s390
14844       VAR_CPU_BITS=64
14845       VAR_CPU_ENDIAN=big
14846       ;;
14847     sparc)
14848       VAR_CPU=sparc
14849       VAR_CPU_ARCH=sparc
14850       VAR_CPU_BITS=32
14851       VAR_CPU_ENDIAN=big
14852       ;;
14853     sparcv9|sparc64)
14854       VAR_CPU=sparcv9
14855       VAR_CPU_ARCH=sparc
14856       VAR_CPU_BITS=64
14857       VAR_CPU_ENDIAN=big
14858       ;;
14859     *)
14860       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14861       ;;
14862   esac
14863 
14864   # ... and setup our own variables. (Do this explicitely to facilitate searching)
14865   OPENJDK_TARGET_OS="$VAR_OS"
14866   if test "x$VAR_OS_TYPE" != x; then
14867     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14868   else
14869     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14870   fi
14871   if test "x$VAR_OS_ENV" != x; then
14872     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14873   else
14874     OPENJDK_TARGET_OS_ENV="$VAR_OS"
14875   fi
14876   OPENJDK_TARGET_CPU="$VAR_CPU"
14877   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14878   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14879   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14880 
14881 
14882 
14883 
14884 
14885 
14886 
14887 
14888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14889 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
14890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14891 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14892 
14893 
14894 
14895 # Check whether --with-target-bits was given.
14896 if test "${with_target_bits+set}" = set; then :
14897   withval=$with_target_bits;
14898 fi
14899 
14900 
14901   # We have three types of compiles:
14902   # native  == normal compilation, target system == build system
14903   # cross   == traditional cross compilation, target system != build system; special toolchain needed
14904   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14905   #
14906   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14907     # We're doing a proper cross-compilation
14908     COMPILE_TYPE="cross"
14909   else
14910     COMPILE_TYPE="native"
14911   fi
14912 
14913   if test "x$with_target_bits" != x; then
14914     if test "x$COMPILE_TYPE" = "xcross"; then
14915       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14916     fi
14917 
14918     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14919       # A reduced build is requested
14920       COMPILE_TYPE="reduced"
14921       OPENJDK_TARGET_CPU_BITS=32
14922       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14923         OPENJDK_TARGET_CPU=x86
14924       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14925         OPENJDK_TARGET_CPU=sparc
14926       else
14927         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14928       fi
14929     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14930       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
14931     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14932       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14933 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14934     else
14935       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14936     fi
14937   fi
14938 
14939 
14940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14941 $as_echo_n "checking compilation type... " >&6; }
14942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14943 $as_echo "$COMPILE_TYPE" >&6; }
14944 
14945 
14946   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14947     REQUIRED_OS_NAME=SunOS
14948     REQUIRED_OS_VERSION=5.10
14949   fi
14950   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14951     REQUIRED_OS_NAME=Linux
14952     REQUIRED_OS_VERSION=2.6
14953   fi
14954   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14955     REQUIRED_OS_NAME=Windows
14956     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14957       REQUIRED_OS_VERSION=5.2
14958     else
14959       REQUIRED_OS_VERSION=5.1
14960     fi
14961   fi
14962   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14963     REQUIRED_OS_NAME=Darwin
14964     REQUIRED_OS_VERSION=11.2
14965   fi
14966 
14967 
14968 
14969 
14970 
14971   # Also store the legacy naming of the cpu.
14972   # Ie i586 and amd64 instead of x86 and x86_64
14973   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14974   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14975     OPENJDK_TARGET_CPU_LEGACY="i586"
14976   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14977     # On all platforms except MacOSX replace x86_64 with amd64.
14978     OPENJDK_TARGET_CPU_LEGACY="amd64"
14979   fi
14980 
14981 
14982   # And the second legacy naming of the cpu.
14983   # Ie i386 and amd64 instead of x86 and x86_64.
14984   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14985   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14986     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14987   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14988     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14989   fi
14990 
14991 
14992   # This is the name of the cpu (but using i386 and amd64 instead of
14993   # x86 and x86_64, respectively), preceeded by a /, to be used when
14994   # locating libraries. On macosx, it's empty, though.
14995   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14996   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14997     OPENJDK_TARGET_CPU_LIBDIR=""
14998   fi
14999 
15000 
15001   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15002   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15003   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15004   OPENJDK_TARGET_CPU_ISADIR=""
15005   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15006     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15007       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15008     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15009       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15010     fi
15011   fi
15012 
15013 
15014   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15015   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15016   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15017     # On linux only, we replace x86 with i386.
15018     OPENJDK_TARGET_CPU_OSARCH="i386"
15019   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15020     # On all platforms except macosx, we replace x86_64 with amd64.
15021     OPENJDK_TARGET_CPU_OSARCH="amd64"
15022   fi
15023 
15024 
15025   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15026   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15027     OPENJDK_TARGET_CPU_JLI="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_JLI="amd64"
15031   fi
15032   # Now setup the -D flags for building libjli.
15033   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15034   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15035     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15036       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15037     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15038       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15039     fi
15040   fi
15041 
15042 
15043   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15044       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15045   else
15046       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15047   fi
15048 
15049 
15050   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15051     A_LP64="LP64:="
15052     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15053     # unpack200.exe
15054     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15055       ADD_LP64="-D_LP64=1"
15056     fi
15057   fi
15058   LP64=$A_LP64
15059 
15060 
15061   if test "x$COMPILE_TYPE" = "xcross"; then
15062     # FIXME: ... or should this include reduced builds..?
15063     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15064   else
15065     DEFINE_CROSS_COMPILE_ARCH=""
15066   fi
15067 
15068 
15069   # ZERO_ARCHDEF is used to enable architecture-specific code
15070   case "${OPENJDK_TARGET_CPU}" in
15071     ppc)     ZERO_ARCHDEF=PPC32 ;;
15072     ppc64)   ZERO_ARCHDEF=PPC64 ;;
15073     s390*)   ZERO_ARCHDEF=S390  ;;
15074     sparc*)  ZERO_ARCHDEF=SPARC ;;
15075     x86_64*) ZERO_ARCHDEF=AMD64 ;;
15076     x86)     ZERO_ARCHDEF=IA32  ;;
15077     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15078   esac
15079 
15080 
15081 
15082 
15083 # Continue setting up basic stuff. Most remaining code require fundamental tools.
15084 
15085   # Save the current directory this script was started from
15086   CURDIR="$PWD"
15087 
15088   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15089   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15090   # was not available at that time.
15091   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15092   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15093     ORIGINAL_PATH="$REWRITTEN_PATH"
15094     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15095 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15096   fi
15097 
15098   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15099     PATH_SEP=";"
15100 
15101   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15102   if test $SRC_ROOT_LENGTH -gt 100; then
15103     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15104   fi
15105 
15106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15107     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15108 $as_echo_n "checking cygwin release... " >&6; }
15109     CYGWIN_VERSION=`$UNAME -r`
15110     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15111 $as_echo "$CYGWIN_VERSION" >&6; }
15112     WINDOWS_ENV_VENDOR='cygwin'
15113     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15114 
15115     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15116     if test "x$CYGWIN_VERSION_OLD" != x; then
15117       { $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
15118 $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;}
15119       as_fn_error $? "Cannot continue" "$LINENO" 5
15120     fi
15121     if test "x$CYGPATH" = x; then
15122       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15123     fi
15124     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15125 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15126     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15127     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15128     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15129     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15130     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15131 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
15132     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15133     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15134     if test "x$test_cygdrive_prefix" = x; then
15135       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15136     fi
15137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15139 $as_echo_n "checking msys release... " >&6; }
15140     MSYS_VERSION=`$UNAME -r`
15141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15142 $as_echo "$MSYS_VERSION" >&6; }
15143 
15144     WINDOWS_ENV_VENDOR='msys'
15145     WINDOWS_ENV_VERSION="$MSYS_VERSION"
15146 
15147     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15148 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
15149     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15150     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15151 
15152   windows_path="$MSYS_ROOT_PATH"
15153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15154     unix_path=`$CYGPATH -u "$windows_path"`
15155     MSYS_ROOT_PATH="$unix_path"
15156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15157     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15158     MSYS_ROOT_PATH="$unix_path"
15159   fi
15160 
15161     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15162 $as_echo "$MSYS_ROOT_PATH" >&6; }
15163     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15164   else
15165     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15166   fi
15167 
15168   # Test if windows or unix (cygwin/msys) find is first in path.
15169   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15170 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15171   FIND_BINARY_OUTPUT=`find --version 2>&1`
15172   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15173     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15174 $as_echo "unix style" >&6; }
15175   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15176     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15177 $as_echo "Windows" >&6; }
15178     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15179 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15180     { $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
15181 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15182     as_fn_error $? "Cannot continue" "$LINENO" 5
15183   else
15184     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15185 $as_echo "unknown" >&6; }
15186     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15187 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15188   fi
15189 
15190   else
15191     PATH_SEP=":"
15192   fi
15193 
15194 
15195   # We get the top-level directory from the supporting wrappers.
15196   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15197 $as_echo_n "checking for top-level directory... " >&6; }
15198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15199 $as_echo "$TOPDIR" >&6; }
15200 
15201 
15202   # Save the original version of TOPDIR for string comparisons
15203   ORIGINAL_TOPDIR="$TOPDIR"
15204 
15205 
15206   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15207 
15208   # Only process if variable expands to non-empty
15209 
15210   if test "x$CURDIR" != x; then
15211     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15212 
15213   # Input might be given as Windows format, start by converting to
15214   # unix format.
15215   path="$CURDIR"
15216   new_path=`$CYGPATH -u "$path"`
15217 
15218   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15219   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15220   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15221   # "foo.exe" is OK but "foo" is an error.
15222   #
15223   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15224   # It is also a way to make sure we got the proper file name for the real test later on.
15225   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15226   if test "x$test_shortpath" = x; then
15227     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15228 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15229     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15230   fi
15231 
15232   # Call helper function which possibly converts this using DOS-style short mode.
15233   # If so, the updated path is stored in $new_path.
15234 
15235   input_path="$new_path"
15236   # Check if we need to convert this using DOS-style short mode. If the path
15237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15238   # take no chances and rewrite it.
15239   # Note: m4 eats our [], so we need to use [ and ] instead.
15240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15241   if test "x$has_forbidden_chars" != x; then
15242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15243     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15244     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15245     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15246       # Going to short mode and back again did indeed matter. Since short mode is
15247       # case insensitive, let's make it lowercase to improve readability.
15248       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15249       # Now convert it back to Unix-style (cygpath)
15250       input_path=`$CYGPATH -u "$shortmode_path"`
15251       new_path="$input_path"
15252     fi
15253   fi
15254 
15255   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15256   if test "x$test_cygdrive_prefix" = x; then
15257     # As a simple fix, exclude /usr/bin since it's not a real path.
15258     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15259       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15260       # a path prefixed by /cygdrive for fixpath to work.
15261       new_path="$CYGWIN_ROOT_PATH$input_path"
15262     fi
15263   fi
15264 
15265 
15266   if test "x$path" != "x$new_path"; then
15267     CURDIR="$new_path"
15268     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15269 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15270   fi
15271 
15272     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15273 
15274   path="$CURDIR"
15275   has_colon=`$ECHO $path | $GREP ^.:`
15276   new_path="$path"
15277   if test "x$has_colon" = x; then
15278     # Not in mixed or Windows style, start by that.
15279     new_path=`cmd //c echo $path`
15280   fi
15281 
15282 
15283   input_path="$new_path"
15284   # Check if we need to convert this using DOS-style short mode. If the path
15285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15286   # take no chances and rewrite it.
15287   # Note: m4 eats our [], so we need to use [ and ] instead.
15288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15289   if test "x$has_forbidden_chars" != x; then
15290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15291     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15292   fi
15293 
15294 
15295   windows_path="$new_path"
15296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15297     unix_path=`$CYGPATH -u "$windows_path"`
15298     new_path="$unix_path"
15299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15301     new_path="$unix_path"
15302   fi
15303 
15304   if test "x$path" != "x$new_path"; then
15305     CURDIR="$new_path"
15306     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15307 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15308   fi
15309 
15310   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15311   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15312 
15313     else
15314       # We're on a unix platform. Hooray! :)
15315       path="$CURDIR"
15316       has_space=`$ECHO "$path" | $GREP " "`
15317       if test "x$has_space" != x; then
15318         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15319 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15320         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15321       fi
15322 
15323       # Use eval to expand a potential ~
15324       eval path="$path"
15325       if test ! -f "$path" && test ! -d "$path"; then
15326         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15327       fi
15328 
15329       CURDIR="`cd "$path"; $THEPWDCMD -L`"
15330     fi
15331   fi
15332 
15333 
15334   # Only process if variable expands to non-empty
15335 
15336   if test "x$TOPDIR" != x; then
15337     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15338 
15339   # Input might be given as Windows format, start by converting to
15340   # unix format.
15341   path="$TOPDIR"
15342   new_path=`$CYGPATH -u "$path"`
15343 
15344   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15345   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15346   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15347   # "foo.exe" is OK but "foo" is an error.
15348   #
15349   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15350   # It is also a way to make sure we got the proper file name for the real test later on.
15351   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15352   if test "x$test_shortpath" = x; then
15353     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15354 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15355     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15356   fi
15357 
15358   # Call helper function which possibly converts this using DOS-style short mode.
15359   # If so, the updated path is stored in $new_path.
15360 
15361   input_path="$new_path"
15362   # Check if we need to convert this using DOS-style short mode. If the path
15363   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15364   # take no chances and rewrite it.
15365   # Note: m4 eats our [], so we need to use [ and ] instead.
15366   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15367   if test "x$has_forbidden_chars" != x; then
15368     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15369     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15370     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15371     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15372       # Going to short mode and back again did indeed matter. Since short mode is
15373       # case insensitive, let's make it lowercase to improve readability.
15374       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15375       # Now convert it back to Unix-style (cygpath)
15376       input_path=`$CYGPATH -u "$shortmode_path"`
15377       new_path="$input_path"
15378     fi
15379   fi
15380 
15381   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15382   if test "x$test_cygdrive_prefix" = x; then
15383     # As a simple fix, exclude /usr/bin since it's not a real path.
15384     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15385       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15386       # a path prefixed by /cygdrive for fixpath to work.
15387       new_path="$CYGWIN_ROOT_PATH$input_path"
15388     fi
15389   fi
15390 
15391 
15392   if test "x$path" != "x$new_path"; then
15393     TOPDIR="$new_path"
15394     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15395 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15396   fi
15397 
15398     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15399 
15400   path="$TOPDIR"
15401   has_colon=`$ECHO $path | $GREP ^.:`
15402   new_path="$path"
15403   if test "x$has_colon" = x; then
15404     # Not in mixed or Windows style, start by that.
15405     new_path=`cmd //c echo $path`
15406   fi
15407 
15408 
15409   input_path="$new_path"
15410   # Check if we need to convert this using DOS-style short mode. If the path
15411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15412   # take no chances and rewrite it.
15413   # Note: m4 eats our [], so we need to use [ and ] instead.
15414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15415   if test "x$has_forbidden_chars" != x; then
15416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15417     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15418   fi
15419 
15420 
15421   windows_path="$new_path"
15422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15423     unix_path=`$CYGPATH -u "$windows_path"`
15424     new_path="$unix_path"
15425   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15426     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15427     new_path="$unix_path"
15428   fi
15429 
15430   if test "x$path" != "x$new_path"; then
15431     TOPDIR="$new_path"
15432     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15433 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15434   fi
15435 
15436   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15437   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15438 
15439     else
15440       # We're on a unix platform. Hooray! :)
15441       path="$TOPDIR"
15442       has_space=`$ECHO "$path" | $GREP " "`
15443       if test "x$has_space" != x; then
15444         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15445 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15446         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15447       fi
15448 
15449       # Use eval to expand a potential ~
15450       eval path="$path"
15451       if test ! -f "$path" && test ! -d "$path"; then
15452         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15453       fi
15454 
15455       TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15456     fi
15457   fi
15458 
15459   # SRC_ROOT is a traditional alias for TOPDIR.
15460   SRC_ROOT=$TOPDIR
15461 
15462   # Calculate a canonical version of TOPDIR for string comparisons
15463   CANONICAL_TOPDIR=$TOPDIR
15464 
15465   if test "x$OPENJDK_BUILD_OS" != xwindows; then
15466     # Follow a chain of symbolic links. Use readlink
15467     # where it exists, else fall back to horribly
15468     # complicated shell code.
15469     if test "x$READLINK_TESTED" != yes; then
15470       # On MacOSX there is a readlink tool with a different
15471       # purpose than the GNU readlink tool. Check the found readlink.
15472       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15473       if test "x$ISGNU" = x; then
15474         # A readlink that we do not know how to use.
15475         # Are there other non-GNU readlinks out there?
15476         READLINK_TESTED=yes
15477         READLINK=
15478       fi
15479     fi
15480 
15481     if test "x$READLINK" != x; then
15482       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15483     else
15484       # Save the current directory for restoring afterwards
15485       STARTDIR=$PWD
15486       COUNTER=0
15487       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15488       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15489       cd $sym_link_dir
15490       # Use -P flag to resolve symlinks in directories.
15491       cd `$THEPWDCMD -P`
15492       sym_link_dir=`$THEPWDCMD -P`
15493       # Resolve file symlinks
15494       while test $COUNTER -lt 20; do
15495         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15496         if test "x$ISLINK" == x; then
15497           # This is not a symbolic link! We are done!
15498           break
15499         fi
15500         # Again resolve directory symlinks since the target of the just found
15501         # link could be in a different directory
15502         cd `$DIRNAME $ISLINK`
15503         sym_link_dir=`$THEPWDCMD -P`
15504         sym_link_file=`$BASENAME $ISLINK`
15505         let COUNTER=COUNTER+1
15506       done
15507       cd $STARTDIR
15508       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15509     fi
15510   fi
15511 
15512 
15513 
15514   # Locate the directory of this script.
15515   AUTOCONF_DIR=$TOPDIR/common/autoconf
15516 
15517 
15518 # Check if it's a pure open build or if custom sources are to be used.
15519 
15520   # Check whether --enable-openjdk-only was given.
15521 if test "${enable_openjdk_only+set}" = set; then :
15522   enableval=$enable_openjdk_only;
15523 else
15524   enable_openjdk_only="no"
15525 fi
15526 
15527 
15528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15529 $as_echo_n "checking for presence of closed sources... " >&6; }
15530   if test -d "$SRC_ROOT/jdk/src/closed"; then
15531     CLOSED_SOURCE_PRESENT=yes
15532   else
15533     CLOSED_SOURCE_PRESENT=no
15534   fi
15535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15536 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15537 
15538   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15539 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15540   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15542 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15543 
15544   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15545     OPENJDK=true
15546     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15547       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15548 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15549     fi
15550   else
15551     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15552       OPENJDK=true
15553     else
15554       OPENJDK=false
15555     fi
15556   fi
15557 
15558   if test "x$OPENJDK" = "xtrue"; then
15559     SET_OPENJDK="OPENJDK=true"
15560   fi
15561 
15562 
15563 
15564   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15565   # the IncludeCustomExtension macro.
15566 
15567 
15568 # Check whether --with-custom-make-dir was given.
15569 if test "${with_custom_make_dir+set}" = set; then :
15570   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
15571 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15572 fi
15573 
15574 
15575 
15576 
15577 # These are needed to be able to create a configuration name (and thus the output directory)
15578 
15579   ###############################################################################
15580   #
15581   # Check which variant of the JDK that we want to build.
15582   # Currently we have:
15583   #    normal:   standard edition
15584   # but the custom make system may add other variants
15585   #
15586   # Effectively the JDK variant gives a name to a specific set of
15587   # modules to compile into the JDK. In the future, these modules
15588   # might even be Jigsaw modules.
15589   #
15590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15591 $as_echo_n "checking which variant of the JDK to build... " >&6; }
15592 
15593 # Check whether --with-jdk-variant was given.
15594 if test "${with_jdk_variant+set}" = set; then :
15595   withval=$with_jdk_variant;
15596 fi
15597 
15598 
15599   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15600     JDK_VARIANT="normal"
15601   else
15602     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15603   fi
15604 
15605 
15606 
15607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15608 $as_echo "$JDK_VARIANT" >&6; }
15609 
15610 
15611 ###############################################################################
15612 #
15613 # Check which interpreter of the JVM we want to build.
15614 # Currently we have:
15615 #    template: Template interpreter (the default)
15616 #    cpp     : C++ interpreter
15617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15618 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15619 
15620 # Check whether --with-jvm-interpreter was given.
15621 if test "${with_jvm_interpreter+set}" = set; then :
15622   withval=$with_jvm_interpreter;
15623 fi
15624 
15625 
15626 if test "x$with_jvm_interpreter" = x; then
15627      with_jvm_interpreter="template"
15628 fi
15629 
15630 JVM_INTERPRETER="$with_jvm_interpreter"
15631 
15632 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15633    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15634 fi
15635 
15636 
15637 
15638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15639 $as_echo "$with_jvm_interpreter" >&6; }
15640 
15641 
15642 
15643   ###############################################################################
15644   #
15645   # Check which variants of the JVM that we want to build.
15646   # Currently we have:
15647   #    server: normal interpreter and a tiered C1/C2 compiler
15648   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15649   #    minimal1: reduced form of client with optional VM services and features stripped out
15650   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15651   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15652   #    zero: no machine code interpreter, no compiler
15653   #    zeroshark: zero interpreter and shark/llvm compiler backend
15654 #    core: interpreter only, no compiler (only works on some platforms)
15655   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15656 $as_echo_n "checking which variants of the JVM to build... " >&6; }
15657 
15658 # Check whether --with-jvm-variants was given.
15659 if test "${with_jvm_variants+set}" = set; then :
15660   withval=$with_jvm_variants;
15661 fi
15662 
15663 
15664   if test "x$with_jvm_variants" = x; then
15665     with_jvm_variants="server"
15666   fi
15667 
15668   JVM_VARIANTS=",$with_jvm_variants,"
15669   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,//'`
15670 
15671   if test "x$TEST_VARIANTS" != "x,"; then
15672      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15673   fi
15674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15675 $as_echo "$with_jvm_variants" >&6; }
15676 
15677   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15678   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15679   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15680   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15681   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15682   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15683   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15684 
15685   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15686     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15687       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15688     fi
15689   fi
15690   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15691     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15692       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15693     fi
15694   fi
15695   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15696     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15697       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15698     fi
15699   fi
15700 
15701   # Replace the commas with AND for use in the build directory name.
15702   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15703   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/'`
15704   if test "x$COUNT_VARIANTS" != "x,1"; then
15705     BUILDING_MULTIPLE_JVM_VARIANTS=yes
15706   else
15707     BUILDING_MULTIPLE_JVM_VARIANTS=no
15708   fi
15709 
15710 
15711 
15712 
15713 
15714 
15715 
15716 
15717 
15718 
15719   INCLUDE_SA=true
15720   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15721     INCLUDE_SA=false
15722   fi
15723   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15724     INCLUDE_SA=false
15725   fi
15726   if test "x$OPENJDK_TARGET_OS" = xaix ; then
15727     INCLUDE_SA=false
15728   fi
15729   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15730     INCLUDE_SA=false
15731   fi
15732 
15733 
15734   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15735     MACOSX_UNIVERSAL="true"
15736   fi
15737 
15738 
15739 
15740 
15741   ###############################################################################
15742   #
15743   # Set the debug level
15744   #    release: no debug information, all optimizations, no asserts.
15745   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15746   #    fastdebug: debug information (-g), all optimizations, all asserts
15747   #    slowdebug: debug information (-g), no optimizations, all asserts
15748   #
15749   DEBUG_LEVEL="release"
15750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15751 $as_echo_n "checking which debug level to use... " >&6; }
15752   # Check whether --enable-debug was given.
15753 if test "${enable_debug+set}" = set; then :
15754   enableval=$enable_debug;
15755         ENABLE_DEBUG="${enableval}"
15756         DEBUG_LEVEL="fastdebug"
15757 
15758 else
15759   ENABLE_DEBUG="no"
15760 fi
15761 
15762 
15763 
15764 # Check whether --with-debug-level was given.
15765 if test "${with_debug_level+set}" = set; then :
15766   withval=$with_debug_level;
15767         DEBUG_LEVEL="${withval}"
15768         if test "x$ENABLE_DEBUG" = xyes; then
15769           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15770         fi
15771 
15772 fi
15773 
15774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15775 $as_echo "$DEBUG_LEVEL" >&6; }
15776 
15777   if test "x$DEBUG_LEVEL" != xrelease && \
15778       test "x$DEBUG_LEVEL" != xoptimized && \
15779       test "x$DEBUG_LEVEL" != xfastdebug && \
15780       test "x$DEBUG_LEVEL" != xslowdebug; then
15781     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15782   fi
15783 
15784 
15785   ###############################################################################
15786   #
15787   # Setup legacy vars/targets and new vars to deal with different debug levels.
15788   #
15789 
15790   case $DEBUG_LEVEL in
15791     release )
15792       VARIANT="OPT"
15793       FASTDEBUG="false"
15794       DEBUG_CLASSFILES="false"
15795       BUILD_VARIANT_RELEASE=""
15796       HOTSPOT_DEBUG_LEVEL="product"
15797       HOTSPOT_EXPORT="product"
15798       ;;
15799     fastdebug )
15800       VARIANT="DBG"
15801       FASTDEBUG="true"
15802       DEBUG_CLASSFILES="true"
15803       BUILD_VARIANT_RELEASE="-fastdebug"
15804       HOTSPOT_DEBUG_LEVEL="fastdebug"
15805       HOTSPOT_EXPORT="fastdebug"
15806       ;;
15807     slowdebug )
15808       VARIANT="DBG"
15809       FASTDEBUG="false"
15810       DEBUG_CLASSFILES="true"
15811       BUILD_VARIANT_RELEASE="-debug"
15812       HOTSPOT_DEBUG_LEVEL="debug"
15813       HOTSPOT_EXPORT="debug"
15814       ;;
15815     optimized )
15816       VARIANT="OPT"
15817       FASTDEBUG="false"
15818       DEBUG_CLASSFILES="false"
15819       BUILD_VARIANT_RELEASE="-optimized"
15820       HOTSPOT_DEBUG_LEVEL="optimized"
15821       HOTSPOT_EXPORT="optimized"
15822       ;;
15823   esac
15824 
15825   # The debug level 'optimized' is a little special because it is currently only
15826   # applicable to the HotSpot build where it means to build a completely
15827   # optimized version of the VM without any debugging code (like for the
15828   # 'release' debug level which is called 'product' in the HotSpot build) but
15829   # with the exception that it can contain additional code which is otherwise
15830   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15831   # test new and/or experimental features which are not intended for customer
15832   # shipment. Because these new features need to be tested and benchmarked in
15833   # real world scenarios, we want to build the containing JDK at the 'release'
15834   # debug level.
15835   if test "x$DEBUG_LEVEL" = xoptimized; then
15836     DEBUG_LEVEL="release"
15837   fi
15838 
15839   #####
15840   # Generate the legacy makefile targets for hotspot.
15841   # The hotspot api for selecting the build artifacts, really, needs to be improved.
15842   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15843   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15844   # But until then ...
15845   HOTSPOT_TARGET=""
15846 
15847   if test "x$JVM_VARIANT_SERVER" = xtrue; then
15848     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15849   fi
15850 
15851   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15852     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15853   fi
15854 
15855   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15856     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15857   fi
15858 
15859   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15860     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15861   fi
15862 
15863   if test "x$JVM_VARIANT_ZERO" = xtrue; then
15864     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15865   fi
15866 
15867   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15868     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15869   fi
15870 
15871   if test "x$JVM_VARIANT_CORE" = xtrue; then
15872     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15873   fi
15874 
15875   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15876 
15877   # On Macosx universal binaries are produced, but they only contain
15878   # 64 bit intel. This invalidates control of which jvms are built
15879   # from configure, but only server is valid anyway. Fix this
15880   # when hotspot makefiles are rewritten.
15881   if test "x$MACOSX_UNIVERSAL" = xtrue; then
15882     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15883   fi
15884 
15885   #####
15886 
15887 
15888 
15889 
15890 
15891 
15892 
15893 
15894 # With basic setup done, call the custom early hook.
15895 
15896 
15897 # Check if we have devkits, extra paths or sysroot set.
15898 
15899 
15900 # Check whether --with-devkit was given.
15901 if test "${with_devkit+set}" = set; then :
15902   withval=$with_devkit;
15903 
15904   # Only process if variable expands to non-empty
15905 
15906   if test "x$with_devkit" != x; then
15907     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15908 
15909   # Input might be given as Windows format, start by converting to
15910   # unix format.
15911   path="$with_devkit"
15912   new_path=`$CYGPATH -u "$path"`
15913 
15914   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15915   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15916   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15917   # "foo.exe" is OK but "foo" is an error.
15918   #
15919   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15920   # It is also a way to make sure we got the proper file name for the real test later on.
15921   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15922   if test "x$test_shortpath" = x; then
15923     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15924 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15925     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15926   fi
15927 
15928   # Call helper function which possibly converts this using DOS-style short mode.
15929   # If so, the updated path is stored in $new_path.
15930 
15931   input_path="$new_path"
15932   # Check if we need to convert this using DOS-style short mode. If the path
15933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15934   # take no chances and rewrite it.
15935   # Note: m4 eats our [], so we need to use [ and ] instead.
15936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15937   if test "x$has_forbidden_chars" != x; then
15938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15939     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15940     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15941     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15942       # Going to short mode and back again did indeed matter. Since short mode is
15943       # case insensitive, let's make it lowercase to improve readability.
15944       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15945       # Now convert it back to Unix-style (cygpath)
15946       input_path=`$CYGPATH -u "$shortmode_path"`
15947       new_path="$input_path"
15948     fi
15949   fi
15950 
15951   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15952   if test "x$test_cygdrive_prefix" = x; then
15953     # As a simple fix, exclude /usr/bin since it's not a real path.
15954     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15955       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15956       # a path prefixed by /cygdrive for fixpath to work.
15957       new_path="$CYGWIN_ROOT_PATH$input_path"
15958     fi
15959   fi
15960 
15961 
15962   if test "x$path" != "x$new_path"; then
15963     with_devkit="$new_path"
15964     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15965 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15966   fi
15967 
15968     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15969 
15970   path="$with_devkit"
15971   has_colon=`$ECHO $path | $GREP ^.:`
15972   new_path="$path"
15973   if test "x$has_colon" = x; then
15974     # Not in mixed or Windows style, start by that.
15975     new_path=`cmd //c echo $path`
15976   fi
15977 
15978 
15979   input_path="$new_path"
15980   # Check if we need to convert this using DOS-style short mode. If the path
15981   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15982   # take no chances and rewrite it.
15983   # Note: m4 eats our [], so we need to use [ and ] instead.
15984   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15985   if test "x$has_forbidden_chars" != x; then
15986     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15987     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15988   fi
15989 
15990 
15991   windows_path="$new_path"
15992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15993     unix_path=`$CYGPATH -u "$windows_path"`
15994     new_path="$unix_path"
15995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15997     new_path="$unix_path"
15998   fi
15999 
16000   if test "x$path" != "x$new_path"; then
16001     with_devkit="$new_path"
16002     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16003 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16004   fi
16005 
16006   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16007   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16008 
16009     else
16010       # We're on a unix platform. Hooray! :)
16011       path="$with_devkit"
16012       has_space=`$ECHO "$path" | $GREP " "`
16013       if test "x$has_space" != x; then
16014         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16015 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16016         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16017       fi
16018 
16019       # Use eval to expand a potential ~
16020       eval path="$path"
16021       if test ! -f "$path" && test ! -d "$path"; then
16022         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16023       fi
16024 
16025       with_devkit="`cd "$path"; $THEPWDCMD -L`"
16026     fi
16027   fi
16028 
16029         DEVKIT_ROOT="$with_devkit"
16030         # Check for a meta data info file in the root of the devkit
16031         if test -f "$DEVKIT_ROOT/devkit.info"; then
16032           . $DEVKIT_ROOT/devkit.info
16033           # This potentially sets the following:
16034           # A descriptive name of the devkit
16035 
16036   if test "x$DEVKIT_NAME" = x; then
16037     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16038   fi
16039 
16040           # Corresponds to --with-extra-path
16041 
16042   if test "x$DEVKIT_EXTRA_PATH" = x; then
16043     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16044   fi
16045 
16046           # Corresponds to --with-toolchain-path
16047 
16048   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16049     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16050   fi
16051 
16052           # Corresponds to --with-sysroot
16053 
16054   if test "x$DEVKIT_SYSROOT" = x; then
16055     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16056   fi
16057 
16058 
16059           # Identifies the Visual Studio version in the devkit
16060 
16061   if test "x$DEVKIT_VS_VERSION" = x; then
16062     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16063   fi
16064 
16065           # The Visual Studio include environment variable
16066 
16067   if test "x$DEVKIT_VS_INCLUDE" = x; then
16068     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16069   fi
16070 
16071           # The Visual Studio lib environment variable
16072 
16073   if test "x$DEVKIT_VS_LIB" = x; then
16074     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16075   fi
16076 
16077           # Corresponds to --with-msvcr-dll
16078 
16079   if test "x$DEVKIT_MSVCR_DLL" = x; then
16080     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16081   fi
16082 
16083           # Corresponds to --with-msvcp-dll
16084 
16085   if test "x$DEVKIT_MSVCP_DLL" = x; then
16086     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16087   fi
16088 
16089         fi
16090 
16091         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16092 $as_echo_n "checking for devkit... " >&6; }
16093         if test "x$DEVKIT_NAME" != x; then
16094           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16095 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16096         else
16097           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16098 $as_echo "$DEVKIT_ROOT" >&6; }
16099         fi
16100 
16101 
16102   if test "x$DEVKIT_EXTRA_PATH" != x; then
16103     if test "x$EXTRA_PATH" = x; then
16104       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16105     else
16106       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16107     fi
16108   fi
16109 
16110 
16111         # Fallback default of just /bin if DEVKIT_PATH is not defined
16112         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16113           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16114         fi
16115 
16116   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16117     if test "x$TOOLCHAIN_PATH" = x; then
16118       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16119     else
16120       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16121     fi
16122   fi
16123 
16124 
16125         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16126         # places for backwards compatiblity.
16127         if test "x$DEVKIT_SYSROOT" != x; then
16128           SYSROOT="$DEVKIT_SYSROOT"
16129         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16130           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16131         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16132           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16133         fi
16134 
16135 
16136 fi
16137 
16138 
16139   # You can force the sysroot if the sysroot encoded into the compiler tools
16140   # is not correct.
16141 
16142 # Check whether --with-sys-root was given.
16143 if test "${with_sys_root+set}" = set; then :
16144   withval=$with_sys_root; SYSROOT=$with_sys_root
16145 
16146 fi
16147 
16148 
16149 
16150 # Check whether --with-sysroot was given.
16151 if test "${with_sysroot+set}" = set; then :
16152   withval=$with_sysroot; SYSROOT=$with_sysroot
16153 
16154 fi
16155 
16156 
16157 
16158 # Check whether --with-tools-dir was given.
16159 if test "${with_tools_dir+set}" = set; then :
16160   withval=$with_tools_dir;
16161   if test "x$with_tools_dir" != x; then
16162     if test "x$TOOLCHAIN_PATH" = x; then
16163       TOOLCHAIN_PATH="$with_tools_dir"
16164     else
16165       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16166     fi
16167   fi
16168 
16169 
16170 fi
16171 
16172 
16173 
16174 # Check whether --with-toolchain-path was given.
16175 if test "${with_toolchain_path+set}" = set; then :
16176   withval=$with_toolchain_path;
16177   if test "x$with_toolchain_path" != x; then
16178     if test "x$TOOLCHAIN_PATH" = x; then
16179       TOOLCHAIN_PATH="$with_toolchain_path"
16180     else
16181       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16182     fi
16183   fi
16184 
16185 
16186 fi
16187 
16188 
16189 
16190 # Check whether --with-extra-path was given.
16191 if test "${with_extra_path+set}" = set; then :
16192   withval=$with_extra_path;
16193   if test "x$with_extra_path" != x; then
16194     if test "x$EXTRA_PATH" = x; then
16195       EXTRA_PATH="$with_extra_path"
16196     else
16197       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16198     fi
16199   fi
16200 
16201 
16202 fi
16203 
16204 
16205   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16206     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16207     # If not, detect if Xcode is installed by running xcodebuild -version
16208     # if no Xcode installed, xcodebuild exits with 1
16209     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16210     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16211       # We need to use xcodebuild in the toolchain dir provided by the user, this will
16212       # fall back on the stub binary in /usr/bin/xcodebuild
16213       # Extract the first word of "xcodebuild", so it can be a program name with args.
16214 set dummy xcodebuild; ac_word=$2
16215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16216 $as_echo_n "checking for $ac_word... " >&6; }
16217 if ${ac_cv_path_XCODEBUILD+:} false; then :
16218   $as_echo_n "(cached) " >&6
16219 else
16220   case $XCODEBUILD in
16221   [\\/]* | ?:[\\/]*)
16222   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16223   ;;
16224   *)
16225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16226 for as_dir in $TOOLCHAIN_PATH
16227 do
16228   IFS=$as_save_IFS
16229   test -z "$as_dir" && as_dir=.
16230     for ac_exec_ext in '' $ac_executable_extensions; do
16231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16232     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16234     break 2
16235   fi
16236 done
16237   done
16238 IFS=$as_save_IFS
16239 
16240   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16241   ;;
16242 esac
16243 fi
16244 XCODEBUILD=$ac_cv_path_XCODEBUILD
16245 if test -n "$XCODEBUILD"; then
16246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16247 $as_echo "$XCODEBUILD" >&6; }
16248 else
16249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16250 $as_echo "no" >&6; }
16251 fi
16252 
16253 
16254     else
16255       # this should result in SYSROOT being empty, unless --with-sysroot is provided
16256       # when only the command line tools are installed there are no SDKs, so headers
16257       # are copied into the system frameworks
16258       XCODEBUILD=
16259 
16260     fi
16261 
16262     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16263 $as_echo_n "checking for sdk name... " >&6; }
16264 
16265 # Check whether --with-sdk-name was given.
16266 if test "${with_sdk_name+set}" = set; then :
16267   withval=$with_sdk_name; SDKNAME=$with_sdk_name
16268 
16269 fi
16270 
16271     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16272 $as_echo "$SDKNAME" >&6; }
16273 
16274     # if toolchain path is specified then don't rely on system headers, they may not compile
16275     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16276     test -z "$TOOLCHAIN_PATH" && \
16277       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16278 
16279     if test -z "$SYSROOT"; then
16280       if test -n "$XCODEBUILD"; then
16281         # if we don't have system headers, use default SDK name (last resort)
16282         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16283           SDKNAME=${SDKNAME:-macosx}
16284         fi
16285 
16286         if test -n "$SDKNAME"; then
16287           # Call xcodebuild to determine SYSROOT
16288           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16289         fi
16290       else
16291         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16292           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
16293         fi
16294       fi
16295     else
16296       # warn user if --with-sdk-name was also set
16297       if test -n "$with_sdk_name"; then
16298         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16299 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16300       fi
16301     fi
16302 
16303     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16304       # If no system framework headers, then SYSROOT must be set, or we won't build
16305       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
16306     fi
16307 
16308     # Perform a basic sanity test
16309     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16310       if test -z "$SYSROOT"; then
16311         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
16312       else
16313         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16314       fi
16315     fi
16316 
16317     # set SDKROOT too, Xcode tools will pick it up
16318     SDKROOT=$SYSROOT
16319 
16320   fi
16321 
16322   # Prepend the extra path to the global path
16323 
16324   if test "x$EXTRA_PATH" != x; then
16325     if test "x$PATH" = x; then
16326       PATH="$EXTRA_PATH"
16327     else
16328       PATH="$EXTRA_PATH:$PATH"
16329     fi
16330   fi
16331 
16332 
16333   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16334     # Add extra search paths on solaris for utilities like ar and as etc...
16335     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16336   fi
16337 
16338   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16339 $as_echo_n "checking for sysroot... " >&6; }
16340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16341 $as_echo "$SYSROOT" >&6; }
16342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16343 $as_echo_n "checking for toolchain path... " >&6; }
16344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16345 $as_echo "$TOOLCHAIN_PATH" >&6; }
16346   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16347 $as_echo_n "checking for extra path... " >&6; }
16348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16349 $as_echo "$EXTRA_PATH" >&6; }
16350 
16351 
16352 # To properly create a configuration name, we need to have the OpenJDK target
16353 # and options (variants and debug level) parsed.
16354 
16355 
16356 
16357 # Check whether --with-conf-name was given.
16358 if test "${with_conf_name+set}" = set; then :
16359   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16360 fi
16361 
16362 
16363   # Test from where we are running configure, in or outside of src root.
16364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16365 $as_echo_n "checking where to store configuration... " >&6; }
16366   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16367       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16368       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16369     # We are running configure from the src root.
16370     # Create a default ./build/target-variant-debuglevel output root.
16371     if test "x${CONF_NAME}" = x; then
16372       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16373 $as_echo "in default location" >&6; }
16374       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16375     else
16376       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16377 $as_echo "in build directory with custom name" >&6; }
16378     fi
16379     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16380     $MKDIR -p "$OUTPUT_ROOT"
16381     if test ! -d "$OUTPUT_ROOT"; then
16382       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16383     fi
16384   else
16385     # We are running configure from outside of the src dir.
16386     # Then use the current directory as output dir!
16387     # If configuration is situated in normal build directory, just use the build
16388     # directory name as configuration name, otherwise use the complete path.
16389     if test "x${CONF_NAME}" = x; then
16390       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16391     fi
16392     OUTPUT_ROOT="$CURDIR"
16393     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16394 $as_echo "in current directory" >&6; }
16395 
16396     # WARNING: This might be a bad thing to do. You need to be sure you want to
16397     # have a configuration in this directory. Do some sanity checks!
16398 
16399     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16400       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16401       # other files
16402       files_present=`$LS $OUTPUT_ROOT`
16403       # Configure has already touched config.log and confdefs.h in the current dir when this check
16404       # is performed.
16405       filtered_files=`$ECHO "$files_present" \
16406           | $SED -e 's/config.log//g' \
16407               -e 's/configure.log//g' \
16408               -e 's/confdefs.h//g' \
16409               -e 's/ //g' \
16410           | $TR -d '\n'`
16411       if test "x$filtered_files" != x; then
16412         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16413 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
16414         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16415 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16416         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16417 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16418         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16419 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16420         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16421 $as_echo "$as_me: seriously mess up just about everything." >&6;}
16422         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16423 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16424         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16425 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16426         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16427       fi
16428     fi
16429   fi
16430   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16431 $as_echo_n "checking what configuration name to use... " >&6; }
16432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16433 $as_echo "$CONF_NAME" >&6; }
16434 
16435 
16436   # Only process if variable expands to non-empty
16437 
16438   if test "x$OUTPUT_ROOT" != x; then
16439     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16440 
16441   # Input might be given as Windows format, start by converting to
16442   # unix format.
16443   path="$OUTPUT_ROOT"
16444   new_path=`$CYGPATH -u "$path"`
16445 
16446   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16447   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16448   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16449   # "foo.exe" is OK but "foo" is an error.
16450   #
16451   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16452   # It is also a way to make sure we got the proper file name for the real test later on.
16453   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16454   if test "x$test_shortpath" = x; then
16455     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16456 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16457     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16458   fi
16459 
16460   # Call helper function which possibly converts this using DOS-style short mode.
16461   # If so, the updated path is stored in $new_path.
16462 
16463   input_path="$new_path"
16464   # Check if we need to convert this using DOS-style short mode. If the path
16465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16466   # take no chances and rewrite it.
16467   # Note: m4 eats our [], so we need to use [ and ] instead.
16468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16469   if test "x$has_forbidden_chars" != x; then
16470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16471     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16472     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16473     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16474       # Going to short mode and back again did indeed matter. Since short mode is
16475       # case insensitive, let's make it lowercase to improve readability.
16476       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16477       # Now convert it back to Unix-style (cygpath)
16478       input_path=`$CYGPATH -u "$shortmode_path"`
16479       new_path="$input_path"
16480     fi
16481   fi
16482 
16483   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16484   if test "x$test_cygdrive_prefix" = x; then
16485     # As a simple fix, exclude /usr/bin since it's not a real path.
16486     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16487       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16488       # a path prefixed by /cygdrive for fixpath to work.
16489       new_path="$CYGWIN_ROOT_PATH$input_path"
16490     fi
16491   fi
16492 
16493 
16494   if test "x$path" != "x$new_path"; then
16495     OUTPUT_ROOT="$new_path"
16496     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16497 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16498   fi
16499 
16500     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16501 
16502   path="$OUTPUT_ROOT"
16503   has_colon=`$ECHO $path | $GREP ^.:`
16504   new_path="$path"
16505   if test "x$has_colon" = x; then
16506     # Not in mixed or Windows style, start by that.
16507     new_path=`cmd //c echo $path`
16508   fi
16509 
16510 
16511   input_path="$new_path"
16512   # Check if we need to convert this using DOS-style short mode. If the path
16513   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16514   # take no chances and rewrite it.
16515   # Note: m4 eats our [], so we need to use [ and ] instead.
16516   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16517   if test "x$has_forbidden_chars" != x; then
16518     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16519     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16520   fi
16521 
16522 
16523   windows_path="$new_path"
16524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16525     unix_path=`$CYGPATH -u "$windows_path"`
16526     new_path="$unix_path"
16527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16529     new_path="$unix_path"
16530   fi
16531 
16532   if test "x$path" != "x$new_path"; then
16533     OUTPUT_ROOT="$new_path"
16534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16535 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16536   fi
16537 
16538   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16539   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16540 
16541     else
16542       # We're on a unix platform. Hooray! :)
16543       path="$OUTPUT_ROOT"
16544       has_space=`$ECHO "$path" | $GREP " "`
16545       if test "x$has_space" != x; then
16546         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16547 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16548         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16549       fi
16550 
16551       # Use eval to expand a potential ~
16552       eval path="$path"
16553       if test ! -f "$path" && test ! -d "$path"; then
16554         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16555       fi
16556 
16557       OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16558     fi
16559   fi
16560 
16561 
16562   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16563   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16564 
16565   SPEC=$OUTPUT_ROOT/spec.gmk
16566 
16567   CONF_NAME=$CONF_NAME
16568 
16569   OUTPUT_ROOT=$OUTPUT_ROOT
16570 
16571 
16572 
16573   # The spec.gmk file contains all variables for the make system.
16574   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16575 
16576   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16577   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16578 
16579   # The bootcycle-spec.gmk file contains support for boot cycle builds.
16580   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16581 
16582   # The compare.sh is used to compare the build output to other builds.
16583   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16584 
16585   # The generated Makefile knows where the spec.gmk is and where the source is.
16586   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16587   # which will look for generated configurations
16588   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16589 
16590 
16591 
16592 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16593 
16594   for ac_prog in apt-get yum port pkgutil pkgadd
16595 do
16596   # Extract the first word of "$ac_prog", so it can be a program name with args.
16597 set dummy $ac_prog; ac_word=$2
16598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16599 $as_echo_n "checking for $ac_word... " >&6; }
16600 if ${ac_cv_prog_PKGHANDLER+:} false; then :
16601   $as_echo_n "(cached) " >&6
16602 else
16603   if test -n "$PKGHANDLER"; then
16604   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16605 else
16606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16607 for as_dir in $PATH
16608 do
16609   IFS=$as_save_IFS
16610   test -z "$as_dir" && as_dir=.
16611     for ac_exec_ext in '' $ac_executable_extensions; do
16612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16613     ac_cv_prog_PKGHANDLER="$ac_prog"
16614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16615     break 2
16616   fi
16617 done
16618   done
16619 IFS=$as_save_IFS
16620 
16621 fi
16622 fi
16623 PKGHANDLER=$ac_cv_prog_PKGHANDLER
16624 if test -n "$PKGHANDLER"; then
16625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16626 $as_echo "$PKGHANDLER" >&6; }
16627 else
16628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16629 $as_echo "no" >&6; }
16630 fi
16631 
16632 
16633   test -n "$PKGHANDLER" && break
16634 done
16635 
16636 
16637 
16638 # Setup tools that requires more complex handling, or that is not needed by the configure script.
16639 
16640 
16641 
16642   # Publish this variable in the help.
16643 
16644 
16645   if [ -z "${MAKE+x}" ]; then
16646     # The variable is not set by user, try to locate tool using the code snippet
16647 
16648     # Try our hardest to locate a correct version of GNU make
16649     for ac_prog in gmake
16650 do
16651   # Extract the first word of "$ac_prog", so it can be a program name with args.
16652 set dummy $ac_prog; ac_word=$2
16653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16654 $as_echo_n "checking for $ac_word... " >&6; }
16655 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16656   $as_echo_n "(cached) " >&6
16657 else
16658   case $CHECK_GMAKE in
16659   [\\/]* | ?:[\\/]*)
16660   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16661   ;;
16662   *)
16663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16664 for as_dir in $PATH
16665 do
16666   IFS=$as_save_IFS
16667   test -z "$as_dir" && as_dir=.
16668     for ac_exec_ext in '' $ac_executable_extensions; do
16669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16670     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16672     break 2
16673   fi
16674 done
16675   done
16676 IFS=$as_save_IFS
16677 
16678   ;;
16679 esac
16680 fi
16681 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16682 if test -n "$CHECK_GMAKE"; then
16683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16684 $as_echo "$CHECK_GMAKE" >&6; }
16685 else
16686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16687 $as_echo "no" >&6; }
16688 fi
16689 
16690 
16691   test -n "$CHECK_GMAKE" && break
16692 done
16693 
16694 
16695   MAKE_CANDIDATE=""$CHECK_GMAKE""
16696   DESCRIPTION="gmake in PATH"
16697 
16698   # On Cygwin, we require a newer version of make than on other platforms
16699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16700     MAKE_VERSION_EXPR="-e 4\."
16701     MAKE_REQUIRED_VERSION="4.0"
16702    else
16703     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16704     MAKE_REQUIRED_VERSION="3.81"
16705   fi
16706 
16707   if test "x$MAKE_CANDIDATE" != x; then
16708     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16709 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16710     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16711     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16712     if test "x$IS_GNU_MAKE" = x; then
16713       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16714 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16715     else
16716       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16717       if test "x$IS_MODERN_MAKE" = x; then
16718         { $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
16719 $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;}
16720       else
16721         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16722           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16723             MAKE_EXPECTED_ENV='cygwin'
16724           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16725             MAKE_EXPECTED_ENV='msys'
16726           else
16727             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16728           fi
16729           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16730           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16731         else
16732           # Not relevant for non-Windows
16733           IS_MAKE_CORRECT_ENV=true
16734         fi
16735         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16736           { $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
16737 $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;}
16738         else
16739           FOUND_MAKE=$MAKE_CANDIDATE
16740 
16741   # Only process if variable expands to non-empty
16742 
16743   if test "x$FOUND_MAKE" != x; then
16744     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16745 
16746   # First separate the path from the arguments. This will split at the first
16747   # space.
16748   complete="$FOUND_MAKE"
16749   path="${complete%% *}"
16750   tmp="$complete EOL"
16751   arguments="${tmp#* }"
16752 
16753   # Input might be given as Windows format, start by converting to
16754   # unix format.
16755   new_path=`$CYGPATH -u "$path"`
16756 
16757   # Now try to locate executable using which
16758   new_path=`$WHICH "$new_path" 2> /dev/null`
16759   # bat and cmd files are not always considered executable in cygwin causing which
16760   # to not find them
16761   if test "x$new_path" = x \
16762       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16763       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16764     new_path=`$CYGPATH -u "$path"`
16765   fi
16766   if test "x$new_path" = x; then
16767     # Oops. Which didn't find the executable.
16768     # The splitting of arguments from the executable at a space might have been incorrect,
16769     # since paths with space are more likely in Windows. Give it another try with the whole
16770     # argument.
16771     path="$complete"
16772     arguments="EOL"
16773     new_path=`$CYGPATH -u "$path"`
16774     new_path=`$WHICH "$new_path" 2> /dev/null`
16775     # bat and cmd files are not always considered executable in cygwin causing which
16776     # to not find them
16777     if test "x$new_path" = x \
16778         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16779         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16780       new_path=`$CYGPATH -u "$path"`
16781     fi
16782     if test "x$new_path" = x; then
16783       # It's still not found. Now this is an unrecoverable error.
16784       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16785 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16786       has_space=`$ECHO "$complete" | $GREP " "`
16787       if test "x$has_space" != x; then
16788         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16789 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16790       fi
16791       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16792     fi
16793   fi
16794 
16795   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16796   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16797   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16798   # "foo.exe" is OK but "foo" is an error.
16799   #
16800   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16801   # It is also a way to make sure we got the proper file name for the real test later on.
16802   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16803   if test "x$test_shortpath" = x; then
16804     # Short path failed, file does not exist as specified.
16805     # Try adding .exe or .cmd
16806     if test -f "${new_path}.exe"; then
16807       input_to_shortpath="${new_path}.exe"
16808     elif test -f "${new_path}.cmd"; then
16809       input_to_shortpath="${new_path}.cmd"
16810     else
16811       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16812 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16813       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16814 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16815       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16816     fi
16817   else
16818     input_to_shortpath="$new_path"
16819   fi
16820 
16821   # Call helper function which possibly converts this using DOS-style short mode.
16822   # If so, the updated path is stored in $new_path.
16823   new_path="$input_to_shortpath"
16824 
16825   input_path="$input_to_shortpath"
16826   # Check if we need to convert this using DOS-style short mode. If the path
16827   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16828   # take no chances and rewrite it.
16829   # Note: m4 eats our [], so we need to use [ and ] instead.
16830   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16831   if test "x$has_forbidden_chars" != x; then
16832     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16833     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16834     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16835     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16836       # Going to short mode and back again did indeed matter. Since short mode is
16837       # case insensitive, let's make it lowercase to improve readability.
16838       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16839       # Now convert it back to Unix-style (cygpath)
16840       input_path=`$CYGPATH -u "$shortmode_path"`
16841       new_path="$input_path"
16842     fi
16843   fi
16844 
16845   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16846   if test "x$test_cygdrive_prefix" = x; then
16847     # As a simple fix, exclude /usr/bin since it's not a real path.
16848     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16849       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16850       # a path prefixed by /cygdrive for fixpath to work.
16851       new_path="$CYGWIN_ROOT_PATH$input_path"
16852     fi
16853   fi
16854 
16855   # remove trailing .exe if any
16856   new_path="${new_path/%.exe/}"
16857 
16858     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16859 
16860   # First separate the path from the arguments. This will split at the first
16861   # space.
16862   complete="$FOUND_MAKE"
16863   path="${complete%% *}"
16864   tmp="$complete EOL"
16865   arguments="${tmp#* }"
16866 
16867   # Input might be given as Windows format, start by converting to
16868   # unix format.
16869   new_path="$path"
16870 
16871   windows_path="$new_path"
16872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16873     unix_path=`$CYGPATH -u "$windows_path"`
16874     new_path="$unix_path"
16875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16876     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16877     new_path="$unix_path"
16878   fi
16879 
16880 
16881   # Now try to locate executable using which
16882   new_path=`$WHICH "$new_path" 2> /dev/null`
16883 
16884   if test "x$new_path" = x; then
16885     # Oops. Which didn't find the executable.
16886     # The splitting of arguments from the executable at a space might have been incorrect,
16887     # since paths with space are more likely in Windows. Give it another try with the whole
16888     # argument.
16889     path="$complete"
16890     arguments="EOL"
16891     new_path="$path"
16892 
16893   windows_path="$new_path"
16894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16895     unix_path=`$CYGPATH -u "$windows_path"`
16896     new_path="$unix_path"
16897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16899     new_path="$unix_path"
16900   fi
16901 
16902 
16903     new_path=`$WHICH "$new_path" 2> /dev/null`
16904     # bat and cmd files are not always considered executable in MSYS causing which
16905     # to not find them
16906     if test "x$new_path" = x \
16907         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16908         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16909       new_path="$path"
16910 
16911   windows_path="$new_path"
16912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16913     unix_path=`$CYGPATH -u "$windows_path"`
16914     new_path="$unix_path"
16915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16917     new_path="$unix_path"
16918   fi
16919 
16920     fi
16921 
16922     if test "x$new_path" = x; then
16923       # It's still not found. Now this is an unrecoverable error.
16924       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16925 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16926       has_space=`$ECHO "$complete" | $GREP " "`
16927       if test "x$has_space" != x; then
16928         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16929 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16930       fi
16931       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16932     fi
16933   fi
16934 
16935   # Now new_path has a complete unix path to the binary
16936   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16937     # Keep paths in /bin as-is, but remove trailing .exe if any
16938     new_path="${new_path/%.exe/}"
16939     # Do not save /bin paths to all_fixpath_prefixes!
16940   else
16941     # Not in mixed or Windows style, start by that.
16942     new_path=`cmd //c echo $new_path`
16943 
16944   input_path="$new_path"
16945   # Check if we need to convert this using DOS-style short mode. If the path
16946   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16947   # take no chances and rewrite it.
16948   # Note: m4 eats our [], so we need to use [ and ] instead.
16949   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16950   if test "x$has_forbidden_chars" != x; then
16951     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16952     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16953   fi
16954 
16955     # Output is in $new_path
16956 
16957   windows_path="$new_path"
16958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16959     unix_path=`$CYGPATH -u "$windows_path"`
16960     new_path="$unix_path"
16961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16962     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16963     new_path="$unix_path"
16964   fi
16965 
16966     # remove trailing .exe if any
16967     new_path="${new_path/%.exe/}"
16968 
16969     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16970     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16971   fi
16972 
16973     else
16974       # We're on a unix platform. Hooray! :)
16975       # First separate the path from the arguments. This will split at the first
16976       # space.
16977       complete="$FOUND_MAKE"
16978       path="${complete%% *}"
16979       tmp="$complete EOL"
16980       arguments="${tmp#* }"
16981 
16982       # Cannot rely on the command "which" here since it doesn't always work.
16983       is_absolute_path=`$ECHO "$path" | $GREP ^/`
16984       if test -z "$is_absolute_path"; then
16985         # Path to executable is not absolute. Find it.
16986         IFS_save="$IFS"
16987         IFS=:
16988         for p in $PATH; do
16989           if test -f "$p/$path" && test -x "$p/$path"; then
16990             new_path="$p/$path"
16991             break
16992           fi
16993         done
16994         IFS="$IFS_save"
16995       else
16996         # This is an absolute path, we can use it without further modifications.
16997         new_path="$path"
16998       fi
16999 
17000       if test "x$new_path" = x; then
17001         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17002 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17003         has_space=`$ECHO "$complete" | $GREP " "`
17004         if test "x$has_space" != x; then
17005           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17006 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17007         fi
17008         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17009       fi
17010     fi
17011 
17012     # Now join together the path and the arguments once again
17013     if test "x$arguments" != xEOL; then
17014       new_complete="$new_path ${arguments% *}"
17015     else
17016       new_complete="$new_path"
17017     fi
17018 
17019     if test "x$complete" != "x$new_complete"; then
17020       FOUND_MAKE="$new_complete"
17021       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17022 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17023     fi
17024   fi
17025 
17026         fi
17027       fi
17028     fi
17029   fi
17030 
17031 
17032     if test "x$FOUND_MAKE" = x; then
17033       for ac_prog in make
17034 do
17035   # Extract the first word of "$ac_prog", so it can be a program name with args.
17036 set dummy $ac_prog; ac_word=$2
17037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17038 $as_echo_n "checking for $ac_word... " >&6; }
17039 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17040   $as_echo_n "(cached) " >&6
17041 else
17042   case $CHECK_MAKE in
17043   [\\/]* | ?:[\\/]*)
17044   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17045   ;;
17046   *)
17047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17048 for as_dir in $PATH
17049 do
17050   IFS=$as_save_IFS
17051   test -z "$as_dir" && as_dir=.
17052     for ac_exec_ext in '' $ac_executable_extensions; do
17053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17054     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17056     break 2
17057   fi
17058 done
17059   done
17060 IFS=$as_save_IFS
17061 
17062   ;;
17063 esac
17064 fi
17065 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17066 if test -n "$CHECK_MAKE"; then
17067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17068 $as_echo "$CHECK_MAKE" >&6; }
17069 else
17070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17071 $as_echo "no" >&6; }
17072 fi
17073 
17074 
17075   test -n "$CHECK_MAKE" && break
17076 done
17077 
17078 
17079   MAKE_CANDIDATE=""$CHECK_MAKE""
17080   DESCRIPTION="make in PATH"
17081 
17082   # On Cygwin, we require a newer version of make than on other platforms
17083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17084     MAKE_VERSION_EXPR="-e 4\."
17085     MAKE_REQUIRED_VERSION="4.0"
17086    else
17087     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17088     MAKE_REQUIRED_VERSION="3.81"
17089   fi
17090 
17091   if test "x$MAKE_CANDIDATE" != x; then
17092     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17093 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17094     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17095     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17096     if test "x$IS_GNU_MAKE" = x; then
17097       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17098 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17099     else
17100       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17101       if test "x$IS_MODERN_MAKE" = x; then
17102         { $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
17103 $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;}
17104       else
17105         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17106           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17107             MAKE_EXPECTED_ENV='cygwin'
17108           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17109             MAKE_EXPECTED_ENV='msys'
17110           else
17111             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17112           fi
17113           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17114           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17115         else
17116           # Not relevant for non-Windows
17117           IS_MAKE_CORRECT_ENV=true
17118         fi
17119         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17120           { $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
17121 $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;}
17122         else
17123           FOUND_MAKE=$MAKE_CANDIDATE
17124 
17125   # Only process if variable expands to non-empty
17126 
17127   if test "x$FOUND_MAKE" != x; then
17128     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17129 
17130   # First separate the path from the arguments. This will split at the first
17131   # space.
17132   complete="$FOUND_MAKE"
17133   path="${complete%% *}"
17134   tmp="$complete EOL"
17135   arguments="${tmp#* }"
17136 
17137   # Input might be given as Windows format, start by converting to
17138   # unix format.
17139   new_path=`$CYGPATH -u "$path"`
17140 
17141   # Now try to locate executable using which
17142   new_path=`$WHICH "$new_path" 2> /dev/null`
17143   # bat and cmd files are not always considered executable in cygwin causing which
17144   # to not find them
17145   if test "x$new_path" = x \
17146       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17147       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17148     new_path=`$CYGPATH -u "$path"`
17149   fi
17150   if test "x$new_path" = x; then
17151     # Oops. Which didn't find the executable.
17152     # The splitting of arguments from the executable at a space might have been incorrect,
17153     # since paths with space are more likely in Windows. Give it another try with the whole
17154     # argument.
17155     path="$complete"
17156     arguments="EOL"
17157     new_path=`$CYGPATH -u "$path"`
17158     new_path=`$WHICH "$new_path" 2> /dev/null`
17159     # bat and cmd files are not always considered executable in cygwin causing which
17160     # to not find them
17161     if test "x$new_path" = x \
17162         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17163         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17164       new_path=`$CYGPATH -u "$path"`
17165     fi
17166     if test "x$new_path" = x; then
17167       # It's still not found. Now this is an unrecoverable error.
17168       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17169 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17170       has_space=`$ECHO "$complete" | $GREP " "`
17171       if test "x$has_space" != x; then
17172         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17173 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17174       fi
17175       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17176     fi
17177   fi
17178 
17179   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17180   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17181   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17182   # "foo.exe" is OK but "foo" is an error.
17183   #
17184   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17185   # It is also a way to make sure we got the proper file name for the real test later on.
17186   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17187   if test "x$test_shortpath" = x; then
17188     # Short path failed, file does not exist as specified.
17189     # Try adding .exe or .cmd
17190     if test -f "${new_path}.exe"; then
17191       input_to_shortpath="${new_path}.exe"
17192     elif test -f "${new_path}.cmd"; then
17193       input_to_shortpath="${new_path}.cmd"
17194     else
17195       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17196 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17197       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17198 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17199       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17200     fi
17201   else
17202     input_to_shortpath="$new_path"
17203   fi
17204 
17205   # Call helper function which possibly converts this using DOS-style short mode.
17206   # If so, the updated path is stored in $new_path.
17207   new_path="$input_to_shortpath"
17208 
17209   input_path="$input_to_shortpath"
17210   # Check if we need to convert this using DOS-style short mode. If the path
17211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17212   # take no chances and rewrite it.
17213   # Note: m4 eats our [], so we need to use [ and ] instead.
17214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17215   if test "x$has_forbidden_chars" != x; then
17216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17217     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17218     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17219     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17220       # Going to short mode and back again did indeed matter. Since short mode is
17221       # case insensitive, let's make it lowercase to improve readability.
17222       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17223       # Now convert it back to Unix-style (cygpath)
17224       input_path=`$CYGPATH -u "$shortmode_path"`
17225       new_path="$input_path"
17226     fi
17227   fi
17228 
17229   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17230   if test "x$test_cygdrive_prefix" = x; then
17231     # As a simple fix, exclude /usr/bin since it's not a real path.
17232     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17233       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17234       # a path prefixed by /cygdrive for fixpath to work.
17235       new_path="$CYGWIN_ROOT_PATH$input_path"
17236     fi
17237   fi
17238 
17239   # remove trailing .exe if any
17240   new_path="${new_path/%.exe/}"
17241 
17242     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17243 
17244   # First separate the path from the arguments. This will split at the first
17245   # space.
17246   complete="$FOUND_MAKE"
17247   path="${complete%% *}"
17248   tmp="$complete EOL"
17249   arguments="${tmp#* }"
17250 
17251   # Input might be given as Windows format, start by converting to
17252   # unix format.
17253   new_path="$path"
17254 
17255   windows_path="$new_path"
17256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17257     unix_path=`$CYGPATH -u "$windows_path"`
17258     new_path="$unix_path"
17259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17261     new_path="$unix_path"
17262   fi
17263 
17264 
17265   # Now try to locate executable using which
17266   new_path=`$WHICH "$new_path" 2> /dev/null`
17267 
17268   if test "x$new_path" = x; then
17269     # Oops. Which didn't find the executable.
17270     # The splitting of arguments from the executable at a space might have been incorrect,
17271     # since paths with space are more likely in Windows. Give it another try with the whole
17272     # argument.
17273     path="$complete"
17274     arguments="EOL"
17275     new_path="$path"
17276 
17277   windows_path="$new_path"
17278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17279     unix_path=`$CYGPATH -u "$windows_path"`
17280     new_path="$unix_path"
17281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17282     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17283     new_path="$unix_path"
17284   fi
17285 
17286 
17287     new_path=`$WHICH "$new_path" 2> /dev/null`
17288     # bat and cmd files are not always considered executable in MSYS causing which
17289     # to not find them
17290     if test "x$new_path" = x \
17291         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17292         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17293       new_path="$path"
17294 
17295   windows_path="$new_path"
17296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17297     unix_path=`$CYGPATH -u "$windows_path"`
17298     new_path="$unix_path"
17299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17301     new_path="$unix_path"
17302   fi
17303 
17304     fi
17305 
17306     if test "x$new_path" = x; then
17307       # It's still not found. Now this is an unrecoverable error.
17308       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17309 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17310       has_space=`$ECHO "$complete" | $GREP " "`
17311       if test "x$has_space" != x; then
17312         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17313 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17314       fi
17315       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17316     fi
17317   fi
17318 
17319   # Now new_path has a complete unix path to the binary
17320   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17321     # Keep paths in /bin as-is, but remove trailing .exe if any
17322     new_path="${new_path/%.exe/}"
17323     # Do not save /bin paths to all_fixpath_prefixes!
17324   else
17325     # Not in mixed or Windows style, start by that.
17326     new_path=`cmd //c echo $new_path`
17327 
17328   input_path="$new_path"
17329   # Check if we need to convert this using DOS-style short mode. If the path
17330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17331   # take no chances and rewrite it.
17332   # Note: m4 eats our [], so we need to use [ and ] instead.
17333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17334   if test "x$has_forbidden_chars" != x; then
17335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17336     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17337   fi
17338 
17339     # Output is in $new_path
17340 
17341   windows_path="$new_path"
17342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17343     unix_path=`$CYGPATH -u "$windows_path"`
17344     new_path="$unix_path"
17345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17346     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17347     new_path="$unix_path"
17348   fi
17349 
17350     # remove trailing .exe if any
17351     new_path="${new_path/%.exe/}"
17352 
17353     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17354     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17355   fi
17356 
17357     else
17358       # We're on a unix platform. Hooray! :)
17359       # First separate the path from the arguments. This will split at the first
17360       # space.
17361       complete="$FOUND_MAKE"
17362       path="${complete%% *}"
17363       tmp="$complete EOL"
17364       arguments="${tmp#* }"
17365 
17366       # Cannot rely on the command "which" here since it doesn't always work.
17367       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17368       if test -z "$is_absolute_path"; then
17369         # Path to executable is not absolute. Find it.
17370         IFS_save="$IFS"
17371         IFS=:
17372         for p in $PATH; do
17373           if test -f "$p/$path" && test -x "$p/$path"; then
17374             new_path="$p/$path"
17375             break
17376           fi
17377         done
17378         IFS="$IFS_save"
17379       else
17380         # This is an absolute path, we can use it without further modifications.
17381         new_path="$path"
17382       fi
17383 
17384       if test "x$new_path" = x; then
17385         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17386 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17387         has_space=`$ECHO "$complete" | $GREP " "`
17388         if test "x$has_space" != x; then
17389           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17390 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17391         fi
17392         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17393       fi
17394     fi
17395 
17396     # Now join together the path and the arguments once again
17397     if test "x$arguments" != xEOL; then
17398       new_complete="$new_path ${arguments% *}"
17399     else
17400       new_complete="$new_path"
17401     fi
17402 
17403     if test "x$complete" != "x$new_complete"; then
17404       FOUND_MAKE="$new_complete"
17405       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17406 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17407     fi
17408   fi
17409 
17410         fi
17411       fi
17412     fi
17413   fi
17414 
17415     fi
17416 
17417     if test "x$FOUND_MAKE" = x; then
17418       if test "x$TOOLCHAIN_PATH" != x; then
17419         # We have a toolchain path, check that as well before giving up.
17420         OLD_PATH=$PATH
17421         PATH=$TOOLCHAIN_PATH:$PATH
17422         for ac_prog in gmake
17423 do
17424   # Extract the first word of "$ac_prog", so it can be a program name with args.
17425 set dummy $ac_prog; ac_word=$2
17426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17427 $as_echo_n "checking for $ac_word... " >&6; }
17428 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17429   $as_echo_n "(cached) " >&6
17430 else
17431   case $CHECK_TOOLSDIR_GMAKE in
17432   [\\/]* | ?:[\\/]*)
17433   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17434   ;;
17435   *)
17436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17437 for as_dir in $PATH
17438 do
17439   IFS=$as_save_IFS
17440   test -z "$as_dir" && as_dir=.
17441     for ac_exec_ext in '' $ac_executable_extensions; do
17442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17443     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17445     break 2
17446   fi
17447 done
17448   done
17449 IFS=$as_save_IFS
17450 
17451   ;;
17452 esac
17453 fi
17454 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17455 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17457 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17458 else
17459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17460 $as_echo "no" >&6; }
17461 fi
17462 
17463 
17464   test -n "$CHECK_TOOLSDIR_GMAKE" && break
17465 done
17466 
17467 
17468   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17469   DESCRIPTION="gmake in tools-dir"
17470 
17471   # On Cygwin, we require a newer version of make than on other platforms
17472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17473     MAKE_VERSION_EXPR="-e 4\."
17474     MAKE_REQUIRED_VERSION="4.0"
17475    else
17476     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17477     MAKE_REQUIRED_VERSION="3.81"
17478   fi
17479 
17480   if test "x$MAKE_CANDIDATE" != x; then
17481     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17482 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17483     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17484     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17485     if test "x$IS_GNU_MAKE" = x; then
17486       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17487 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17488     else
17489       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17490       if test "x$IS_MODERN_MAKE" = x; then
17491         { $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
17492 $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;}
17493       else
17494         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17495           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17496             MAKE_EXPECTED_ENV='cygwin'
17497           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17498             MAKE_EXPECTED_ENV='msys'
17499           else
17500             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17501           fi
17502           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17503           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17504         else
17505           # Not relevant for non-Windows
17506           IS_MAKE_CORRECT_ENV=true
17507         fi
17508         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17509           { $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
17510 $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;}
17511         else
17512           FOUND_MAKE=$MAKE_CANDIDATE
17513 
17514   # Only process if variable expands to non-empty
17515 
17516   if test "x$FOUND_MAKE" != x; then
17517     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17518 
17519   # First separate the path from the arguments. This will split at the first
17520   # space.
17521   complete="$FOUND_MAKE"
17522   path="${complete%% *}"
17523   tmp="$complete EOL"
17524   arguments="${tmp#* }"
17525 
17526   # Input might be given as Windows format, start by converting to
17527   # unix format.
17528   new_path=`$CYGPATH -u "$path"`
17529 
17530   # Now try to locate executable using which
17531   new_path=`$WHICH "$new_path" 2> /dev/null`
17532   # bat and cmd files are not always considered executable in cygwin causing which
17533   # to not find them
17534   if test "x$new_path" = x \
17535       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17536       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17537     new_path=`$CYGPATH -u "$path"`
17538   fi
17539   if test "x$new_path" = x; then
17540     # Oops. Which didn't find the executable.
17541     # The splitting of arguments from the executable at a space might have been incorrect,
17542     # since paths with space are more likely in Windows. Give it another try with the whole
17543     # argument.
17544     path="$complete"
17545     arguments="EOL"
17546     new_path=`$CYGPATH -u "$path"`
17547     new_path=`$WHICH "$new_path" 2> /dev/null`
17548     # bat and cmd files are not always considered executable in cygwin causing which
17549     # to not find them
17550     if test "x$new_path" = x \
17551         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17552         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17553       new_path=`$CYGPATH -u "$path"`
17554     fi
17555     if test "x$new_path" = x; then
17556       # It's still not found. Now this is an unrecoverable error.
17557       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17558 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17559       has_space=`$ECHO "$complete" | $GREP " "`
17560       if test "x$has_space" != x; then
17561         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17562 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17563       fi
17564       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17565     fi
17566   fi
17567 
17568   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17569   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17570   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17571   # "foo.exe" is OK but "foo" is an error.
17572   #
17573   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17574   # It is also a way to make sure we got the proper file name for the real test later on.
17575   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17576   if test "x$test_shortpath" = x; then
17577     # Short path failed, file does not exist as specified.
17578     # Try adding .exe or .cmd
17579     if test -f "${new_path}.exe"; then
17580       input_to_shortpath="${new_path}.exe"
17581     elif test -f "${new_path}.cmd"; then
17582       input_to_shortpath="${new_path}.cmd"
17583     else
17584       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17585 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17586       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17587 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17588       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17589     fi
17590   else
17591     input_to_shortpath="$new_path"
17592   fi
17593 
17594   # Call helper function which possibly converts this using DOS-style short mode.
17595   # If so, the updated path is stored in $new_path.
17596   new_path="$input_to_shortpath"
17597 
17598   input_path="$input_to_shortpath"
17599   # Check if we need to convert this using DOS-style short mode. If the path
17600   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17601   # take no chances and rewrite it.
17602   # Note: m4 eats our [], so we need to use [ and ] instead.
17603   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17604   if test "x$has_forbidden_chars" != x; then
17605     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17606     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17607     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17608     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17609       # Going to short mode and back again did indeed matter. Since short mode is
17610       # case insensitive, let's make it lowercase to improve readability.
17611       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17612       # Now convert it back to Unix-style (cygpath)
17613       input_path=`$CYGPATH -u "$shortmode_path"`
17614       new_path="$input_path"
17615     fi
17616   fi
17617 
17618   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17619   if test "x$test_cygdrive_prefix" = x; then
17620     # As a simple fix, exclude /usr/bin since it's not a real path.
17621     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17622       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17623       # a path prefixed by /cygdrive for fixpath to work.
17624       new_path="$CYGWIN_ROOT_PATH$input_path"
17625     fi
17626   fi
17627 
17628   # remove trailing .exe if any
17629   new_path="${new_path/%.exe/}"
17630 
17631     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17632 
17633   # First separate the path from the arguments. This will split at the first
17634   # space.
17635   complete="$FOUND_MAKE"
17636   path="${complete%% *}"
17637   tmp="$complete EOL"
17638   arguments="${tmp#* }"
17639 
17640   # Input might be given as Windows format, start by converting to
17641   # unix format.
17642   new_path="$path"
17643 
17644   windows_path="$new_path"
17645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17646     unix_path=`$CYGPATH -u "$windows_path"`
17647     new_path="$unix_path"
17648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17650     new_path="$unix_path"
17651   fi
17652 
17653 
17654   # Now try to locate executable using which
17655   new_path=`$WHICH "$new_path" 2> /dev/null`
17656 
17657   if test "x$new_path" = x; then
17658     # Oops. Which didn't find the executable.
17659     # The splitting of arguments from the executable at a space might have been incorrect,
17660     # since paths with space are more likely in Windows. Give it another try with the whole
17661     # argument.
17662     path="$complete"
17663     arguments="EOL"
17664     new_path="$path"
17665 
17666   windows_path="$new_path"
17667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17668     unix_path=`$CYGPATH -u "$windows_path"`
17669     new_path="$unix_path"
17670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17671     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17672     new_path="$unix_path"
17673   fi
17674 
17675 
17676     new_path=`$WHICH "$new_path" 2> /dev/null`
17677     # bat and cmd files are not always considered executable in MSYS causing which
17678     # to not find them
17679     if test "x$new_path" = x \
17680         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17681         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17682       new_path="$path"
17683 
17684   windows_path="$new_path"
17685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17686     unix_path=`$CYGPATH -u "$windows_path"`
17687     new_path="$unix_path"
17688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17690     new_path="$unix_path"
17691   fi
17692 
17693     fi
17694 
17695     if test "x$new_path" = x; then
17696       # It's still not found. Now this is an unrecoverable error.
17697       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17698 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17699       has_space=`$ECHO "$complete" | $GREP " "`
17700       if test "x$has_space" != x; then
17701         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17702 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17703       fi
17704       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17705     fi
17706   fi
17707 
17708   # Now new_path has a complete unix path to the binary
17709   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17710     # Keep paths in /bin as-is, but remove trailing .exe if any
17711     new_path="${new_path/%.exe/}"
17712     # Do not save /bin paths to all_fixpath_prefixes!
17713   else
17714     # Not in mixed or Windows style, start by that.
17715     new_path=`cmd //c echo $new_path`
17716 
17717   input_path="$new_path"
17718   # Check if we need to convert this using DOS-style short mode. If the path
17719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17720   # take no chances and rewrite it.
17721   # Note: m4 eats our [], so we need to use [ and ] instead.
17722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17723   if test "x$has_forbidden_chars" != x; then
17724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17725     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17726   fi
17727 
17728     # Output is in $new_path
17729 
17730   windows_path="$new_path"
17731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17732     unix_path=`$CYGPATH -u "$windows_path"`
17733     new_path="$unix_path"
17734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17735     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17736     new_path="$unix_path"
17737   fi
17738 
17739     # remove trailing .exe if any
17740     new_path="${new_path/%.exe/}"
17741 
17742     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17743     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17744   fi
17745 
17746     else
17747       # We're on a unix platform. Hooray! :)
17748       # First separate the path from the arguments. This will split at the first
17749       # space.
17750       complete="$FOUND_MAKE"
17751       path="${complete%% *}"
17752       tmp="$complete EOL"
17753       arguments="${tmp#* }"
17754 
17755       # Cannot rely on the command "which" here since it doesn't always work.
17756       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17757       if test -z "$is_absolute_path"; then
17758         # Path to executable is not absolute. Find it.
17759         IFS_save="$IFS"
17760         IFS=:
17761         for p in $PATH; do
17762           if test -f "$p/$path" && test -x "$p/$path"; then
17763             new_path="$p/$path"
17764             break
17765           fi
17766         done
17767         IFS="$IFS_save"
17768       else
17769         # This is an absolute path, we can use it without further modifications.
17770         new_path="$path"
17771       fi
17772 
17773       if test "x$new_path" = x; then
17774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17775 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17776         has_space=`$ECHO "$complete" | $GREP " "`
17777         if test "x$has_space" != x; then
17778           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17779 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17780         fi
17781         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17782       fi
17783     fi
17784 
17785     # Now join together the path and the arguments once again
17786     if test "x$arguments" != xEOL; then
17787       new_complete="$new_path ${arguments% *}"
17788     else
17789       new_complete="$new_path"
17790     fi
17791 
17792     if test "x$complete" != "x$new_complete"; then
17793       FOUND_MAKE="$new_complete"
17794       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17795 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17796     fi
17797   fi
17798 
17799         fi
17800       fi
17801     fi
17802   fi
17803 
17804         if test "x$FOUND_MAKE" = x; then
17805           for ac_prog in make
17806 do
17807   # Extract the first word of "$ac_prog", so it can be a program name with args.
17808 set dummy $ac_prog; ac_word=$2
17809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17810 $as_echo_n "checking for $ac_word... " >&6; }
17811 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17812   $as_echo_n "(cached) " >&6
17813 else
17814   case $CHECK_TOOLSDIR_MAKE in
17815   [\\/]* | ?:[\\/]*)
17816   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17817   ;;
17818   *)
17819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17820 for as_dir in $PATH
17821 do
17822   IFS=$as_save_IFS
17823   test -z "$as_dir" && as_dir=.
17824     for ac_exec_ext in '' $ac_executable_extensions; do
17825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17826     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17828     break 2
17829   fi
17830 done
17831   done
17832 IFS=$as_save_IFS
17833 
17834   ;;
17835 esac
17836 fi
17837 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17838 if test -n "$CHECK_TOOLSDIR_MAKE"; then
17839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17840 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17841 else
17842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17843 $as_echo "no" >&6; }
17844 fi
17845 
17846 
17847   test -n "$CHECK_TOOLSDIR_MAKE" && break
17848 done
17849 
17850 
17851   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17852   DESCRIPTION="make in tools-dir"
17853 
17854   # On Cygwin, we require a newer version of make than on other platforms
17855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17856     MAKE_VERSION_EXPR="-e 4\."
17857     MAKE_REQUIRED_VERSION="4.0"
17858    else
17859     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17860     MAKE_REQUIRED_VERSION="3.81"
17861   fi
17862 
17863   if test "x$MAKE_CANDIDATE" != x; then
17864     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17865 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17866     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17867     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17868     if test "x$IS_GNU_MAKE" = x; then
17869       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17870 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17871     else
17872       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17873       if test "x$IS_MODERN_MAKE" = x; then
17874         { $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
17875 $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;}
17876       else
17877         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17878           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17879             MAKE_EXPECTED_ENV='cygwin'
17880           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17881             MAKE_EXPECTED_ENV='msys'
17882           else
17883             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17884           fi
17885           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17886           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17887         else
17888           # Not relevant for non-Windows
17889           IS_MAKE_CORRECT_ENV=true
17890         fi
17891         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17892           { $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
17893 $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;}
17894         else
17895           FOUND_MAKE=$MAKE_CANDIDATE
17896 
17897   # Only process if variable expands to non-empty
17898 
17899   if test "x$FOUND_MAKE" != x; then
17900     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17901 
17902   # First separate the path from the arguments. This will split at the first
17903   # space.
17904   complete="$FOUND_MAKE"
17905   path="${complete%% *}"
17906   tmp="$complete EOL"
17907   arguments="${tmp#* }"
17908 
17909   # Input might be given as Windows format, start by converting to
17910   # unix format.
17911   new_path=`$CYGPATH -u "$path"`
17912 
17913   # Now try to locate executable using which
17914   new_path=`$WHICH "$new_path" 2> /dev/null`
17915   # bat and cmd files are not always considered executable in cygwin causing which
17916   # to not find them
17917   if test "x$new_path" = x \
17918       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17919       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17920     new_path=`$CYGPATH -u "$path"`
17921   fi
17922   if test "x$new_path" = x; then
17923     # Oops. Which didn't find the executable.
17924     # The splitting of arguments from the executable at a space might have been incorrect,
17925     # since paths with space are more likely in Windows. Give it another try with the whole
17926     # argument.
17927     path="$complete"
17928     arguments="EOL"
17929     new_path=`$CYGPATH -u "$path"`
17930     new_path=`$WHICH "$new_path" 2> /dev/null`
17931     # bat and cmd files are not always considered executable in cygwin causing which
17932     # to not find them
17933     if test "x$new_path" = x \
17934         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17935         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17936       new_path=`$CYGPATH -u "$path"`
17937     fi
17938     if test "x$new_path" = x; then
17939       # It's still not found. Now this is an unrecoverable error.
17940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17941 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17942       has_space=`$ECHO "$complete" | $GREP " "`
17943       if test "x$has_space" != x; then
17944         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17945 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17946       fi
17947       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17948     fi
17949   fi
17950 
17951   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17952   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17953   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17954   # "foo.exe" is OK but "foo" is an error.
17955   #
17956   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17957   # It is also a way to make sure we got the proper file name for the real test later on.
17958   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17959   if test "x$test_shortpath" = x; then
17960     # Short path failed, file does not exist as specified.
17961     # Try adding .exe or .cmd
17962     if test -f "${new_path}.exe"; then
17963       input_to_shortpath="${new_path}.exe"
17964     elif test -f "${new_path}.cmd"; then
17965       input_to_shortpath="${new_path}.cmd"
17966     else
17967       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17968 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17969       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17970 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17971       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17972     fi
17973   else
17974     input_to_shortpath="$new_path"
17975   fi
17976 
17977   # Call helper function which possibly converts this using DOS-style short mode.
17978   # If so, the updated path is stored in $new_path.
17979   new_path="$input_to_shortpath"
17980 
17981   input_path="$input_to_shortpath"
17982   # Check if we need to convert this using DOS-style short mode. If the path
17983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17984   # take no chances and rewrite it.
17985   # Note: m4 eats our [], so we need to use [ and ] instead.
17986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17987   if test "x$has_forbidden_chars" != x; then
17988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17989     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17990     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17991     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17992       # Going to short mode and back again did indeed matter. Since short mode is
17993       # case insensitive, let's make it lowercase to improve readability.
17994       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17995       # Now convert it back to Unix-style (cygpath)
17996       input_path=`$CYGPATH -u "$shortmode_path"`
17997       new_path="$input_path"
17998     fi
17999   fi
18000 
18001   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18002   if test "x$test_cygdrive_prefix" = x; then
18003     # As a simple fix, exclude /usr/bin since it's not a real path.
18004     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18005       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18006       # a path prefixed by /cygdrive for fixpath to work.
18007       new_path="$CYGWIN_ROOT_PATH$input_path"
18008     fi
18009   fi
18010 
18011   # remove trailing .exe if any
18012   new_path="${new_path/%.exe/}"
18013 
18014     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18015 
18016   # First separate the path from the arguments. This will split at the first
18017   # space.
18018   complete="$FOUND_MAKE"
18019   path="${complete%% *}"
18020   tmp="$complete EOL"
18021   arguments="${tmp#* }"
18022 
18023   # Input might be given as Windows format, start by converting to
18024   # unix format.
18025   new_path="$path"
18026 
18027   windows_path="$new_path"
18028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18029     unix_path=`$CYGPATH -u "$windows_path"`
18030     new_path="$unix_path"
18031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18033     new_path="$unix_path"
18034   fi
18035 
18036 
18037   # Now try to locate executable using which
18038   new_path=`$WHICH "$new_path" 2> /dev/null`
18039 
18040   if test "x$new_path" = x; then
18041     # Oops. Which didn't find the executable.
18042     # The splitting of arguments from the executable at a space might have been incorrect,
18043     # since paths with space are more likely in Windows. Give it another try with the whole
18044     # argument.
18045     path="$complete"
18046     arguments="EOL"
18047     new_path="$path"
18048 
18049   windows_path="$new_path"
18050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18051     unix_path=`$CYGPATH -u "$windows_path"`
18052     new_path="$unix_path"
18053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18054     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18055     new_path="$unix_path"
18056   fi
18057 
18058 
18059     new_path=`$WHICH "$new_path" 2> /dev/null`
18060     # bat and cmd files are not always considered executable in MSYS causing which
18061     # to not find them
18062     if test "x$new_path" = x \
18063         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18064         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18065       new_path="$path"
18066 
18067   windows_path="$new_path"
18068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18069     unix_path=`$CYGPATH -u "$windows_path"`
18070     new_path="$unix_path"
18071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18073     new_path="$unix_path"
18074   fi
18075 
18076     fi
18077 
18078     if test "x$new_path" = x; then
18079       # It's still not found. Now this is an unrecoverable error.
18080       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18081 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18082       has_space=`$ECHO "$complete" | $GREP " "`
18083       if test "x$has_space" != x; then
18084         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18085 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18086       fi
18087       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18088     fi
18089   fi
18090 
18091   # Now new_path has a complete unix path to the binary
18092   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18093     # Keep paths in /bin as-is, but remove trailing .exe if any
18094     new_path="${new_path/%.exe/}"
18095     # Do not save /bin paths to all_fixpath_prefixes!
18096   else
18097     # Not in mixed or Windows style, start by that.
18098     new_path=`cmd //c echo $new_path`
18099 
18100   input_path="$new_path"
18101   # Check if we need to convert this using DOS-style short mode. If the path
18102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18103   # take no chances and rewrite it.
18104   # Note: m4 eats our [], so we need to use [ and ] instead.
18105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18106   if test "x$has_forbidden_chars" != x; then
18107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18108     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18109   fi
18110 
18111     # Output is in $new_path
18112 
18113   windows_path="$new_path"
18114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18115     unix_path=`$CYGPATH -u "$windows_path"`
18116     new_path="$unix_path"
18117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18119     new_path="$unix_path"
18120   fi
18121 
18122     # remove trailing .exe if any
18123     new_path="${new_path/%.exe/}"
18124 
18125     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18126     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18127   fi
18128 
18129     else
18130       # We're on a unix platform. Hooray! :)
18131       # First separate the path from the arguments. This will split at the first
18132       # space.
18133       complete="$FOUND_MAKE"
18134       path="${complete%% *}"
18135       tmp="$complete EOL"
18136       arguments="${tmp#* }"
18137 
18138       # Cannot rely on the command "which" here since it doesn't always work.
18139       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18140       if test -z "$is_absolute_path"; then
18141         # Path to executable is not absolute. Find it.
18142         IFS_save="$IFS"
18143         IFS=:
18144         for p in $PATH; do
18145           if test -f "$p/$path" && test -x "$p/$path"; then
18146             new_path="$p/$path"
18147             break
18148           fi
18149         done
18150         IFS="$IFS_save"
18151       else
18152         # This is an absolute path, we can use it without further modifications.
18153         new_path="$path"
18154       fi
18155 
18156       if test "x$new_path" = x; then
18157         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18158 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18159         has_space=`$ECHO "$complete" | $GREP " "`
18160         if test "x$has_space" != x; then
18161           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18162 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18163         fi
18164         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18165       fi
18166     fi
18167 
18168     # Now join together the path and the arguments once again
18169     if test "x$arguments" != xEOL; then
18170       new_complete="$new_path ${arguments% *}"
18171     else
18172       new_complete="$new_path"
18173     fi
18174 
18175     if test "x$complete" != "x$new_complete"; then
18176       FOUND_MAKE="$new_complete"
18177       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18178 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18179     fi
18180   fi
18181 
18182         fi
18183       fi
18184     fi
18185   fi
18186 
18187         fi
18188         PATH=$OLD_PATH
18189       fi
18190     fi
18191 
18192     if test "x$FOUND_MAKE" = x; then
18193       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
18194     fi
18195 
18196   else
18197     # The variable is set, but is it from the command line or the environment?
18198 
18199     # Try to remove the string !MAKE! from our list.
18200     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18201     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18202       # If it failed, the variable was not from the command line. Ignore it,
18203       # but warn the user (except for BASH, which is always set by the calling BASH).
18204       if test "xMAKE" != xBASH; then
18205         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18206 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18207       fi
18208       # Try to locate tool using the code snippet
18209 
18210     # Try our hardest to locate a correct version of GNU make
18211     for ac_prog in gmake
18212 do
18213   # Extract the first word of "$ac_prog", so it can be a program name with args.
18214 set dummy $ac_prog; ac_word=$2
18215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18216 $as_echo_n "checking for $ac_word... " >&6; }
18217 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18218   $as_echo_n "(cached) " >&6
18219 else
18220   case $CHECK_GMAKE in
18221   [\\/]* | ?:[\\/]*)
18222   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18223   ;;
18224   *)
18225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18226 for as_dir in $PATH
18227 do
18228   IFS=$as_save_IFS
18229   test -z "$as_dir" && as_dir=.
18230     for ac_exec_ext in '' $ac_executable_extensions; do
18231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18232     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18234     break 2
18235   fi
18236 done
18237   done
18238 IFS=$as_save_IFS
18239 
18240   ;;
18241 esac
18242 fi
18243 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18244 if test -n "$CHECK_GMAKE"; then
18245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18246 $as_echo "$CHECK_GMAKE" >&6; }
18247 else
18248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18249 $as_echo "no" >&6; }
18250 fi
18251 
18252 
18253   test -n "$CHECK_GMAKE" && break
18254 done
18255 
18256 
18257   MAKE_CANDIDATE=""$CHECK_GMAKE""
18258   DESCRIPTION="gmake in PATH"
18259 
18260   # On Cygwin, we require a newer version of make than on other platforms
18261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18262     MAKE_VERSION_EXPR="-e 4\."
18263     MAKE_REQUIRED_VERSION="4.0"
18264    else
18265     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18266     MAKE_REQUIRED_VERSION="3.81"
18267   fi
18268 
18269   if test "x$MAKE_CANDIDATE" != x; then
18270     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18271 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18272     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18273     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18274     if test "x$IS_GNU_MAKE" = x; then
18275       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18276 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18277     else
18278       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18279       if test "x$IS_MODERN_MAKE" = x; then
18280         { $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
18281 $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;}
18282       else
18283         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18284           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18285             MAKE_EXPECTED_ENV='cygwin'
18286           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18287             MAKE_EXPECTED_ENV='msys'
18288           else
18289             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18290           fi
18291           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18292           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18293         else
18294           # Not relevant for non-Windows
18295           IS_MAKE_CORRECT_ENV=true
18296         fi
18297         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18298           { $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
18299 $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;}
18300         else
18301           FOUND_MAKE=$MAKE_CANDIDATE
18302 
18303   # Only process if variable expands to non-empty
18304 
18305   if test "x$FOUND_MAKE" != x; then
18306     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18307 
18308   # First separate the path from the arguments. This will split at the first
18309   # space.
18310   complete="$FOUND_MAKE"
18311   path="${complete%% *}"
18312   tmp="$complete EOL"
18313   arguments="${tmp#* }"
18314 
18315   # Input might be given as Windows format, start by converting to
18316   # unix format.
18317   new_path=`$CYGPATH -u "$path"`
18318 
18319   # Now try to locate executable using which
18320   new_path=`$WHICH "$new_path" 2> /dev/null`
18321   # bat and cmd files are not always considered executable in cygwin causing which
18322   # to not find them
18323   if test "x$new_path" = x \
18324       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18325       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18326     new_path=`$CYGPATH -u "$path"`
18327   fi
18328   if test "x$new_path" = x; then
18329     # Oops. Which didn't find the executable.
18330     # The splitting of arguments from the executable at a space might have been incorrect,
18331     # since paths with space are more likely in Windows. Give it another try with the whole
18332     # argument.
18333     path="$complete"
18334     arguments="EOL"
18335     new_path=`$CYGPATH -u "$path"`
18336     new_path=`$WHICH "$new_path" 2> /dev/null`
18337     # bat and cmd files are not always considered executable in cygwin causing which
18338     # to not find them
18339     if test "x$new_path" = x \
18340         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18341         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18342       new_path=`$CYGPATH -u "$path"`
18343     fi
18344     if test "x$new_path" = x; then
18345       # It's still not found. Now this is an unrecoverable error.
18346       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18347 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18348       has_space=`$ECHO "$complete" | $GREP " "`
18349       if test "x$has_space" != x; then
18350         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18351 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18352       fi
18353       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18354     fi
18355   fi
18356 
18357   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18358   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18359   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18360   # "foo.exe" is OK but "foo" is an error.
18361   #
18362   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18363   # It is also a way to make sure we got the proper file name for the real test later on.
18364   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18365   if test "x$test_shortpath" = x; then
18366     # Short path failed, file does not exist as specified.
18367     # Try adding .exe or .cmd
18368     if test -f "${new_path}.exe"; then
18369       input_to_shortpath="${new_path}.exe"
18370     elif test -f "${new_path}.cmd"; then
18371       input_to_shortpath="${new_path}.cmd"
18372     else
18373       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18374 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18375       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18376 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18377       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18378     fi
18379   else
18380     input_to_shortpath="$new_path"
18381   fi
18382 
18383   # Call helper function which possibly converts this using DOS-style short mode.
18384   # If so, the updated path is stored in $new_path.
18385   new_path="$input_to_shortpath"
18386 
18387   input_path="$input_to_shortpath"
18388   # Check if we need to convert this using DOS-style short mode. If the path
18389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18390   # take no chances and rewrite it.
18391   # Note: m4 eats our [], so we need to use [ and ] instead.
18392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18393   if test "x$has_forbidden_chars" != x; then
18394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18395     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18396     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18397     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18398       # Going to short mode and back again did indeed matter. Since short mode is
18399       # case insensitive, let's make it lowercase to improve readability.
18400       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18401       # Now convert it back to Unix-style (cygpath)
18402       input_path=`$CYGPATH -u "$shortmode_path"`
18403       new_path="$input_path"
18404     fi
18405   fi
18406 
18407   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18408   if test "x$test_cygdrive_prefix" = x; then
18409     # As a simple fix, exclude /usr/bin since it's not a real path.
18410     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18411       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18412       # a path prefixed by /cygdrive for fixpath to work.
18413       new_path="$CYGWIN_ROOT_PATH$input_path"
18414     fi
18415   fi
18416 
18417   # remove trailing .exe if any
18418   new_path="${new_path/%.exe/}"
18419 
18420     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18421 
18422   # First separate the path from the arguments. This will split at the first
18423   # space.
18424   complete="$FOUND_MAKE"
18425   path="${complete%% *}"
18426   tmp="$complete EOL"
18427   arguments="${tmp#* }"
18428 
18429   # Input might be given as Windows format, start by converting to
18430   # unix format.
18431   new_path="$path"
18432 
18433   windows_path="$new_path"
18434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18435     unix_path=`$CYGPATH -u "$windows_path"`
18436     new_path="$unix_path"
18437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18439     new_path="$unix_path"
18440   fi
18441 
18442 
18443   # Now try to locate executable using which
18444   new_path=`$WHICH "$new_path" 2> /dev/null`
18445 
18446   if test "x$new_path" = x; then
18447     # Oops. Which didn't find the executable.
18448     # The splitting of arguments from the executable at a space might have been incorrect,
18449     # since paths with space are more likely in Windows. Give it another try with the whole
18450     # argument.
18451     path="$complete"
18452     arguments="EOL"
18453     new_path="$path"
18454 
18455   windows_path="$new_path"
18456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18457     unix_path=`$CYGPATH -u "$windows_path"`
18458     new_path="$unix_path"
18459   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18460     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18461     new_path="$unix_path"
18462   fi
18463 
18464 
18465     new_path=`$WHICH "$new_path" 2> /dev/null`
18466     # bat and cmd files are not always considered executable in MSYS causing which
18467     # to not find them
18468     if test "x$new_path" = x \
18469         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18470         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18471       new_path="$path"
18472 
18473   windows_path="$new_path"
18474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18475     unix_path=`$CYGPATH -u "$windows_path"`
18476     new_path="$unix_path"
18477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18479     new_path="$unix_path"
18480   fi
18481 
18482     fi
18483 
18484     if test "x$new_path" = x; then
18485       # It's still not found. Now this is an unrecoverable error.
18486       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18487 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18488       has_space=`$ECHO "$complete" | $GREP " "`
18489       if test "x$has_space" != x; then
18490         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18491 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18492       fi
18493       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18494     fi
18495   fi
18496 
18497   # Now new_path has a complete unix path to the binary
18498   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18499     # Keep paths in /bin as-is, but remove trailing .exe if any
18500     new_path="${new_path/%.exe/}"
18501     # Do not save /bin paths to all_fixpath_prefixes!
18502   else
18503     # Not in mixed or Windows style, start by that.
18504     new_path=`cmd //c echo $new_path`
18505 
18506   input_path="$new_path"
18507   # Check if we need to convert this using DOS-style short mode. If the path
18508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18509   # take no chances and rewrite it.
18510   # Note: m4 eats our [], so we need to use [ and ] instead.
18511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18512   if test "x$has_forbidden_chars" != x; then
18513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18514     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18515   fi
18516 
18517     # Output is in $new_path
18518 
18519   windows_path="$new_path"
18520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18521     unix_path=`$CYGPATH -u "$windows_path"`
18522     new_path="$unix_path"
18523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18525     new_path="$unix_path"
18526   fi
18527 
18528     # remove trailing .exe if any
18529     new_path="${new_path/%.exe/}"
18530 
18531     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18532     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18533   fi
18534 
18535     else
18536       # We're on a unix platform. Hooray! :)
18537       # First separate the path from the arguments. This will split at the first
18538       # space.
18539       complete="$FOUND_MAKE"
18540       path="${complete%% *}"
18541       tmp="$complete EOL"
18542       arguments="${tmp#* }"
18543 
18544       # Cannot rely on the command "which" here since it doesn't always work.
18545       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18546       if test -z "$is_absolute_path"; then
18547         # Path to executable is not absolute. Find it.
18548         IFS_save="$IFS"
18549         IFS=:
18550         for p in $PATH; do
18551           if test -f "$p/$path" && test -x "$p/$path"; then
18552             new_path="$p/$path"
18553             break
18554           fi
18555         done
18556         IFS="$IFS_save"
18557       else
18558         # This is an absolute path, we can use it without further modifications.
18559         new_path="$path"
18560       fi
18561 
18562       if test "x$new_path" = x; then
18563         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18564 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18565         has_space=`$ECHO "$complete" | $GREP " "`
18566         if test "x$has_space" != x; then
18567           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18568 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18569         fi
18570         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18571       fi
18572     fi
18573 
18574     # Now join together the path and the arguments once again
18575     if test "x$arguments" != xEOL; then
18576       new_complete="$new_path ${arguments% *}"
18577     else
18578       new_complete="$new_path"
18579     fi
18580 
18581     if test "x$complete" != "x$new_complete"; then
18582       FOUND_MAKE="$new_complete"
18583       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18584 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18585     fi
18586   fi
18587 
18588         fi
18589       fi
18590     fi
18591   fi
18592 
18593 
18594     if test "x$FOUND_MAKE" = x; then
18595       for ac_prog in make
18596 do
18597   # Extract the first word of "$ac_prog", so it can be a program name with args.
18598 set dummy $ac_prog; ac_word=$2
18599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18600 $as_echo_n "checking for $ac_word... " >&6; }
18601 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18602   $as_echo_n "(cached) " >&6
18603 else
18604   case $CHECK_MAKE in
18605   [\\/]* | ?:[\\/]*)
18606   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18607   ;;
18608   *)
18609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18610 for as_dir in $PATH
18611 do
18612   IFS=$as_save_IFS
18613   test -z "$as_dir" && as_dir=.
18614     for ac_exec_ext in '' $ac_executable_extensions; do
18615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18616     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18618     break 2
18619   fi
18620 done
18621   done
18622 IFS=$as_save_IFS
18623 
18624   ;;
18625 esac
18626 fi
18627 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18628 if test -n "$CHECK_MAKE"; then
18629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18630 $as_echo "$CHECK_MAKE" >&6; }
18631 else
18632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18633 $as_echo "no" >&6; }
18634 fi
18635 
18636 
18637   test -n "$CHECK_MAKE" && break
18638 done
18639 
18640 
18641   MAKE_CANDIDATE=""$CHECK_MAKE""
18642   DESCRIPTION="make in PATH"
18643 
18644   # On Cygwin, we require a newer version of make than on other platforms
18645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18646     MAKE_VERSION_EXPR="-e 4\."
18647     MAKE_REQUIRED_VERSION="4.0"
18648    else
18649     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18650     MAKE_REQUIRED_VERSION="3.81"
18651   fi
18652 
18653   if test "x$MAKE_CANDIDATE" != x; then
18654     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18655 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18656     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18657     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18658     if test "x$IS_GNU_MAKE" = x; then
18659       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18660 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18661     else
18662       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18663       if test "x$IS_MODERN_MAKE" = x; then
18664         { $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
18665 $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;}
18666       else
18667         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18668           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18669             MAKE_EXPECTED_ENV='cygwin'
18670           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18671             MAKE_EXPECTED_ENV='msys'
18672           else
18673             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18674           fi
18675           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18676           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18677         else
18678           # Not relevant for non-Windows
18679           IS_MAKE_CORRECT_ENV=true
18680         fi
18681         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18682           { $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
18683 $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;}
18684         else
18685           FOUND_MAKE=$MAKE_CANDIDATE
18686 
18687   # Only process if variable expands to non-empty
18688 
18689   if test "x$FOUND_MAKE" != x; then
18690     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18691 
18692   # First separate the path from the arguments. This will split at the first
18693   # space.
18694   complete="$FOUND_MAKE"
18695   path="${complete%% *}"
18696   tmp="$complete EOL"
18697   arguments="${tmp#* }"
18698 
18699   # Input might be given as Windows format, start by converting to
18700   # unix format.
18701   new_path=`$CYGPATH -u "$path"`
18702 
18703   # Now try to locate executable using which
18704   new_path=`$WHICH "$new_path" 2> /dev/null`
18705   # bat and cmd files are not always considered executable in cygwin causing which
18706   # to not find them
18707   if test "x$new_path" = x \
18708       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18709       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18710     new_path=`$CYGPATH -u "$path"`
18711   fi
18712   if test "x$new_path" = x; then
18713     # Oops. Which didn't find the executable.
18714     # The splitting of arguments from the executable at a space might have been incorrect,
18715     # since paths with space are more likely in Windows. Give it another try with the whole
18716     # argument.
18717     path="$complete"
18718     arguments="EOL"
18719     new_path=`$CYGPATH -u "$path"`
18720     new_path=`$WHICH "$new_path" 2> /dev/null`
18721     # bat and cmd files are not always considered executable in cygwin causing which
18722     # to not find them
18723     if test "x$new_path" = x \
18724         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18725         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18726       new_path=`$CYGPATH -u "$path"`
18727     fi
18728     if test "x$new_path" = x; then
18729       # It's still not found. Now this is an unrecoverable error.
18730       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18731 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18732       has_space=`$ECHO "$complete" | $GREP " "`
18733       if test "x$has_space" != x; then
18734         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18735 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18736       fi
18737       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18738     fi
18739   fi
18740 
18741   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18742   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18743   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18744   # "foo.exe" is OK but "foo" is an error.
18745   #
18746   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18747   # It is also a way to make sure we got the proper file name for the real test later on.
18748   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18749   if test "x$test_shortpath" = x; then
18750     # Short path failed, file does not exist as specified.
18751     # Try adding .exe or .cmd
18752     if test -f "${new_path}.exe"; then
18753       input_to_shortpath="${new_path}.exe"
18754     elif test -f "${new_path}.cmd"; then
18755       input_to_shortpath="${new_path}.cmd"
18756     else
18757       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18758 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18759       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18760 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18761       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18762     fi
18763   else
18764     input_to_shortpath="$new_path"
18765   fi
18766 
18767   # Call helper function which possibly converts this using DOS-style short mode.
18768   # If so, the updated path is stored in $new_path.
18769   new_path="$input_to_shortpath"
18770 
18771   input_path="$input_to_shortpath"
18772   # Check if we need to convert this using DOS-style short mode. If the path
18773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18774   # take no chances and rewrite it.
18775   # Note: m4 eats our [], so we need to use [ and ] instead.
18776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18777   if test "x$has_forbidden_chars" != x; then
18778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18779     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18780     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18781     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18782       # Going to short mode and back again did indeed matter. Since short mode is
18783       # case insensitive, let's make it lowercase to improve readability.
18784       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18785       # Now convert it back to Unix-style (cygpath)
18786       input_path=`$CYGPATH -u "$shortmode_path"`
18787       new_path="$input_path"
18788     fi
18789   fi
18790 
18791   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18792   if test "x$test_cygdrive_prefix" = x; then
18793     # As a simple fix, exclude /usr/bin since it's not a real path.
18794     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18795       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18796       # a path prefixed by /cygdrive for fixpath to work.
18797       new_path="$CYGWIN_ROOT_PATH$input_path"
18798     fi
18799   fi
18800 
18801   # remove trailing .exe if any
18802   new_path="${new_path/%.exe/}"
18803 
18804     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18805 
18806   # First separate the path from the arguments. This will split at the first
18807   # space.
18808   complete="$FOUND_MAKE"
18809   path="${complete%% *}"
18810   tmp="$complete EOL"
18811   arguments="${tmp#* }"
18812 
18813   # Input might be given as Windows format, start by converting to
18814   # unix format.
18815   new_path="$path"
18816 
18817   windows_path="$new_path"
18818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18819     unix_path=`$CYGPATH -u "$windows_path"`
18820     new_path="$unix_path"
18821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18823     new_path="$unix_path"
18824   fi
18825 
18826 
18827   # Now try to locate executable using which
18828   new_path=`$WHICH "$new_path" 2> /dev/null`
18829 
18830   if test "x$new_path" = x; then
18831     # Oops. Which didn't find the executable.
18832     # The splitting of arguments from the executable at a space might have been incorrect,
18833     # since paths with space are more likely in Windows. Give it another try with the whole
18834     # argument.
18835     path="$complete"
18836     arguments="EOL"
18837     new_path="$path"
18838 
18839   windows_path="$new_path"
18840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18841     unix_path=`$CYGPATH -u "$windows_path"`
18842     new_path="$unix_path"
18843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18844     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18845     new_path="$unix_path"
18846   fi
18847 
18848 
18849     new_path=`$WHICH "$new_path" 2> /dev/null`
18850     # bat and cmd files are not always considered executable in MSYS causing which
18851     # to not find them
18852     if test "x$new_path" = x \
18853         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18854         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18855       new_path="$path"
18856 
18857   windows_path="$new_path"
18858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18859     unix_path=`$CYGPATH -u "$windows_path"`
18860     new_path="$unix_path"
18861   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18862     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18863     new_path="$unix_path"
18864   fi
18865 
18866     fi
18867 
18868     if test "x$new_path" = x; then
18869       # It's still not found. Now this is an unrecoverable error.
18870       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18871 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18872       has_space=`$ECHO "$complete" | $GREP " "`
18873       if test "x$has_space" != x; then
18874         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18875 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18876       fi
18877       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18878     fi
18879   fi
18880 
18881   # Now new_path has a complete unix path to the binary
18882   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18883     # Keep paths in /bin as-is, but remove trailing .exe if any
18884     new_path="${new_path/%.exe/}"
18885     # Do not save /bin paths to all_fixpath_prefixes!
18886   else
18887     # Not in mixed or Windows style, start by that.
18888     new_path=`cmd //c echo $new_path`
18889 
18890   input_path="$new_path"
18891   # Check if we need to convert this using DOS-style short mode. If the path
18892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18893   # take no chances and rewrite it.
18894   # Note: m4 eats our [], so we need to use [ and ] instead.
18895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18896   if test "x$has_forbidden_chars" != x; then
18897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18898     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18899   fi
18900 
18901     # Output is in $new_path
18902 
18903   windows_path="$new_path"
18904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18905     unix_path=`$CYGPATH -u "$windows_path"`
18906     new_path="$unix_path"
18907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18908     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18909     new_path="$unix_path"
18910   fi
18911 
18912     # remove trailing .exe if any
18913     new_path="${new_path/%.exe/}"
18914 
18915     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18916     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18917   fi
18918 
18919     else
18920       # We're on a unix platform. Hooray! :)
18921       # First separate the path from the arguments. This will split at the first
18922       # space.
18923       complete="$FOUND_MAKE"
18924       path="${complete%% *}"
18925       tmp="$complete EOL"
18926       arguments="${tmp#* }"
18927 
18928       # Cannot rely on the command "which" here since it doesn't always work.
18929       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18930       if test -z "$is_absolute_path"; then
18931         # Path to executable is not absolute. Find it.
18932         IFS_save="$IFS"
18933         IFS=:
18934         for p in $PATH; do
18935           if test -f "$p/$path" && test -x "$p/$path"; then
18936             new_path="$p/$path"
18937             break
18938           fi
18939         done
18940         IFS="$IFS_save"
18941       else
18942         # This is an absolute path, we can use it without further modifications.
18943         new_path="$path"
18944       fi
18945 
18946       if test "x$new_path" = x; then
18947         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18948 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18949         has_space=`$ECHO "$complete" | $GREP " "`
18950         if test "x$has_space" != x; then
18951           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18952 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18953         fi
18954         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18955       fi
18956     fi
18957 
18958     # Now join together the path and the arguments once again
18959     if test "x$arguments" != xEOL; then
18960       new_complete="$new_path ${arguments% *}"
18961     else
18962       new_complete="$new_path"
18963     fi
18964 
18965     if test "x$complete" != "x$new_complete"; then
18966       FOUND_MAKE="$new_complete"
18967       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18968 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18969     fi
18970   fi
18971 
18972         fi
18973       fi
18974     fi
18975   fi
18976 
18977     fi
18978 
18979     if test "x$FOUND_MAKE" = x; then
18980       if test "x$TOOLCHAIN_PATH" != x; then
18981         # We have a toolchain path, check that as well before giving up.
18982         OLD_PATH=$PATH
18983         PATH=$TOOLCHAIN_PATH:$PATH
18984         for ac_prog in gmake
18985 do
18986   # Extract the first word of "$ac_prog", so it can be a program name with args.
18987 set dummy $ac_prog; ac_word=$2
18988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18989 $as_echo_n "checking for $ac_word... " >&6; }
18990 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18991   $as_echo_n "(cached) " >&6
18992 else
18993   case $CHECK_TOOLSDIR_GMAKE in
18994   [\\/]* | ?:[\\/]*)
18995   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18996   ;;
18997   *)
18998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18999 for as_dir in $PATH
19000 do
19001   IFS=$as_save_IFS
19002   test -z "$as_dir" && as_dir=.
19003     for ac_exec_ext in '' $ac_executable_extensions; do
19004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19005     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19007     break 2
19008   fi
19009 done
19010   done
19011 IFS=$as_save_IFS
19012 
19013   ;;
19014 esac
19015 fi
19016 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19017 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19019 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19020 else
19021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19022 $as_echo "no" >&6; }
19023 fi
19024 
19025 
19026   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19027 done
19028 
19029 
19030   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19031   DESCRIPTION="gmake in tools-dir"
19032 
19033   # On Cygwin, we require a newer version of make than on other platforms
19034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19035     MAKE_VERSION_EXPR="-e 4\."
19036     MAKE_REQUIRED_VERSION="4.0"
19037    else
19038     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19039     MAKE_REQUIRED_VERSION="3.81"
19040   fi
19041 
19042   if test "x$MAKE_CANDIDATE" != x; then
19043     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19044 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19045     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19046     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19047     if test "x$IS_GNU_MAKE" = x; then
19048       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19049 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19050     else
19051       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19052       if test "x$IS_MODERN_MAKE" = x; then
19053         { $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
19054 $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;}
19055       else
19056         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19057           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19058             MAKE_EXPECTED_ENV='cygwin'
19059           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19060             MAKE_EXPECTED_ENV='msys'
19061           else
19062             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19063           fi
19064           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19065           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19066         else
19067           # Not relevant for non-Windows
19068           IS_MAKE_CORRECT_ENV=true
19069         fi
19070         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19071           { $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
19072 $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;}
19073         else
19074           FOUND_MAKE=$MAKE_CANDIDATE
19075 
19076   # Only process if variable expands to non-empty
19077 
19078   if test "x$FOUND_MAKE" != x; then
19079     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19080 
19081   # First separate the path from the arguments. This will split at the first
19082   # space.
19083   complete="$FOUND_MAKE"
19084   path="${complete%% *}"
19085   tmp="$complete EOL"
19086   arguments="${tmp#* }"
19087 
19088   # Input might be given as Windows format, start by converting to
19089   # unix format.
19090   new_path=`$CYGPATH -u "$path"`
19091 
19092   # Now try to locate executable using which
19093   new_path=`$WHICH "$new_path" 2> /dev/null`
19094   # bat and cmd files are not always considered executable in cygwin causing which
19095   # to not find them
19096   if test "x$new_path" = x \
19097       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19098       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19099     new_path=`$CYGPATH -u "$path"`
19100   fi
19101   if test "x$new_path" = x; then
19102     # Oops. Which didn't find the executable.
19103     # The splitting of arguments from the executable at a space might have been incorrect,
19104     # since paths with space are more likely in Windows. Give it another try with the whole
19105     # argument.
19106     path="$complete"
19107     arguments="EOL"
19108     new_path=`$CYGPATH -u "$path"`
19109     new_path=`$WHICH "$new_path" 2> /dev/null`
19110     # bat and cmd files are not always considered executable in cygwin causing which
19111     # to not find them
19112     if test "x$new_path" = x \
19113         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19114         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19115       new_path=`$CYGPATH -u "$path"`
19116     fi
19117     if test "x$new_path" = x; then
19118       # It's still not found. Now this is an unrecoverable error.
19119       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19120 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19121       has_space=`$ECHO "$complete" | $GREP " "`
19122       if test "x$has_space" != x; then
19123         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19124 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19125       fi
19126       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19127     fi
19128   fi
19129 
19130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19133   # "foo.exe" is OK but "foo" is an error.
19134   #
19135   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19136   # It is also a way to make sure we got the proper file name for the real test later on.
19137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19138   if test "x$test_shortpath" = x; then
19139     # Short path failed, file does not exist as specified.
19140     # Try adding .exe or .cmd
19141     if test -f "${new_path}.exe"; then
19142       input_to_shortpath="${new_path}.exe"
19143     elif test -f "${new_path}.cmd"; then
19144       input_to_shortpath="${new_path}.cmd"
19145     else
19146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19147 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19148       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19149 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19150       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19151     fi
19152   else
19153     input_to_shortpath="$new_path"
19154   fi
19155 
19156   # Call helper function which possibly converts this using DOS-style short mode.
19157   # If so, the updated path is stored in $new_path.
19158   new_path="$input_to_shortpath"
19159 
19160   input_path="$input_to_shortpath"
19161   # Check if we need to convert this using DOS-style short mode. If the path
19162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19163   # take no chances and rewrite it.
19164   # Note: m4 eats our [], so we need to use [ and ] instead.
19165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19166   if test "x$has_forbidden_chars" != x; then
19167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19168     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19169     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19170     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19171       # Going to short mode and back again did indeed matter. Since short mode is
19172       # case insensitive, let's make it lowercase to improve readability.
19173       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19174       # Now convert it back to Unix-style (cygpath)
19175       input_path=`$CYGPATH -u "$shortmode_path"`
19176       new_path="$input_path"
19177     fi
19178   fi
19179 
19180   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19181   if test "x$test_cygdrive_prefix" = x; then
19182     # As a simple fix, exclude /usr/bin since it's not a real path.
19183     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19184       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19185       # a path prefixed by /cygdrive for fixpath to work.
19186       new_path="$CYGWIN_ROOT_PATH$input_path"
19187     fi
19188   fi
19189 
19190   # remove trailing .exe if any
19191   new_path="${new_path/%.exe/}"
19192 
19193     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19194 
19195   # First separate the path from the arguments. This will split at the first
19196   # space.
19197   complete="$FOUND_MAKE"
19198   path="${complete%% *}"
19199   tmp="$complete EOL"
19200   arguments="${tmp#* }"
19201 
19202   # Input might be given as Windows format, start by converting to
19203   # unix format.
19204   new_path="$path"
19205 
19206   windows_path="$new_path"
19207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19208     unix_path=`$CYGPATH -u "$windows_path"`
19209     new_path="$unix_path"
19210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19212     new_path="$unix_path"
19213   fi
19214 
19215 
19216   # Now try to locate executable using which
19217   new_path=`$WHICH "$new_path" 2> /dev/null`
19218 
19219   if test "x$new_path" = x; then
19220     # Oops. Which didn't find the executable.
19221     # The splitting of arguments from the executable at a space might have been incorrect,
19222     # since paths with space are more likely in Windows. Give it another try with the whole
19223     # argument.
19224     path="$complete"
19225     arguments="EOL"
19226     new_path="$path"
19227 
19228   windows_path="$new_path"
19229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19230     unix_path=`$CYGPATH -u "$windows_path"`
19231     new_path="$unix_path"
19232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19234     new_path="$unix_path"
19235   fi
19236 
19237 
19238     new_path=`$WHICH "$new_path" 2> /dev/null`
19239     # bat and cmd files are not always considered executable in MSYS causing which
19240     # to not find them
19241     if test "x$new_path" = x \
19242         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19243         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19244       new_path="$path"
19245 
19246   windows_path="$new_path"
19247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19248     unix_path=`$CYGPATH -u "$windows_path"`
19249     new_path="$unix_path"
19250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19252     new_path="$unix_path"
19253   fi
19254 
19255     fi
19256 
19257     if test "x$new_path" = x; then
19258       # It's still not found. Now this is an unrecoverable error.
19259       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19260 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19261       has_space=`$ECHO "$complete" | $GREP " "`
19262       if test "x$has_space" != x; then
19263         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19264 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19265       fi
19266       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19267     fi
19268   fi
19269 
19270   # Now new_path has a complete unix path to the binary
19271   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19272     # Keep paths in /bin as-is, but remove trailing .exe if any
19273     new_path="${new_path/%.exe/}"
19274     # Do not save /bin paths to all_fixpath_prefixes!
19275   else
19276     # Not in mixed or Windows style, start by that.
19277     new_path=`cmd //c echo $new_path`
19278 
19279   input_path="$new_path"
19280   # Check if we need to convert this using DOS-style short mode. If the path
19281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19282   # take no chances and rewrite it.
19283   # Note: m4 eats our [], so we need to use [ and ] instead.
19284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19285   if test "x$has_forbidden_chars" != x; then
19286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19287     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19288   fi
19289 
19290     # Output is in $new_path
19291 
19292   windows_path="$new_path"
19293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19294     unix_path=`$CYGPATH -u "$windows_path"`
19295     new_path="$unix_path"
19296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19298     new_path="$unix_path"
19299   fi
19300 
19301     # remove trailing .exe if any
19302     new_path="${new_path/%.exe/}"
19303 
19304     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19305     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19306   fi
19307 
19308     else
19309       # We're on a unix platform. Hooray! :)
19310       # First separate the path from the arguments. This will split at the first
19311       # space.
19312       complete="$FOUND_MAKE"
19313       path="${complete%% *}"
19314       tmp="$complete EOL"
19315       arguments="${tmp#* }"
19316 
19317       # Cannot rely on the command "which" here since it doesn't always work.
19318       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19319       if test -z "$is_absolute_path"; then
19320         # Path to executable is not absolute. Find it.
19321         IFS_save="$IFS"
19322         IFS=:
19323         for p in $PATH; do
19324           if test -f "$p/$path" && test -x "$p/$path"; then
19325             new_path="$p/$path"
19326             break
19327           fi
19328         done
19329         IFS="$IFS_save"
19330       else
19331         # This is an absolute path, we can use it without further modifications.
19332         new_path="$path"
19333       fi
19334 
19335       if test "x$new_path" = x; then
19336         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19337 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19338         has_space=`$ECHO "$complete" | $GREP " "`
19339         if test "x$has_space" != x; then
19340           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19341 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19342         fi
19343         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19344       fi
19345     fi
19346 
19347     # Now join together the path and the arguments once again
19348     if test "x$arguments" != xEOL; then
19349       new_complete="$new_path ${arguments% *}"
19350     else
19351       new_complete="$new_path"
19352     fi
19353 
19354     if test "x$complete" != "x$new_complete"; then
19355       FOUND_MAKE="$new_complete"
19356       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19357 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19358     fi
19359   fi
19360 
19361         fi
19362       fi
19363     fi
19364   fi
19365 
19366         if test "x$FOUND_MAKE" = x; then
19367           for ac_prog in make
19368 do
19369   # Extract the first word of "$ac_prog", so it can be a program name with args.
19370 set dummy $ac_prog; ac_word=$2
19371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19372 $as_echo_n "checking for $ac_word... " >&6; }
19373 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19374   $as_echo_n "(cached) " >&6
19375 else
19376   case $CHECK_TOOLSDIR_MAKE in
19377   [\\/]* | ?:[\\/]*)
19378   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19379   ;;
19380   *)
19381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19382 for as_dir in $PATH
19383 do
19384   IFS=$as_save_IFS
19385   test -z "$as_dir" && as_dir=.
19386     for ac_exec_ext in '' $ac_executable_extensions; do
19387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19388     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19390     break 2
19391   fi
19392 done
19393   done
19394 IFS=$as_save_IFS
19395 
19396   ;;
19397 esac
19398 fi
19399 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19400 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19402 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19403 else
19404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19405 $as_echo "no" >&6; }
19406 fi
19407 
19408 
19409   test -n "$CHECK_TOOLSDIR_MAKE" && break
19410 done
19411 
19412 
19413   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19414   DESCRIPTION="make in tools-dir"
19415 
19416   # On Cygwin, we require a newer version of make than on other platforms
19417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19418     MAKE_VERSION_EXPR="-e 4\."
19419     MAKE_REQUIRED_VERSION="4.0"
19420    else
19421     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19422     MAKE_REQUIRED_VERSION="3.81"
19423   fi
19424 
19425   if test "x$MAKE_CANDIDATE" != x; then
19426     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19427 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19428     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19429     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19430     if test "x$IS_GNU_MAKE" = x; then
19431       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19432 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19433     else
19434       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19435       if test "x$IS_MODERN_MAKE" = x; then
19436         { $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
19437 $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;}
19438       else
19439         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19440           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19441             MAKE_EXPECTED_ENV='cygwin'
19442           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19443             MAKE_EXPECTED_ENV='msys'
19444           else
19445             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19446           fi
19447           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19448           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19449         else
19450           # Not relevant for non-Windows
19451           IS_MAKE_CORRECT_ENV=true
19452         fi
19453         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19454           { $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
19455 $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;}
19456         else
19457           FOUND_MAKE=$MAKE_CANDIDATE
19458 
19459   # Only process if variable expands to non-empty
19460 
19461   if test "x$FOUND_MAKE" != x; then
19462     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19463 
19464   # First separate the path from the arguments. This will split at the first
19465   # space.
19466   complete="$FOUND_MAKE"
19467   path="${complete%% *}"
19468   tmp="$complete EOL"
19469   arguments="${tmp#* }"
19470 
19471   # Input might be given as Windows format, start by converting to
19472   # unix format.
19473   new_path=`$CYGPATH -u "$path"`
19474 
19475   # Now try to locate executable using which
19476   new_path=`$WHICH "$new_path" 2> /dev/null`
19477   # bat and cmd files are not always considered executable in cygwin causing which
19478   # to not find them
19479   if test "x$new_path" = x \
19480       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19481       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19482     new_path=`$CYGPATH -u "$path"`
19483   fi
19484   if test "x$new_path" = x; then
19485     # Oops. Which didn't find the executable.
19486     # The splitting of arguments from the executable at a space might have been incorrect,
19487     # since paths with space are more likely in Windows. Give it another try with the whole
19488     # argument.
19489     path="$complete"
19490     arguments="EOL"
19491     new_path=`$CYGPATH -u "$path"`
19492     new_path=`$WHICH "$new_path" 2> /dev/null`
19493     # bat and cmd files are not always considered executable in cygwin causing which
19494     # to not find them
19495     if test "x$new_path" = x \
19496         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19497         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19498       new_path=`$CYGPATH -u "$path"`
19499     fi
19500     if test "x$new_path" = x; then
19501       # It's still not found. Now this is an unrecoverable error.
19502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19503 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19504       has_space=`$ECHO "$complete" | $GREP " "`
19505       if test "x$has_space" != x; then
19506         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19507 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19508       fi
19509       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19510     fi
19511   fi
19512 
19513   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19514   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19515   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19516   # "foo.exe" is OK but "foo" is an error.
19517   #
19518   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19519   # It is also a way to make sure we got the proper file name for the real test later on.
19520   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19521   if test "x$test_shortpath" = x; then
19522     # Short path failed, file does not exist as specified.
19523     # Try adding .exe or .cmd
19524     if test -f "${new_path}.exe"; then
19525       input_to_shortpath="${new_path}.exe"
19526     elif test -f "${new_path}.cmd"; then
19527       input_to_shortpath="${new_path}.cmd"
19528     else
19529       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19530 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19531       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19532 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19533       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19534     fi
19535   else
19536     input_to_shortpath="$new_path"
19537   fi
19538 
19539   # Call helper function which possibly converts this using DOS-style short mode.
19540   # If so, the updated path is stored in $new_path.
19541   new_path="$input_to_shortpath"
19542 
19543   input_path="$input_to_shortpath"
19544   # Check if we need to convert this using DOS-style short mode. If the path
19545   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19546   # take no chances and rewrite it.
19547   # Note: m4 eats our [], so we need to use [ and ] instead.
19548   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19549   if test "x$has_forbidden_chars" != x; then
19550     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19551     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19552     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19553     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19554       # Going to short mode and back again did indeed matter. Since short mode is
19555       # case insensitive, let's make it lowercase to improve readability.
19556       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19557       # Now convert it back to Unix-style (cygpath)
19558       input_path=`$CYGPATH -u "$shortmode_path"`
19559       new_path="$input_path"
19560     fi
19561   fi
19562 
19563   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19564   if test "x$test_cygdrive_prefix" = x; then
19565     # As a simple fix, exclude /usr/bin since it's not a real path.
19566     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19567       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19568       # a path prefixed by /cygdrive for fixpath to work.
19569       new_path="$CYGWIN_ROOT_PATH$input_path"
19570     fi
19571   fi
19572 
19573   # remove trailing .exe if any
19574   new_path="${new_path/%.exe/}"
19575 
19576     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19577 
19578   # First separate the path from the arguments. This will split at the first
19579   # space.
19580   complete="$FOUND_MAKE"
19581   path="${complete%% *}"
19582   tmp="$complete EOL"
19583   arguments="${tmp#* }"
19584 
19585   # Input might be given as Windows format, start by converting to
19586   # unix format.
19587   new_path="$path"
19588 
19589   windows_path="$new_path"
19590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19591     unix_path=`$CYGPATH -u "$windows_path"`
19592     new_path="$unix_path"
19593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19595     new_path="$unix_path"
19596   fi
19597 
19598 
19599   # Now try to locate executable using which
19600   new_path=`$WHICH "$new_path" 2> /dev/null`
19601 
19602   if test "x$new_path" = x; then
19603     # Oops. Which didn't find the executable.
19604     # The splitting of arguments from the executable at a space might have been incorrect,
19605     # since paths with space are more likely in Windows. Give it another try with the whole
19606     # argument.
19607     path="$complete"
19608     arguments="EOL"
19609     new_path="$path"
19610 
19611   windows_path="$new_path"
19612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19613     unix_path=`$CYGPATH -u "$windows_path"`
19614     new_path="$unix_path"
19615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19616     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19617     new_path="$unix_path"
19618   fi
19619 
19620 
19621     new_path=`$WHICH "$new_path" 2> /dev/null`
19622     # bat and cmd files are not always considered executable in MSYS causing which
19623     # to not find them
19624     if test "x$new_path" = x \
19625         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19626         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19627       new_path="$path"
19628 
19629   windows_path="$new_path"
19630   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19631     unix_path=`$CYGPATH -u "$windows_path"`
19632     new_path="$unix_path"
19633   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19634     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19635     new_path="$unix_path"
19636   fi
19637 
19638     fi
19639 
19640     if test "x$new_path" = x; then
19641       # It's still not found. Now this is an unrecoverable error.
19642       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19643 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19644       has_space=`$ECHO "$complete" | $GREP " "`
19645       if test "x$has_space" != x; then
19646         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19647 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19648       fi
19649       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19650     fi
19651   fi
19652 
19653   # Now new_path has a complete unix path to the binary
19654   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19655     # Keep paths in /bin as-is, but remove trailing .exe if any
19656     new_path="${new_path/%.exe/}"
19657     # Do not save /bin paths to all_fixpath_prefixes!
19658   else
19659     # Not in mixed or Windows style, start by that.
19660     new_path=`cmd //c echo $new_path`
19661 
19662   input_path="$new_path"
19663   # Check if we need to convert this using DOS-style short mode. If the path
19664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19665   # take no chances and rewrite it.
19666   # Note: m4 eats our [], so we need to use [ and ] instead.
19667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19668   if test "x$has_forbidden_chars" != x; then
19669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19671   fi
19672 
19673     # Output is in $new_path
19674 
19675   windows_path="$new_path"
19676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19677     unix_path=`$CYGPATH -u "$windows_path"`
19678     new_path="$unix_path"
19679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19680     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19681     new_path="$unix_path"
19682   fi
19683 
19684     # remove trailing .exe if any
19685     new_path="${new_path/%.exe/}"
19686 
19687     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19688     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19689   fi
19690 
19691     else
19692       # We're on a unix platform. Hooray! :)
19693       # First separate the path from the arguments. This will split at the first
19694       # space.
19695       complete="$FOUND_MAKE"
19696       path="${complete%% *}"
19697       tmp="$complete EOL"
19698       arguments="${tmp#* }"
19699 
19700       # Cannot rely on the command "which" here since it doesn't always work.
19701       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19702       if test -z "$is_absolute_path"; then
19703         # Path to executable is not absolute. Find it.
19704         IFS_save="$IFS"
19705         IFS=:
19706         for p in $PATH; do
19707           if test -f "$p/$path" && test -x "$p/$path"; then
19708             new_path="$p/$path"
19709             break
19710           fi
19711         done
19712         IFS="$IFS_save"
19713       else
19714         # This is an absolute path, we can use it without further modifications.
19715         new_path="$path"
19716       fi
19717 
19718       if test "x$new_path" = x; then
19719         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19720 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19721         has_space=`$ECHO "$complete" | $GREP " "`
19722         if test "x$has_space" != x; then
19723           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19724 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19725         fi
19726         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19727       fi
19728     fi
19729 
19730     # Now join together the path and the arguments once again
19731     if test "x$arguments" != xEOL; then
19732       new_complete="$new_path ${arguments% *}"
19733     else
19734       new_complete="$new_path"
19735     fi
19736 
19737     if test "x$complete" != "x$new_complete"; then
19738       FOUND_MAKE="$new_complete"
19739       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19740 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19741     fi
19742   fi
19743 
19744         fi
19745       fi
19746     fi
19747   fi
19748 
19749         fi
19750         PATH=$OLD_PATH
19751       fi
19752     fi
19753 
19754     if test "x$FOUND_MAKE" = x; then
19755       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
19756     fi
19757 
19758     else
19759       # If it succeeded, then it was overridden by the user. We will use it
19760       # for the tool.
19761 
19762       # First remove it from the list of overridden variables, so we can test
19763       # for unknown variables in the end.
19764       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19765 
19766       # Check if we try to supply an empty value
19767       if test "x$MAKE" = x; then
19768         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19769 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19770         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19771 $as_echo_n "checking for MAKE... " >&6; }
19772         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19773 $as_echo "disabled" >&6; }
19774       else
19775         # Check if the provided tool contains a complete path.
19776         tool_specified="$MAKE"
19777         tool_basename="${tool_specified##*/}"
19778         if test "x$tool_basename" = "x$tool_specified"; then
19779           # A command without a complete path is provided, search $PATH.
19780           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19781 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19782           # Extract the first word of "$tool_basename", so it can be a program name with args.
19783 set dummy $tool_basename; ac_word=$2
19784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19785 $as_echo_n "checking for $ac_word... " >&6; }
19786 if ${ac_cv_path_MAKE+:} false; then :
19787   $as_echo_n "(cached) " >&6
19788 else
19789   case $MAKE in
19790   [\\/]* | ?:[\\/]*)
19791   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19792   ;;
19793   *)
19794   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19795 for as_dir in $PATH
19796 do
19797   IFS=$as_save_IFS
19798   test -z "$as_dir" && as_dir=.
19799     for ac_exec_ext in '' $ac_executable_extensions; do
19800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19801     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19803     break 2
19804   fi
19805 done
19806   done
19807 IFS=$as_save_IFS
19808 
19809   ;;
19810 esac
19811 fi
19812 MAKE=$ac_cv_path_MAKE
19813 if test -n "$MAKE"; then
19814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19815 $as_echo "$MAKE" >&6; }
19816 else
19817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19818 $as_echo "no" >&6; }
19819 fi
19820 
19821 
19822           if test "x$MAKE" = x; then
19823             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19824           fi
19825         else
19826           # Otherwise we believe it is a complete path. Use it as it is.
19827           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19828 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19829           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19830 $as_echo_n "checking for MAKE... " >&6; }
19831           if test ! -x "$tool_specified"; then
19832             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19833 $as_echo "not found" >&6; }
19834             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19835           fi
19836           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19837 $as_echo "$tool_specified" >&6; }
19838         fi
19839       fi
19840     fi
19841 
19842     # If MAKE was set by user, verify the version
19843 
19844   MAKE_CANDIDATE=""$MAKE""
19845   DESCRIPTION="user supplied MAKE=$MAKE"
19846 
19847   # On Cygwin, we require a newer version of make than on other platforms
19848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19849     MAKE_VERSION_EXPR="-e 4\."
19850     MAKE_REQUIRED_VERSION="4.0"
19851    else
19852     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19853     MAKE_REQUIRED_VERSION="3.81"
19854   fi
19855 
19856   if test "x$MAKE_CANDIDATE" != x; then
19857     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19858 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19859     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19860     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19861     if test "x$IS_GNU_MAKE" = x; then
19862       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19863 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19864     else
19865       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19866       if test "x$IS_MODERN_MAKE" = x; then
19867         { $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
19868 $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;}
19869       else
19870         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19871           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19872             MAKE_EXPECTED_ENV='cygwin'
19873           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19874             MAKE_EXPECTED_ENV='msys'
19875           else
19876             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19877           fi
19878           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19879           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19880         else
19881           # Not relevant for non-Windows
19882           IS_MAKE_CORRECT_ENV=true
19883         fi
19884         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19885           { $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
19886 $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;}
19887         else
19888           FOUND_MAKE=$MAKE_CANDIDATE
19889 
19890   # Only process if variable expands to non-empty
19891 
19892   if test "x$FOUND_MAKE" != x; then
19893     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19894 
19895   # First separate the path from the arguments. This will split at the first
19896   # space.
19897   complete="$FOUND_MAKE"
19898   path="${complete%% *}"
19899   tmp="$complete EOL"
19900   arguments="${tmp#* }"
19901 
19902   # Input might be given as Windows format, start by converting to
19903   # unix format.
19904   new_path=`$CYGPATH -u "$path"`
19905 
19906   # Now try to locate executable using which
19907   new_path=`$WHICH "$new_path" 2> /dev/null`
19908   # bat and cmd files are not always considered executable in cygwin causing which
19909   # to not find them
19910   if test "x$new_path" = x \
19911       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19912       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19913     new_path=`$CYGPATH -u "$path"`
19914   fi
19915   if test "x$new_path" = x; then
19916     # Oops. Which didn't find the executable.
19917     # The splitting of arguments from the executable at a space might have been incorrect,
19918     # since paths with space are more likely in Windows. Give it another try with the whole
19919     # argument.
19920     path="$complete"
19921     arguments="EOL"
19922     new_path=`$CYGPATH -u "$path"`
19923     new_path=`$WHICH "$new_path" 2> /dev/null`
19924     # bat and cmd files are not always considered executable in cygwin causing which
19925     # to not find them
19926     if test "x$new_path" = x \
19927         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19928         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19929       new_path=`$CYGPATH -u "$path"`
19930     fi
19931     if test "x$new_path" = x; then
19932       # It's still not found. Now this is an unrecoverable error.
19933       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19934 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19935       has_space=`$ECHO "$complete" | $GREP " "`
19936       if test "x$has_space" != x; then
19937         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19938 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19939       fi
19940       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19941     fi
19942   fi
19943 
19944   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19945   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19946   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19947   # "foo.exe" is OK but "foo" is an error.
19948   #
19949   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19950   # It is also a way to make sure we got the proper file name for the real test later on.
19951   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19952   if test "x$test_shortpath" = x; then
19953     # Short path failed, file does not exist as specified.
19954     # Try adding .exe or .cmd
19955     if test -f "${new_path}.exe"; then
19956       input_to_shortpath="${new_path}.exe"
19957     elif test -f "${new_path}.cmd"; then
19958       input_to_shortpath="${new_path}.cmd"
19959     else
19960       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19961 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19962       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19963 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19964       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19965     fi
19966   else
19967     input_to_shortpath="$new_path"
19968   fi
19969 
19970   # Call helper function which possibly converts this using DOS-style short mode.
19971   # If so, the updated path is stored in $new_path.
19972   new_path="$input_to_shortpath"
19973 
19974   input_path="$input_to_shortpath"
19975   # Check if we need to convert this using DOS-style short mode. If the path
19976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19977   # take no chances and rewrite it.
19978   # Note: m4 eats our [], so we need to use [ and ] instead.
19979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19980   if test "x$has_forbidden_chars" != x; then
19981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19982     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19983     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19984     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19985       # Going to short mode and back again did indeed matter. Since short mode is
19986       # case insensitive, let's make it lowercase to improve readability.
19987       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19988       # Now convert it back to Unix-style (cygpath)
19989       input_path=`$CYGPATH -u "$shortmode_path"`
19990       new_path="$input_path"
19991     fi
19992   fi
19993 
19994   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19995   if test "x$test_cygdrive_prefix" = x; then
19996     # As a simple fix, exclude /usr/bin since it's not a real path.
19997     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19998       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19999       # a path prefixed by /cygdrive for fixpath to work.
20000       new_path="$CYGWIN_ROOT_PATH$input_path"
20001     fi
20002   fi
20003 
20004   # remove trailing .exe if any
20005   new_path="${new_path/%.exe/}"
20006 
20007     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20008 
20009   # First separate the path from the arguments. This will split at the first
20010   # space.
20011   complete="$FOUND_MAKE"
20012   path="${complete%% *}"
20013   tmp="$complete EOL"
20014   arguments="${tmp#* }"
20015 
20016   # Input might be given as Windows format, start by converting to
20017   # unix format.
20018   new_path="$path"
20019 
20020   windows_path="$new_path"
20021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20022     unix_path=`$CYGPATH -u "$windows_path"`
20023     new_path="$unix_path"
20024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20026     new_path="$unix_path"
20027   fi
20028 
20029 
20030   # Now try to locate executable using which
20031   new_path=`$WHICH "$new_path" 2> /dev/null`
20032 
20033   if test "x$new_path" = x; then
20034     # Oops. Which didn't find the executable.
20035     # The splitting of arguments from the executable at a space might have been incorrect,
20036     # since paths with space are more likely in Windows. Give it another try with the whole
20037     # argument.
20038     path="$complete"
20039     arguments="EOL"
20040     new_path="$path"
20041 
20042   windows_path="$new_path"
20043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20044     unix_path=`$CYGPATH -u "$windows_path"`
20045     new_path="$unix_path"
20046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20047     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20048     new_path="$unix_path"
20049   fi
20050 
20051 
20052     new_path=`$WHICH "$new_path" 2> /dev/null`
20053     # bat and cmd files are not always considered executable in MSYS causing which
20054     # to not find them
20055     if test "x$new_path" = x \
20056         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20057         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20058       new_path="$path"
20059 
20060   windows_path="$new_path"
20061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20062     unix_path=`$CYGPATH -u "$windows_path"`
20063     new_path="$unix_path"
20064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20066     new_path="$unix_path"
20067   fi
20068 
20069     fi
20070 
20071     if test "x$new_path" = x; then
20072       # It's still not found. Now this is an unrecoverable error.
20073       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20074 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20075       has_space=`$ECHO "$complete" | $GREP " "`
20076       if test "x$has_space" != x; then
20077         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20078 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20079       fi
20080       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20081     fi
20082   fi
20083 
20084   # Now new_path has a complete unix path to the binary
20085   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20086     # Keep paths in /bin as-is, but remove trailing .exe if any
20087     new_path="${new_path/%.exe/}"
20088     # Do not save /bin paths to all_fixpath_prefixes!
20089   else
20090     # Not in mixed or Windows style, start by that.
20091     new_path=`cmd //c echo $new_path`
20092 
20093   input_path="$new_path"
20094   # Check if we need to convert this using DOS-style short mode. If the path
20095   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20096   # take no chances and rewrite it.
20097   # Note: m4 eats our [], so we need to use [ and ] instead.
20098   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20099   if test "x$has_forbidden_chars" != x; then
20100     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20101     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20102   fi
20103 
20104     # Output is in $new_path
20105 
20106   windows_path="$new_path"
20107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20108     unix_path=`$CYGPATH -u "$windows_path"`
20109     new_path="$unix_path"
20110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20112     new_path="$unix_path"
20113   fi
20114 
20115     # remove trailing .exe if any
20116     new_path="${new_path/%.exe/}"
20117 
20118     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20119     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20120   fi
20121 
20122     else
20123       # We're on a unix platform. Hooray! :)
20124       # First separate the path from the arguments. This will split at the first
20125       # space.
20126       complete="$FOUND_MAKE"
20127       path="${complete%% *}"
20128       tmp="$complete EOL"
20129       arguments="${tmp#* }"
20130 
20131       # Cannot rely on the command "which" here since it doesn't always work.
20132       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20133       if test -z "$is_absolute_path"; then
20134         # Path to executable is not absolute. Find it.
20135         IFS_save="$IFS"
20136         IFS=:
20137         for p in $PATH; do
20138           if test -f "$p/$path" && test -x "$p/$path"; then
20139             new_path="$p/$path"
20140             break
20141           fi
20142         done
20143         IFS="$IFS_save"
20144       else
20145         # This is an absolute path, we can use it without further modifications.
20146         new_path="$path"
20147       fi
20148 
20149       if test "x$new_path" = x; then
20150         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20151 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20152         has_space=`$ECHO "$complete" | $GREP " "`
20153         if test "x$has_space" != x; then
20154           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20155 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20156         fi
20157         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20158       fi
20159     fi
20160 
20161     # Now join together the path and the arguments once again
20162     if test "x$arguments" != xEOL; then
20163       new_complete="$new_path ${arguments% *}"
20164     else
20165       new_complete="$new_path"
20166     fi
20167 
20168     if test "x$complete" != "x$new_complete"; then
20169       FOUND_MAKE="$new_complete"
20170       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20171 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20172     fi
20173   fi
20174 
20175         fi
20176       fi
20177     fi
20178   fi
20179 
20180     if test "x$FOUND_MAKE" = x; then
20181       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20182     fi
20183 
20184   fi
20185 
20186 
20187   MAKE=$FOUND_MAKE
20188 
20189   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20190 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20191 
20192 
20193   # Check if make supports the output sync option and if so, setup using it.
20194   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20195 $as_echo_n "checking if make --output-sync is supported... " >&6; }
20196   if $MAKE --version -O > /dev/null 2>&1; then
20197     OUTPUT_SYNC_SUPPORTED=true
20198     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20199 $as_echo "yes" >&6; }
20200     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20201 $as_echo_n "checking for output-sync value... " >&6; }
20202 
20203 # Check whether --with-output-sync was given.
20204 if test "${with_output_sync+set}" = set; then :
20205   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20206 fi
20207 
20208     if test "x$OUTPUT_SYNC" = "x"; then
20209       OUTPUT_SYNC=none
20210     fi
20211     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20212 $as_echo "$OUTPUT_SYNC" >&6; }
20213     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20214       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20215     fi
20216   else
20217     OUTPUT_SYNC_SUPPORTED=false
20218     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20219 $as_echo "no" >&6; }
20220   fi
20221 
20222 
20223 
20224 
20225 
20226 
20227   # Test if find supports -delete
20228   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20229 $as_echo_n "checking if find supports -delete... " >&6; }
20230   FIND_DELETE="-delete"
20231 
20232   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20233 
20234   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20235 
20236   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20237   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20238     # No, it does not.
20239     rm $DELETEDIR/TestIfFindSupportsDelete
20240     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20241       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20242       FIND_DELETE="-print | xargs rm"
20243     else
20244       FIND_DELETE="-exec rm \{\} \+"
20245     fi
20246     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20247 $as_echo "no" >&6; }
20248   else
20249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20250 $as_echo "yes" >&6; }
20251   fi
20252   rmdir $DELETEDIR
20253 
20254 
20255 
20256   # These tools might not be installed by default,
20257   # need hint on how to install them.
20258 
20259 
20260 
20261   # Publish this variable in the help.
20262 
20263 
20264   if [ -z "${UNZIP+x}" ]; then
20265     # The variable is not set by user, try to locate tool using the code snippet
20266     for ac_prog in unzip
20267 do
20268   # Extract the first word of "$ac_prog", so it can be a program name with args.
20269 set dummy $ac_prog; ac_word=$2
20270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20271 $as_echo_n "checking for $ac_word... " >&6; }
20272 if ${ac_cv_path_UNZIP+:} false; then :
20273   $as_echo_n "(cached) " >&6
20274 else
20275   case $UNZIP in
20276   [\\/]* | ?:[\\/]*)
20277   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20278   ;;
20279   *)
20280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20281 for as_dir in $PATH
20282 do
20283   IFS=$as_save_IFS
20284   test -z "$as_dir" && as_dir=.
20285     for ac_exec_ext in '' $ac_executable_extensions; do
20286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20287     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20289     break 2
20290   fi
20291 done
20292   done
20293 IFS=$as_save_IFS
20294 
20295   ;;
20296 esac
20297 fi
20298 UNZIP=$ac_cv_path_UNZIP
20299 if test -n "$UNZIP"; then
20300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20301 $as_echo "$UNZIP" >&6; }
20302 else
20303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20304 $as_echo "no" >&6; }
20305 fi
20306 
20307 
20308   test -n "$UNZIP" && break
20309 done
20310 
20311   else
20312     # The variable is set, but is it from the command line or the environment?
20313 
20314     # Try to remove the string !UNZIP! from our list.
20315     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20316     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20317       # If it failed, the variable was not from the command line. Ignore it,
20318       # but warn the user (except for BASH, which is always set by the calling BASH).
20319       if test "xUNZIP" != xBASH; then
20320         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20321 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20322       fi
20323       # Try to locate tool using the code snippet
20324       for ac_prog in unzip
20325 do
20326   # Extract the first word of "$ac_prog", so it can be a program name with args.
20327 set dummy $ac_prog; ac_word=$2
20328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20329 $as_echo_n "checking for $ac_word... " >&6; }
20330 if ${ac_cv_path_UNZIP+:} false; then :
20331   $as_echo_n "(cached) " >&6
20332 else
20333   case $UNZIP in
20334   [\\/]* | ?:[\\/]*)
20335   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20336   ;;
20337   *)
20338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20339 for as_dir in $PATH
20340 do
20341   IFS=$as_save_IFS
20342   test -z "$as_dir" && as_dir=.
20343     for ac_exec_ext in '' $ac_executable_extensions; do
20344   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20345     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20347     break 2
20348   fi
20349 done
20350   done
20351 IFS=$as_save_IFS
20352 
20353   ;;
20354 esac
20355 fi
20356 UNZIP=$ac_cv_path_UNZIP
20357 if test -n "$UNZIP"; then
20358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20359 $as_echo "$UNZIP" >&6; }
20360 else
20361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20362 $as_echo "no" >&6; }
20363 fi
20364 
20365 
20366   test -n "$UNZIP" && break
20367 done
20368 
20369     else
20370       # If it succeeded, then it was overridden by the user. We will use it
20371       # for the tool.
20372 
20373       # First remove it from the list of overridden variables, so we can test
20374       # for unknown variables in the end.
20375       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20376 
20377       # Check if we try to supply an empty value
20378       if test "x$UNZIP" = x; then
20379         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20380 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20381         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20382 $as_echo_n "checking for UNZIP... " >&6; }
20383         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20384 $as_echo "disabled" >&6; }
20385       else
20386         # Check if the provided tool contains a complete path.
20387         tool_specified="$UNZIP"
20388         tool_basename="${tool_specified##*/}"
20389         if test "x$tool_basename" = "x$tool_specified"; then
20390           # A command without a complete path is provided, search $PATH.
20391           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20392 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20393           # Extract the first word of "$tool_basename", so it can be a program name with args.
20394 set dummy $tool_basename; ac_word=$2
20395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20396 $as_echo_n "checking for $ac_word... " >&6; }
20397 if ${ac_cv_path_UNZIP+:} false; then :
20398   $as_echo_n "(cached) " >&6
20399 else
20400   case $UNZIP in
20401   [\\/]* | ?:[\\/]*)
20402   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20403   ;;
20404   *)
20405   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20406 for as_dir in $PATH
20407 do
20408   IFS=$as_save_IFS
20409   test -z "$as_dir" && as_dir=.
20410     for ac_exec_ext in '' $ac_executable_extensions; do
20411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20412     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20414     break 2
20415   fi
20416 done
20417   done
20418 IFS=$as_save_IFS
20419 
20420   ;;
20421 esac
20422 fi
20423 UNZIP=$ac_cv_path_UNZIP
20424 if test -n "$UNZIP"; then
20425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20426 $as_echo "$UNZIP" >&6; }
20427 else
20428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20429 $as_echo "no" >&6; }
20430 fi
20431 
20432 
20433           if test "x$UNZIP" = x; then
20434             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20435           fi
20436         else
20437           # Otherwise we believe it is a complete path. Use it as it is.
20438           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20439 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20440           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20441 $as_echo_n "checking for UNZIP... " >&6; }
20442           if test ! -x "$tool_specified"; then
20443             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20444 $as_echo "not found" >&6; }
20445             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20446           fi
20447           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20448 $as_echo "$tool_specified" >&6; }
20449         fi
20450       fi
20451     fi
20452 
20453   fi
20454 
20455 
20456 
20457   if test "x$UNZIP" = x; then
20458     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20459   fi
20460 
20461 
20462 
20463 
20464 
20465   # Publish this variable in the help.
20466 
20467 
20468   if [ -z "${ZIP+x}" ]; then
20469     # The variable is not set by user, try to locate tool using the code snippet
20470     for ac_prog in zip
20471 do
20472   # Extract the first word of "$ac_prog", so it can be a program name with args.
20473 set dummy $ac_prog; ac_word=$2
20474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20475 $as_echo_n "checking for $ac_word... " >&6; }
20476 if ${ac_cv_path_ZIP+:} false; then :
20477   $as_echo_n "(cached) " >&6
20478 else
20479   case $ZIP in
20480   [\\/]* | ?:[\\/]*)
20481   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20482   ;;
20483   *)
20484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20485 for as_dir in $PATH
20486 do
20487   IFS=$as_save_IFS
20488   test -z "$as_dir" && as_dir=.
20489     for ac_exec_ext in '' $ac_executable_extensions; do
20490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20491     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20493     break 2
20494   fi
20495 done
20496   done
20497 IFS=$as_save_IFS
20498 
20499   ;;
20500 esac
20501 fi
20502 ZIP=$ac_cv_path_ZIP
20503 if test -n "$ZIP"; then
20504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20505 $as_echo "$ZIP" >&6; }
20506 else
20507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20508 $as_echo "no" >&6; }
20509 fi
20510 
20511 
20512   test -n "$ZIP" && break
20513 done
20514 
20515   else
20516     # The variable is set, but is it from the command line or the environment?
20517 
20518     # Try to remove the string !ZIP! from our list.
20519     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20520     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20521       # If it failed, the variable was not from the command line. Ignore it,
20522       # but warn the user (except for BASH, which is always set by the calling BASH).
20523       if test "xZIP" != xBASH; then
20524         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20525 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20526       fi
20527       # Try to locate tool using the code snippet
20528       for ac_prog in zip
20529 do
20530   # Extract the first word of "$ac_prog", so it can be a program name with args.
20531 set dummy $ac_prog; ac_word=$2
20532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20533 $as_echo_n "checking for $ac_word... " >&6; }
20534 if ${ac_cv_path_ZIP+:} false; then :
20535   $as_echo_n "(cached) " >&6
20536 else
20537   case $ZIP in
20538   [\\/]* | ?:[\\/]*)
20539   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20540   ;;
20541   *)
20542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20543 for as_dir in $PATH
20544 do
20545   IFS=$as_save_IFS
20546   test -z "$as_dir" && as_dir=.
20547     for ac_exec_ext in '' $ac_executable_extensions; do
20548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20549     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20551     break 2
20552   fi
20553 done
20554   done
20555 IFS=$as_save_IFS
20556 
20557   ;;
20558 esac
20559 fi
20560 ZIP=$ac_cv_path_ZIP
20561 if test -n "$ZIP"; then
20562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20563 $as_echo "$ZIP" >&6; }
20564 else
20565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20566 $as_echo "no" >&6; }
20567 fi
20568 
20569 
20570   test -n "$ZIP" && break
20571 done
20572 
20573     else
20574       # If it succeeded, then it was overridden by the user. We will use it
20575       # for the tool.
20576 
20577       # First remove it from the list of overridden variables, so we can test
20578       # for unknown variables in the end.
20579       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20580 
20581       # Check if we try to supply an empty value
20582       if test "x$ZIP" = x; then
20583         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20584 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20585         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20586 $as_echo_n "checking for ZIP... " >&6; }
20587         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20588 $as_echo "disabled" >&6; }
20589       else
20590         # Check if the provided tool contains a complete path.
20591         tool_specified="$ZIP"
20592         tool_basename="${tool_specified##*/}"
20593         if test "x$tool_basename" = "x$tool_specified"; then
20594           # A command without a complete path is provided, search $PATH.
20595           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20596 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20597           # Extract the first word of "$tool_basename", so it can be a program name with args.
20598 set dummy $tool_basename; ac_word=$2
20599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20600 $as_echo_n "checking for $ac_word... " >&6; }
20601 if ${ac_cv_path_ZIP+:} false; then :
20602   $as_echo_n "(cached) " >&6
20603 else
20604   case $ZIP in
20605   [\\/]* | ?:[\\/]*)
20606   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20607   ;;
20608   *)
20609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20610 for as_dir in $PATH
20611 do
20612   IFS=$as_save_IFS
20613   test -z "$as_dir" && as_dir=.
20614     for ac_exec_ext in '' $ac_executable_extensions; do
20615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20616     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20618     break 2
20619   fi
20620 done
20621   done
20622 IFS=$as_save_IFS
20623 
20624   ;;
20625 esac
20626 fi
20627 ZIP=$ac_cv_path_ZIP
20628 if test -n "$ZIP"; then
20629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20630 $as_echo "$ZIP" >&6; }
20631 else
20632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20633 $as_echo "no" >&6; }
20634 fi
20635 
20636 
20637           if test "x$ZIP" = x; then
20638             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20639           fi
20640         else
20641           # Otherwise we believe it is a complete path. Use it as it is.
20642           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20643 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20644           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20645 $as_echo_n "checking for ZIP... " >&6; }
20646           if test ! -x "$tool_specified"; then
20647             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20648 $as_echo "not found" >&6; }
20649             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20650           fi
20651           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20652 $as_echo "$tool_specified" >&6; }
20653         fi
20654       fi
20655     fi
20656 
20657   fi
20658 
20659 
20660 
20661   if test "x$ZIP" = x; then
20662     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20663   fi
20664 
20665 
20666 
20667   # Non-required basic tools
20668 
20669 
20670 
20671   # Publish this variable in the help.
20672 
20673 
20674   if [ -z "${LDD+x}" ]; then
20675     # The variable is not set by user, try to locate tool using the code snippet
20676     for ac_prog in ldd
20677 do
20678   # Extract the first word of "$ac_prog", so it can be a program name with args.
20679 set dummy $ac_prog; ac_word=$2
20680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20681 $as_echo_n "checking for $ac_word... " >&6; }
20682 if ${ac_cv_path_LDD+:} false; then :
20683   $as_echo_n "(cached) " >&6
20684 else
20685   case $LDD in
20686   [\\/]* | ?:[\\/]*)
20687   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20688   ;;
20689   *)
20690   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20691 for as_dir in $PATH
20692 do
20693   IFS=$as_save_IFS
20694   test -z "$as_dir" && as_dir=.
20695     for ac_exec_ext in '' $ac_executable_extensions; do
20696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20697     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20699     break 2
20700   fi
20701 done
20702   done
20703 IFS=$as_save_IFS
20704 
20705   ;;
20706 esac
20707 fi
20708 LDD=$ac_cv_path_LDD
20709 if test -n "$LDD"; then
20710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20711 $as_echo "$LDD" >&6; }
20712 else
20713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20714 $as_echo "no" >&6; }
20715 fi
20716 
20717 
20718   test -n "$LDD" && break
20719 done
20720 
20721   else
20722     # The variable is set, but is it from the command line or the environment?
20723 
20724     # Try to remove the string !LDD! from our list.
20725     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20726     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20727       # If it failed, the variable was not from the command line. Ignore it,
20728       # but warn the user (except for BASH, which is always set by the calling BASH).
20729       if test "xLDD" != xBASH; then
20730         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20731 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20732       fi
20733       # Try to locate tool using the code snippet
20734       for ac_prog in ldd
20735 do
20736   # Extract the first word of "$ac_prog", so it can be a program name with args.
20737 set dummy $ac_prog; ac_word=$2
20738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20739 $as_echo_n "checking for $ac_word... " >&6; }
20740 if ${ac_cv_path_LDD+:} false; then :
20741   $as_echo_n "(cached) " >&6
20742 else
20743   case $LDD in
20744   [\\/]* | ?:[\\/]*)
20745   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20746   ;;
20747   *)
20748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20749 for as_dir in $PATH
20750 do
20751   IFS=$as_save_IFS
20752   test -z "$as_dir" && as_dir=.
20753     for ac_exec_ext in '' $ac_executable_extensions; do
20754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20755     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20757     break 2
20758   fi
20759 done
20760   done
20761 IFS=$as_save_IFS
20762 
20763   ;;
20764 esac
20765 fi
20766 LDD=$ac_cv_path_LDD
20767 if test -n "$LDD"; then
20768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20769 $as_echo "$LDD" >&6; }
20770 else
20771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20772 $as_echo "no" >&6; }
20773 fi
20774 
20775 
20776   test -n "$LDD" && break
20777 done
20778 
20779     else
20780       # If it succeeded, then it was overridden by the user. We will use it
20781       # for the tool.
20782 
20783       # First remove it from the list of overridden variables, so we can test
20784       # for unknown variables in the end.
20785       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20786 
20787       # Check if we try to supply an empty value
20788       if test "x$LDD" = x; then
20789         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20790 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20791         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20792 $as_echo_n "checking for LDD... " >&6; }
20793         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20794 $as_echo "disabled" >&6; }
20795       else
20796         # Check if the provided tool contains a complete path.
20797         tool_specified="$LDD"
20798         tool_basename="${tool_specified##*/}"
20799         if test "x$tool_basename" = "x$tool_specified"; then
20800           # A command without a complete path is provided, search $PATH.
20801           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20802 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20803           # Extract the first word of "$tool_basename", so it can be a program name with args.
20804 set dummy $tool_basename; ac_word=$2
20805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20806 $as_echo_n "checking for $ac_word... " >&6; }
20807 if ${ac_cv_path_LDD+:} false; then :
20808   $as_echo_n "(cached) " >&6
20809 else
20810   case $LDD in
20811   [\\/]* | ?:[\\/]*)
20812   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20813   ;;
20814   *)
20815   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20816 for as_dir in $PATH
20817 do
20818   IFS=$as_save_IFS
20819   test -z "$as_dir" && as_dir=.
20820     for ac_exec_ext in '' $ac_executable_extensions; do
20821   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20822     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20823     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20824     break 2
20825   fi
20826 done
20827   done
20828 IFS=$as_save_IFS
20829 
20830   ;;
20831 esac
20832 fi
20833 LDD=$ac_cv_path_LDD
20834 if test -n "$LDD"; then
20835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20836 $as_echo "$LDD" >&6; }
20837 else
20838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20839 $as_echo "no" >&6; }
20840 fi
20841 
20842 
20843           if test "x$LDD" = x; then
20844             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20845           fi
20846         else
20847           # Otherwise we believe it is a complete path. Use it as it is.
20848           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20849 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20850           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20851 $as_echo_n "checking for LDD... " >&6; }
20852           if test ! -x "$tool_specified"; then
20853             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20854 $as_echo "not found" >&6; }
20855             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20856           fi
20857           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20858 $as_echo "$tool_specified" >&6; }
20859         fi
20860       fi
20861     fi
20862 
20863   fi
20864 
20865 
20866   if test "x$LDD" = "x"; then
20867     # List shared lib dependencies is used for
20868     # debug output and checking for forbidden dependencies.
20869     # We can build without it.
20870     LDD="true"
20871   fi
20872 
20873 
20874   # Publish this variable in the help.
20875 
20876 
20877   if [ -z "${OTOOL+x}" ]; then
20878     # The variable is not set by user, try to locate tool using the code snippet
20879     for ac_prog in otool
20880 do
20881   # Extract the first word of "$ac_prog", so it can be a program name with args.
20882 set dummy $ac_prog; ac_word=$2
20883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20884 $as_echo_n "checking for $ac_word... " >&6; }
20885 if ${ac_cv_path_OTOOL+:} false; then :
20886   $as_echo_n "(cached) " >&6
20887 else
20888   case $OTOOL in
20889   [\\/]* | ?:[\\/]*)
20890   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20891   ;;
20892   *)
20893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20894 for as_dir in $PATH
20895 do
20896   IFS=$as_save_IFS
20897   test -z "$as_dir" && as_dir=.
20898     for ac_exec_ext in '' $ac_executable_extensions; do
20899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20900     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20902     break 2
20903   fi
20904 done
20905   done
20906 IFS=$as_save_IFS
20907 
20908   ;;
20909 esac
20910 fi
20911 OTOOL=$ac_cv_path_OTOOL
20912 if test -n "$OTOOL"; then
20913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20914 $as_echo "$OTOOL" >&6; }
20915 else
20916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20917 $as_echo "no" >&6; }
20918 fi
20919 
20920 
20921   test -n "$OTOOL" && break
20922 done
20923 
20924   else
20925     # The variable is set, but is it from the command line or the environment?
20926 
20927     # Try to remove the string !OTOOL! from our list.
20928     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20929     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20930       # If it failed, the variable was not from the command line. Ignore it,
20931       # but warn the user (except for BASH, which is always set by the calling BASH).
20932       if test "xOTOOL" != xBASH; then
20933         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20934 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20935       fi
20936       # Try to locate tool using the code snippet
20937       for ac_prog in otool
20938 do
20939   # Extract the first word of "$ac_prog", so it can be a program name with args.
20940 set dummy $ac_prog; ac_word=$2
20941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20942 $as_echo_n "checking for $ac_word... " >&6; }
20943 if ${ac_cv_path_OTOOL+:} false; then :
20944   $as_echo_n "(cached) " >&6
20945 else
20946   case $OTOOL in
20947   [\\/]* | ?:[\\/]*)
20948   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20949   ;;
20950   *)
20951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20952 for as_dir in $PATH
20953 do
20954   IFS=$as_save_IFS
20955   test -z "$as_dir" && as_dir=.
20956     for ac_exec_ext in '' $ac_executable_extensions; do
20957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20958     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20960     break 2
20961   fi
20962 done
20963   done
20964 IFS=$as_save_IFS
20965 
20966   ;;
20967 esac
20968 fi
20969 OTOOL=$ac_cv_path_OTOOL
20970 if test -n "$OTOOL"; then
20971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20972 $as_echo "$OTOOL" >&6; }
20973 else
20974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20975 $as_echo "no" >&6; }
20976 fi
20977 
20978 
20979   test -n "$OTOOL" && break
20980 done
20981 
20982     else
20983       # If it succeeded, then it was overridden by the user. We will use it
20984       # for the tool.
20985 
20986       # First remove it from the list of overridden variables, so we can test
20987       # for unknown variables in the end.
20988       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20989 
20990       # Check if we try to supply an empty value
20991       if test "x$OTOOL" = x; then
20992         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20993 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20994         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20995 $as_echo_n "checking for OTOOL... " >&6; }
20996         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20997 $as_echo "disabled" >&6; }
20998       else
20999         # Check if the provided tool contains a complete path.
21000         tool_specified="$OTOOL"
21001         tool_basename="${tool_specified##*/}"
21002         if test "x$tool_basename" = "x$tool_specified"; then
21003           # A command without a complete path is provided, search $PATH.
21004           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21005 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21006           # Extract the first word of "$tool_basename", so it can be a program name with args.
21007 set dummy $tool_basename; ac_word=$2
21008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21009 $as_echo_n "checking for $ac_word... " >&6; }
21010 if ${ac_cv_path_OTOOL+:} false; then :
21011   $as_echo_n "(cached) " >&6
21012 else
21013   case $OTOOL in
21014   [\\/]* | ?:[\\/]*)
21015   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21016   ;;
21017   *)
21018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21019 for as_dir in $PATH
21020 do
21021   IFS=$as_save_IFS
21022   test -z "$as_dir" && as_dir=.
21023     for ac_exec_ext in '' $ac_executable_extensions; do
21024   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21025     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21027     break 2
21028   fi
21029 done
21030   done
21031 IFS=$as_save_IFS
21032 
21033   ;;
21034 esac
21035 fi
21036 OTOOL=$ac_cv_path_OTOOL
21037 if test -n "$OTOOL"; then
21038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21039 $as_echo "$OTOOL" >&6; }
21040 else
21041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21042 $as_echo "no" >&6; }
21043 fi
21044 
21045 
21046           if test "x$OTOOL" = x; then
21047             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21048           fi
21049         else
21050           # Otherwise we believe it is a complete path. Use it as it is.
21051           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21052 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21053           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21054 $as_echo_n "checking for OTOOL... " >&6; }
21055           if test ! -x "$tool_specified"; then
21056             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21057 $as_echo "not found" >&6; }
21058             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21059           fi
21060           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21061 $as_echo "$tool_specified" >&6; }
21062         fi
21063       fi
21064     fi
21065 
21066   fi
21067 
21068 
21069   if test "x$OTOOL" = "x"; then
21070     OTOOL="true"
21071   fi
21072 
21073 
21074   # Publish this variable in the help.
21075 
21076 
21077   if [ -z "${READELF+x}" ]; then
21078     # The variable is not set by user, try to locate tool using the code snippet
21079     for ac_prog in greadelf readelf
21080 do
21081   # Extract the first word of "$ac_prog", so it can be a program name with args.
21082 set dummy $ac_prog; ac_word=$2
21083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21084 $as_echo_n "checking for $ac_word... " >&6; }
21085 if ${ac_cv_path_READELF+:} false; then :
21086   $as_echo_n "(cached) " >&6
21087 else
21088   case $READELF in
21089   [\\/]* | ?:[\\/]*)
21090   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21091   ;;
21092   *)
21093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21094 for as_dir in $PATH
21095 do
21096   IFS=$as_save_IFS
21097   test -z "$as_dir" && as_dir=.
21098     for ac_exec_ext in '' $ac_executable_extensions; do
21099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21100     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21102     break 2
21103   fi
21104 done
21105   done
21106 IFS=$as_save_IFS
21107 
21108   ;;
21109 esac
21110 fi
21111 READELF=$ac_cv_path_READELF
21112 if test -n "$READELF"; then
21113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21114 $as_echo "$READELF" >&6; }
21115 else
21116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21117 $as_echo "no" >&6; }
21118 fi
21119 
21120 
21121   test -n "$READELF" && break
21122 done
21123 
21124   else
21125     # The variable is set, but is it from the command line or the environment?
21126 
21127     # Try to remove the string !READELF! from our list.
21128     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21129     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21130       # If it failed, the variable was not from the command line. Ignore it,
21131       # but warn the user (except for BASH, which is always set by the calling BASH).
21132       if test "xREADELF" != xBASH; then
21133         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21134 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21135       fi
21136       # Try to locate tool using the code snippet
21137       for ac_prog in greadelf readelf
21138 do
21139   # Extract the first word of "$ac_prog", so it can be a program name with args.
21140 set dummy $ac_prog; ac_word=$2
21141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21142 $as_echo_n "checking for $ac_word... " >&6; }
21143 if ${ac_cv_path_READELF+:} false; then :
21144   $as_echo_n "(cached) " >&6
21145 else
21146   case $READELF in
21147   [\\/]* | ?:[\\/]*)
21148   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21149   ;;
21150   *)
21151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21152 for as_dir in $PATH
21153 do
21154   IFS=$as_save_IFS
21155   test -z "$as_dir" && as_dir=.
21156     for ac_exec_ext in '' $ac_executable_extensions; do
21157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21158     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21160     break 2
21161   fi
21162 done
21163   done
21164 IFS=$as_save_IFS
21165 
21166   ;;
21167 esac
21168 fi
21169 READELF=$ac_cv_path_READELF
21170 if test -n "$READELF"; then
21171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21172 $as_echo "$READELF" >&6; }
21173 else
21174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21175 $as_echo "no" >&6; }
21176 fi
21177 
21178 
21179   test -n "$READELF" && break
21180 done
21181 
21182     else
21183       # If it succeeded, then it was overridden by the user. We will use it
21184       # for the tool.
21185 
21186       # First remove it from the list of overridden variables, so we can test
21187       # for unknown variables in the end.
21188       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21189 
21190       # Check if we try to supply an empty value
21191       if test "x$READELF" = x; then
21192         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21193 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21194         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21195 $as_echo_n "checking for READELF... " >&6; }
21196         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21197 $as_echo "disabled" >&6; }
21198       else
21199         # Check if the provided tool contains a complete path.
21200         tool_specified="$READELF"
21201         tool_basename="${tool_specified##*/}"
21202         if test "x$tool_basename" = "x$tool_specified"; then
21203           # A command without a complete path is provided, search $PATH.
21204           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21205 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21206           # Extract the first word of "$tool_basename", so it can be a program name with args.
21207 set dummy $tool_basename; ac_word=$2
21208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21209 $as_echo_n "checking for $ac_word... " >&6; }
21210 if ${ac_cv_path_READELF+:} false; then :
21211   $as_echo_n "(cached) " >&6
21212 else
21213   case $READELF in
21214   [\\/]* | ?:[\\/]*)
21215   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21216   ;;
21217   *)
21218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21219 for as_dir in $PATH
21220 do
21221   IFS=$as_save_IFS
21222   test -z "$as_dir" && as_dir=.
21223     for ac_exec_ext in '' $ac_executable_extensions; do
21224   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21225     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21227     break 2
21228   fi
21229 done
21230   done
21231 IFS=$as_save_IFS
21232 
21233   ;;
21234 esac
21235 fi
21236 READELF=$ac_cv_path_READELF
21237 if test -n "$READELF"; then
21238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21239 $as_echo "$READELF" >&6; }
21240 else
21241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21242 $as_echo "no" >&6; }
21243 fi
21244 
21245 
21246           if test "x$READELF" = x; then
21247             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21248           fi
21249         else
21250           # Otherwise we believe it is a complete path. Use it as it is.
21251           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21252 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21253           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21254 $as_echo_n "checking for READELF... " >&6; }
21255           if test ! -x "$tool_specified"; then
21256             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21257 $as_echo "not found" >&6; }
21258             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21259           fi
21260           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21261 $as_echo "$tool_specified" >&6; }
21262         fi
21263       fi
21264     fi
21265 
21266   fi
21267 
21268 
21269 
21270 
21271   # Publish this variable in the help.
21272 
21273 
21274   if [ -z "${HG+x}" ]; then
21275     # The variable is not set by user, try to locate tool using the code snippet
21276     for ac_prog in hg
21277 do
21278   # Extract the first word of "$ac_prog", so it can be a program name with args.
21279 set dummy $ac_prog; ac_word=$2
21280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21281 $as_echo_n "checking for $ac_word... " >&6; }
21282 if ${ac_cv_path_HG+:} false; then :
21283   $as_echo_n "(cached) " >&6
21284 else
21285   case $HG in
21286   [\\/]* | ?:[\\/]*)
21287   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21288   ;;
21289   *)
21290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21291 for as_dir in $PATH
21292 do
21293   IFS=$as_save_IFS
21294   test -z "$as_dir" && as_dir=.
21295     for ac_exec_ext in '' $ac_executable_extensions; do
21296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21297     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21299     break 2
21300   fi
21301 done
21302   done
21303 IFS=$as_save_IFS
21304 
21305   ;;
21306 esac
21307 fi
21308 HG=$ac_cv_path_HG
21309 if test -n "$HG"; then
21310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21311 $as_echo "$HG" >&6; }
21312 else
21313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21314 $as_echo "no" >&6; }
21315 fi
21316 
21317 
21318   test -n "$HG" && break
21319 done
21320 
21321   else
21322     # The variable is set, but is it from the command line or the environment?
21323 
21324     # Try to remove the string !HG! from our list.
21325     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21326     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21327       # If it failed, the variable was not from the command line. Ignore it,
21328       # but warn the user (except for BASH, which is always set by the calling BASH).
21329       if test "xHG" != xBASH; then
21330         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21331 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21332       fi
21333       # Try to locate tool using the code snippet
21334       for ac_prog in hg
21335 do
21336   # Extract the first word of "$ac_prog", so it can be a program name with args.
21337 set dummy $ac_prog; ac_word=$2
21338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21339 $as_echo_n "checking for $ac_word... " >&6; }
21340 if ${ac_cv_path_HG+:} false; then :
21341   $as_echo_n "(cached) " >&6
21342 else
21343   case $HG in
21344   [\\/]* | ?:[\\/]*)
21345   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21346   ;;
21347   *)
21348   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21349 for as_dir in $PATH
21350 do
21351   IFS=$as_save_IFS
21352   test -z "$as_dir" && as_dir=.
21353     for ac_exec_ext in '' $ac_executable_extensions; do
21354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21355     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21357     break 2
21358   fi
21359 done
21360   done
21361 IFS=$as_save_IFS
21362 
21363   ;;
21364 esac
21365 fi
21366 HG=$ac_cv_path_HG
21367 if test -n "$HG"; then
21368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21369 $as_echo "$HG" >&6; }
21370 else
21371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21372 $as_echo "no" >&6; }
21373 fi
21374 
21375 
21376   test -n "$HG" && break
21377 done
21378 
21379     else
21380       # If it succeeded, then it was overridden by the user. We will use it
21381       # for the tool.
21382 
21383       # First remove it from the list of overridden variables, so we can test
21384       # for unknown variables in the end.
21385       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21386 
21387       # Check if we try to supply an empty value
21388       if test "x$HG" = x; then
21389         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21390 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21391         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21392 $as_echo_n "checking for HG... " >&6; }
21393         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21394 $as_echo "disabled" >&6; }
21395       else
21396         # Check if the provided tool contains a complete path.
21397         tool_specified="$HG"
21398         tool_basename="${tool_specified##*/}"
21399         if test "x$tool_basename" = "x$tool_specified"; then
21400           # A command without a complete path is provided, search $PATH.
21401           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21402 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21403           # Extract the first word of "$tool_basename", so it can be a program name with args.
21404 set dummy $tool_basename; ac_word=$2
21405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21406 $as_echo_n "checking for $ac_word... " >&6; }
21407 if ${ac_cv_path_HG+:} false; then :
21408   $as_echo_n "(cached) " >&6
21409 else
21410   case $HG in
21411   [\\/]* | ?:[\\/]*)
21412   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21413   ;;
21414   *)
21415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21416 for as_dir in $PATH
21417 do
21418   IFS=$as_save_IFS
21419   test -z "$as_dir" && as_dir=.
21420     for ac_exec_ext in '' $ac_executable_extensions; do
21421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21422     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21424     break 2
21425   fi
21426 done
21427   done
21428 IFS=$as_save_IFS
21429 
21430   ;;
21431 esac
21432 fi
21433 HG=$ac_cv_path_HG
21434 if test -n "$HG"; then
21435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21436 $as_echo "$HG" >&6; }
21437 else
21438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21439 $as_echo "no" >&6; }
21440 fi
21441 
21442 
21443           if test "x$HG" = x; then
21444             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21445           fi
21446         else
21447           # Otherwise we believe it is a complete path. Use it as it is.
21448           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21449 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21450           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21451 $as_echo_n "checking for HG... " >&6; }
21452           if test ! -x "$tool_specified"; then
21453             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21454 $as_echo "not found" >&6; }
21455             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21456           fi
21457           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21458 $as_echo "$tool_specified" >&6; }
21459         fi
21460       fi
21461     fi
21462 
21463   fi
21464 
21465 
21466 
21467 
21468   # Publish this variable in the help.
21469 
21470 
21471   if [ -z "${STAT+x}" ]; then
21472     # The variable is not set by user, try to locate tool using the code snippet
21473     for ac_prog in stat
21474 do
21475   # Extract the first word of "$ac_prog", so it can be a program name with args.
21476 set dummy $ac_prog; ac_word=$2
21477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21478 $as_echo_n "checking for $ac_word... " >&6; }
21479 if ${ac_cv_path_STAT+:} false; then :
21480   $as_echo_n "(cached) " >&6
21481 else
21482   case $STAT in
21483   [\\/]* | ?:[\\/]*)
21484   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21485   ;;
21486   *)
21487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21488 for as_dir in $PATH
21489 do
21490   IFS=$as_save_IFS
21491   test -z "$as_dir" && as_dir=.
21492     for ac_exec_ext in '' $ac_executable_extensions; do
21493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21494     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21496     break 2
21497   fi
21498 done
21499   done
21500 IFS=$as_save_IFS
21501 
21502   ;;
21503 esac
21504 fi
21505 STAT=$ac_cv_path_STAT
21506 if test -n "$STAT"; then
21507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21508 $as_echo "$STAT" >&6; }
21509 else
21510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21511 $as_echo "no" >&6; }
21512 fi
21513 
21514 
21515   test -n "$STAT" && break
21516 done
21517 
21518   else
21519     # The variable is set, but is it from the command line or the environment?
21520 
21521     # Try to remove the string !STAT! from our list.
21522     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21523     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21524       # If it failed, the variable was not from the command line. Ignore it,
21525       # but warn the user (except for BASH, which is always set by the calling BASH).
21526       if test "xSTAT" != xBASH; then
21527         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21528 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21529       fi
21530       # Try to locate tool using the code snippet
21531       for ac_prog in stat
21532 do
21533   # Extract the first word of "$ac_prog", so it can be a program name with args.
21534 set dummy $ac_prog; ac_word=$2
21535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21536 $as_echo_n "checking for $ac_word... " >&6; }
21537 if ${ac_cv_path_STAT+:} false; then :
21538   $as_echo_n "(cached) " >&6
21539 else
21540   case $STAT in
21541   [\\/]* | ?:[\\/]*)
21542   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21543   ;;
21544   *)
21545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21546 for as_dir in $PATH
21547 do
21548   IFS=$as_save_IFS
21549   test -z "$as_dir" && as_dir=.
21550     for ac_exec_ext in '' $ac_executable_extensions; do
21551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21552     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21554     break 2
21555   fi
21556 done
21557   done
21558 IFS=$as_save_IFS
21559 
21560   ;;
21561 esac
21562 fi
21563 STAT=$ac_cv_path_STAT
21564 if test -n "$STAT"; then
21565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21566 $as_echo "$STAT" >&6; }
21567 else
21568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21569 $as_echo "no" >&6; }
21570 fi
21571 
21572 
21573   test -n "$STAT" && break
21574 done
21575 
21576     else
21577       # If it succeeded, then it was overridden by the user. We will use it
21578       # for the tool.
21579 
21580       # First remove it from the list of overridden variables, so we can test
21581       # for unknown variables in the end.
21582       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21583 
21584       # Check if we try to supply an empty value
21585       if test "x$STAT" = x; then
21586         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21587 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21588         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21589 $as_echo_n "checking for STAT... " >&6; }
21590         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21591 $as_echo "disabled" >&6; }
21592       else
21593         # Check if the provided tool contains a complete path.
21594         tool_specified="$STAT"
21595         tool_basename="${tool_specified##*/}"
21596         if test "x$tool_basename" = "x$tool_specified"; then
21597           # A command without a complete path is provided, search $PATH.
21598           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21599 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21600           # Extract the first word of "$tool_basename", so it can be a program name with args.
21601 set dummy $tool_basename; ac_word=$2
21602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21603 $as_echo_n "checking for $ac_word... " >&6; }
21604 if ${ac_cv_path_STAT+:} false; then :
21605   $as_echo_n "(cached) " >&6
21606 else
21607   case $STAT in
21608   [\\/]* | ?:[\\/]*)
21609   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21610   ;;
21611   *)
21612   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21613 for as_dir in $PATH
21614 do
21615   IFS=$as_save_IFS
21616   test -z "$as_dir" && as_dir=.
21617     for ac_exec_ext in '' $ac_executable_extensions; do
21618   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21619     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21620     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21621     break 2
21622   fi
21623 done
21624   done
21625 IFS=$as_save_IFS
21626 
21627   ;;
21628 esac
21629 fi
21630 STAT=$ac_cv_path_STAT
21631 if test -n "$STAT"; then
21632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21633 $as_echo "$STAT" >&6; }
21634 else
21635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21636 $as_echo "no" >&6; }
21637 fi
21638 
21639 
21640           if test "x$STAT" = x; then
21641             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21642           fi
21643         else
21644           # Otherwise we believe it is a complete path. Use it as it is.
21645           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21646 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21647           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21648 $as_echo_n "checking for STAT... " >&6; }
21649           if test ! -x "$tool_specified"; then
21650             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21651 $as_echo "not found" >&6; }
21652             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21653           fi
21654           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21655 $as_echo "$tool_specified" >&6; }
21656         fi
21657       fi
21658     fi
21659 
21660   fi
21661 
21662 
21663 
21664 
21665   # Publish this variable in the help.
21666 
21667 
21668   if [ -z "${TIME+x}" ]; then
21669     # The variable is not set by user, try to locate tool using the code snippet
21670     for ac_prog in time
21671 do
21672   # Extract the first word of "$ac_prog", so it can be a program name with args.
21673 set dummy $ac_prog; ac_word=$2
21674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21675 $as_echo_n "checking for $ac_word... " >&6; }
21676 if ${ac_cv_path_TIME+:} false; then :
21677   $as_echo_n "(cached) " >&6
21678 else
21679   case $TIME in
21680   [\\/]* | ?:[\\/]*)
21681   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21682   ;;
21683   *)
21684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21685 for as_dir in $PATH
21686 do
21687   IFS=$as_save_IFS
21688   test -z "$as_dir" && as_dir=.
21689     for ac_exec_ext in '' $ac_executable_extensions; do
21690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21691     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21693     break 2
21694   fi
21695 done
21696   done
21697 IFS=$as_save_IFS
21698 
21699   ;;
21700 esac
21701 fi
21702 TIME=$ac_cv_path_TIME
21703 if test -n "$TIME"; then
21704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21705 $as_echo "$TIME" >&6; }
21706 else
21707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21708 $as_echo "no" >&6; }
21709 fi
21710 
21711 
21712   test -n "$TIME" && break
21713 done
21714 
21715   else
21716     # The variable is set, but is it from the command line or the environment?
21717 
21718     # Try to remove the string !TIME! from our list.
21719     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21720     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21721       # If it failed, the variable was not from the command line. Ignore it,
21722       # but warn the user (except for BASH, which is always set by the calling BASH).
21723       if test "xTIME" != xBASH; then
21724         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21725 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21726       fi
21727       # Try to locate tool using the code snippet
21728       for ac_prog in time
21729 do
21730   # Extract the first word of "$ac_prog", so it can be a program name with args.
21731 set dummy $ac_prog; ac_word=$2
21732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21733 $as_echo_n "checking for $ac_word... " >&6; }
21734 if ${ac_cv_path_TIME+:} false; then :
21735   $as_echo_n "(cached) " >&6
21736 else
21737   case $TIME in
21738   [\\/]* | ?:[\\/]*)
21739   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21740   ;;
21741   *)
21742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21743 for as_dir in $PATH
21744 do
21745   IFS=$as_save_IFS
21746   test -z "$as_dir" && as_dir=.
21747     for ac_exec_ext in '' $ac_executable_extensions; do
21748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21749     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21751     break 2
21752   fi
21753 done
21754   done
21755 IFS=$as_save_IFS
21756 
21757   ;;
21758 esac
21759 fi
21760 TIME=$ac_cv_path_TIME
21761 if test -n "$TIME"; then
21762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21763 $as_echo "$TIME" >&6; }
21764 else
21765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21766 $as_echo "no" >&6; }
21767 fi
21768 
21769 
21770   test -n "$TIME" && break
21771 done
21772 
21773     else
21774       # If it succeeded, then it was overridden by the user. We will use it
21775       # for the tool.
21776 
21777       # First remove it from the list of overridden variables, so we can test
21778       # for unknown variables in the end.
21779       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21780 
21781       # Check if we try to supply an empty value
21782       if test "x$TIME" = x; then
21783         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21784 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21785         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21786 $as_echo_n "checking for TIME... " >&6; }
21787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21788 $as_echo "disabled" >&6; }
21789       else
21790         # Check if the provided tool contains a complete path.
21791         tool_specified="$TIME"
21792         tool_basename="${tool_specified##*/}"
21793         if test "x$tool_basename" = "x$tool_specified"; then
21794           # A command without a complete path is provided, search $PATH.
21795           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21796 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21797           # Extract the first word of "$tool_basename", so it can be a program name with args.
21798 set dummy $tool_basename; ac_word=$2
21799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21800 $as_echo_n "checking for $ac_word... " >&6; }
21801 if ${ac_cv_path_TIME+:} false; then :
21802   $as_echo_n "(cached) " >&6
21803 else
21804   case $TIME in
21805   [\\/]* | ?:[\\/]*)
21806   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21807   ;;
21808   *)
21809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21810 for as_dir in $PATH
21811 do
21812   IFS=$as_save_IFS
21813   test -z "$as_dir" && as_dir=.
21814     for ac_exec_ext in '' $ac_executable_extensions; do
21815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21816     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21818     break 2
21819   fi
21820 done
21821   done
21822 IFS=$as_save_IFS
21823 
21824   ;;
21825 esac
21826 fi
21827 TIME=$ac_cv_path_TIME
21828 if test -n "$TIME"; then
21829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21830 $as_echo "$TIME" >&6; }
21831 else
21832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21833 $as_echo "no" >&6; }
21834 fi
21835 
21836 
21837           if test "x$TIME" = x; then
21838             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21839           fi
21840         else
21841           # Otherwise we believe it is a complete path. Use it as it is.
21842           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21843 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21844           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21845 $as_echo_n "checking for TIME... " >&6; }
21846           if test ! -x "$tool_specified"; then
21847             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21848 $as_echo "not found" >&6; }
21849             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21850           fi
21851           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21852 $as_echo "$tool_specified" >&6; }
21853         fi
21854       fi
21855     fi
21856 
21857   fi
21858 
21859 
21860 
21861 
21862   # Publish this variable in the help.
21863 
21864 
21865   if [ -z "${PATCH+x}" ]; then
21866     # The variable is not set by user, try to locate tool using the code snippet
21867     for ac_prog in gpatch patch
21868 do
21869   # Extract the first word of "$ac_prog", so it can be a program name with args.
21870 set dummy $ac_prog; ac_word=$2
21871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21872 $as_echo_n "checking for $ac_word... " >&6; }
21873 if ${ac_cv_path_PATCH+:} false; then :
21874   $as_echo_n "(cached) " >&6
21875 else
21876   case $PATCH in
21877   [\\/]* | ?:[\\/]*)
21878   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21879   ;;
21880   *)
21881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21882 for as_dir in $PATH
21883 do
21884   IFS=$as_save_IFS
21885   test -z "$as_dir" && as_dir=.
21886     for ac_exec_ext in '' $ac_executable_extensions; do
21887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21888     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21890     break 2
21891   fi
21892 done
21893   done
21894 IFS=$as_save_IFS
21895 
21896   ;;
21897 esac
21898 fi
21899 PATCH=$ac_cv_path_PATCH
21900 if test -n "$PATCH"; then
21901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21902 $as_echo "$PATCH" >&6; }
21903 else
21904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21905 $as_echo "no" >&6; }
21906 fi
21907 
21908 
21909   test -n "$PATCH" && break
21910 done
21911 
21912   else
21913     # The variable is set, but is it from the command line or the environment?
21914 
21915     # Try to remove the string !PATCH! from our list.
21916     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21917     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21918       # If it failed, the variable was not from the command line. Ignore it,
21919       # but warn the user (except for BASH, which is always set by the calling BASH).
21920       if test "xPATCH" != xBASH; then
21921         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21922 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21923       fi
21924       # Try to locate tool using the code snippet
21925       for ac_prog in gpatch patch
21926 do
21927   # Extract the first word of "$ac_prog", so it can be a program name with args.
21928 set dummy $ac_prog; ac_word=$2
21929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21930 $as_echo_n "checking for $ac_word... " >&6; }
21931 if ${ac_cv_path_PATCH+:} false; then :
21932   $as_echo_n "(cached) " >&6
21933 else
21934   case $PATCH in
21935   [\\/]* | ?:[\\/]*)
21936   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21937   ;;
21938   *)
21939   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21940 for as_dir in $PATH
21941 do
21942   IFS=$as_save_IFS
21943   test -z "$as_dir" && as_dir=.
21944     for ac_exec_ext in '' $ac_executable_extensions; do
21945   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21946     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21947     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21948     break 2
21949   fi
21950 done
21951   done
21952 IFS=$as_save_IFS
21953 
21954   ;;
21955 esac
21956 fi
21957 PATCH=$ac_cv_path_PATCH
21958 if test -n "$PATCH"; then
21959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21960 $as_echo "$PATCH" >&6; }
21961 else
21962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21963 $as_echo "no" >&6; }
21964 fi
21965 
21966 
21967   test -n "$PATCH" && break
21968 done
21969 
21970     else
21971       # If it succeeded, then it was overridden by the user. We will use it
21972       # for the tool.
21973 
21974       # First remove it from the list of overridden variables, so we can test
21975       # for unknown variables in the end.
21976       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21977 
21978       # Check if we try to supply an empty value
21979       if test "x$PATCH" = x; then
21980         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21981 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21982         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21983 $as_echo_n "checking for PATCH... " >&6; }
21984         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21985 $as_echo "disabled" >&6; }
21986       else
21987         # Check if the provided tool contains a complete path.
21988         tool_specified="$PATCH"
21989         tool_basename="${tool_specified##*/}"
21990         if test "x$tool_basename" = "x$tool_specified"; then
21991           # A command without a complete path is provided, search $PATH.
21992           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21993 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21994           # Extract the first word of "$tool_basename", so it can be a program name with args.
21995 set dummy $tool_basename; ac_word=$2
21996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21997 $as_echo_n "checking for $ac_word... " >&6; }
21998 if ${ac_cv_path_PATCH+:} false; then :
21999   $as_echo_n "(cached) " >&6
22000 else
22001   case $PATCH in
22002   [\\/]* | ?:[\\/]*)
22003   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22004   ;;
22005   *)
22006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22007 for as_dir in $PATH
22008 do
22009   IFS=$as_save_IFS
22010   test -z "$as_dir" && as_dir=.
22011     for ac_exec_ext in '' $ac_executable_extensions; do
22012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22013     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22015     break 2
22016   fi
22017 done
22018   done
22019 IFS=$as_save_IFS
22020 
22021   ;;
22022 esac
22023 fi
22024 PATCH=$ac_cv_path_PATCH
22025 if test -n "$PATCH"; then
22026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22027 $as_echo "$PATCH" >&6; }
22028 else
22029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22030 $as_echo "no" >&6; }
22031 fi
22032 
22033 
22034           if test "x$PATCH" = x; then
22035             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22036           fi
22037         else
22038           # Otherwise we believe it is a complete path. Use it as it is.
22039           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22040 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22041           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22042 $as_echo_n "checking for PATCH... " >&6; }
22043           if test ! -x "$tool_specified"; then
22044             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22045 $as_echo "not found" >&6; }
22046             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22047           fi
22048           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22049 $as_echo "$tool_specified" >&6; }
22050         fi
22051       fi
22052     fi
22053 
22054   fi
22055 
22056 
22057   # Check if it's GNU time
22058   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22059   if test "x$IS_GNU_TIME" != x; then
22060     IS_GNU_TIME=yes
22061   else
22062     IS_GNU_TIME=no
22063   fi
22064 
22065 
22066   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22067 
22068 
22069 
22070   # Publish this variable in the help.
22071 
22072 
22073   if [ -z "${DSYMUTIL+x}" ]; then
22074     # The variable is not set by user, try to locate tool using the code snippet
22075     for ac_prog in dsymutil
22076 do
22077   # Extract the first word of "$ac_prog", so it can be a program name with args.
22078 set dummy $ac_prog; ac_word=$2
22079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22080 $as_echo_n "checking for $ac_word... " >&6; }
22081 if ${ac_cv_path_DSYMUTIL+:} false; then :
22082   $as_echo_n "(cached) " >&6
22083 else
22084   case $DSYMUTIL in
22085   [\\/]* | ?:[\\/]*)
22086   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22087   ;;
22088   *)
22089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22090 for as_dir in $PATH
22091 do
22092   IFS=$as_save_IFS
22093   test -z "$as_dir" && as_dir=.
22094     for ac_exec_ext in '' $ac_executable_extensions; do
22095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22096     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22098     break 2
22099   fi
22100 done
22101   done
22102 IFS=$as_save_IFS
22103 
22104   ;;
22105 esac
22106 fi
22107 DSYMUTIL=$ac_cv_path_DSYMUTIL
22108 if test -n "$DSYMUTIL"; then
22109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22110 $as_echo "$DSYMUTIL" >&6; }
22111 else
22112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22113 $as_echo "no" >&6; }
22114 fi
22115 
22116 
22117   test -n "$DSYMUTIL" && break
22118 done
22119 
22120   else
22121     # The variable is set, but is it from the command line or the environment?
22122 
22123     # Try to remove the string !DSYMUTIL! from our list.
22124     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22125     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22126       # If it failed, the variable was not from the command line. Ignore it,
22127       # but warn the user (except for BASH, which is always set by the calling BASH).
22128       if test "xDSYMUTIL" != xBASH; then
22129         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22130 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22131       fi
22132       # Try to locate tool using the code snippet
22133       for ac_prog in dsymutil
22134 do
22135   # Extract the first word of "$ac_prog", so it can be a program name with args.
22136 set dummy $ac_prog; ac_word=$2
22137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22138 $as_echo_n "checking for $ac_word... " >&6; }
22139 if ${ac_cv_path_DSYMUTIL+:} false; then :
22140   $as_echo_n "(cached) " >&6
22141 else
22142   case $DSYMUTIL in
22143   [\\/]* | ?:[\\/]*)
22144   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22145   ;;
22146   *)
22147   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22148 for as_dir in $PATH
22149 do
22150   IFS=$as_save_IFS
22151   test -z "$as_dir" && as_dir=.
22152     for ac_exec_ext in '' $ac_executable_extensions; do
22153   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22154     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22155     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22156     break 2
22157   fi
22158 done
22159   done
22160 IFS=$as_save_IFS
22161 
22162   ;;
22163 esac
22164 fi
22165 DSYMUTIL=$ac_cv_path_DSYMUTIL
22166 if test -n "$DSYMUTIL"; then
22167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22168 $as_echo "$DSYMUTIL" >&6; }
22169 else
22170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22171 $as_echo "no" >&6; }
22172 fi
22173 
22174 
22175   test -n "$DSYMUTIL" && break
22176 done
22177 
22178     else
22179       # If it succeeded, then it was overridden by the user. We will use it
22180       # for the tool.
22181 
22182       # First remove it from the list of overridden variables, so we can test
22183       # for unknown variables in the end.
22184       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22185 
22186       # Check if we try to supply an empty value
22187       if test "x$DSYMUTIL" = x; then
22188         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22189 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22190         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22191 $as_echo_n "checking for DSYMUTIL... " >&6; }
22192         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22193 $as_echo "disabled" >&6; }
22194       else
22195         # Check if the provided tool contains a complete path.
22196         tool_specified="$DSYMUTIL"
22197         tool_basename="${tool_specified##*/}"
22198         if test "x$tool_basename" = "x$tool_specified"; then
22199           # A command without a complete path is provided, search $PATH.
22200           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22201 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22202           # Extract the first word of "$tool_basename", so it can be a program name with args.
22203 set dummy $tool_basename; ac_word=$2
22204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22205 $as_echo_n "checking for $ac_word... " >&6; }
22206 if ${ac_cv_path_DSYMUTIL+:} false; then :
22207   $as_echo_n "(cached) " >&6
22208 else
22209   case $DSYMUTIL in
22210   [\\/]* | ?:[\\/]*)
22211   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22212   ;;
22213   *)
22214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22215 for as_dir in $PATH
22216 do
22217   IFS=$as_save_IFS
22218   test -z "$as_dir" && as_dir=.
22219     for ac_exec_ext in '' $ac_executable_extensions; do
22220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22221     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22223     break 2
22224   fi
22225 done
22226   done
22227 IFS=$as_save_IFS
22228 
22229   ;;
22230 esac
22231 fi
22232 DSYMUTIL=$ac_cv_path_DSYMUTIL
22233 if test -n "$DSYMUTIL"; then
22234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22235 $as_echo "$DSYMUTIL" >&6; }
22236 else
22237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22238 $as_echo "no" >&6; }
22239 fi
22240 
22241 
22242           if test "x$DSYMUTIL" = x; then
22243             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22244           fi
22245         else
22246           # Otherwise we believe it is a complete path. Use it as it is.
22247           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22248 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22249           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22250 $as_echo_n "checking for DSYMUTIL... " >&6; }
22251           if test ! -x "$tool_specified"; then
22252             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22253 $as_echo "not found" >&6; }
22254             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22255           fi
22256           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22257 $as_echo "$tool_specified" >&6; }
22258         fi
22259       fi
22260     fi
22261 
22262   fi
22263 
22264 
22265 
22266   if test "x$DSYMUTIL" = x; then
22267     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22268   fi
22269 
22270 
22271 
22272 
22273 
22274   # Publish this variable in the help.
22275 
22276 
22277   if [ -z "${XATTR+x}" ]; then
22278     # The variable is not set by user, try to locate tool using the code snippet
22279     for ac_prog in xattr
22280 do
22281   # Extract the first word of "$ac_prog", so it can be a program name with args.
22282 set dummy $ac_prog; ac_word=$2
22283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22284 $as_echo_n "checking for $ac_word... " >&6; }
22285 if ${ac_cv_path_XATTR+:} false; then :
22286   $as_echo_n "(cached) " >&6
22287 else
22288   case $XATTR in
22289   [\\/]* | ?:[\\/]*)
22290   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22291   ;;
22292   *)
22293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22294 for as_dir in $PATH
22295 do
22296   IFS=$as_save_IFS
22297   test -z "$as_dir" && as_dir=.
22298     for ac_exec_ext in '' $ac_executable_extensions; do
22299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22300     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22302     break 2
22303   fi
22304 done
22305   done
22306 IFS=$as_save_IFS
22307 
22308   ;;
22309 esac
22310 fi
22311 XATTR=$ac_cv_path_XATTR
22312 if test -n "$XATTR"; then
22313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22314 $as_echo "$XATTR" >&6; }
22315 else
22316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22317 $as_echo "no" >&6; }
22318 fi
22319 
22320 
22321   test -n "$XATTR" && break
22322 done
22323 
22324   else
22325     # The variable is set, but is it from the command line or the environment?
22326 
22327     # Try to remove the string !XATTR! from our list.
22328     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22329     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22330       # If it failed, the variable was not from the command line. Ignore it,
22331       # but warn the user (except for BASH, which is always set by the calling BASH).
22332       if test "xXATTR" != xBASH; then
22333         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22334 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22335       fi
22336       # Try to locate tool using the code snippet
22337       for ac_prog in xattr
22338 do
22339   # Extract the first word of "$ac_prog", so it can be a program name with args.
22340 set dummy $ac_prog; ac_word=$2
22341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22342 $as_echo_n "checking for $ac_word... " >&6; }
22343 if ${ac_cv_path_XATTR+:} false; then :
22344   $as_echo_n "(cached) " >&6
22345 else
22346   case $XATTR in
22347   [\\/]* | ?:[\\/]*)
22348   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22349   ;;
22350   *)
22351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22352 for as_dir in $PATH
22353 do
22354   IFS=$as_save_IFS
22355   test -z "$as_dir" && as_dir=.
22356     for ac_exec_ext in '' $ac_executable_extensions; do
22357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22358     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22360     break 2
22361   fi
22362 done
22363   done
22364 IFS=$as_save_IFS
22365 
22366   ;;
22367 esac
22368 fi
22369 XATTR=$ac_cv_path_XATTR
22370 if test -n "$XATTR"; then
22371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22372 $as_echo "$XATTR" >&6; }
22373 else
22374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22375 $as_echo "no" >&6; }
22376 fi
22377 
22378 
22379   test -n "$XATTR" && break
22380 done
22381 
22382     else
22383       # If it succeeded, then it was overridden by the user. We will use it
22384       # for the tool.
22385 
22386       # First remove it from the list of overridden variables, so we can test
22387       # for unknown variables in the end.
22388       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22389 
22390       # Check if we try to supply an empty value
22391       if test "x$XATTR" = x; then
22392         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22393 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22394         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22395 $as_echo_n "checking for XATTR... " >&6; }
22396         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22397 $as_echo "disabled" >&6; }
22398       else
22399         # Check if the provided tool contains a complete path.
22400         tool_specified="$XATTR"
22401         tool_basename="${tool_specified##*/}"
22402         if test "x$tool_basename" = "x$tool_specified"; then
22403           # A command without a complete path is provided, search $PATH.
22404           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22405 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22406           # Extract the first word of "$tool_basename", so it can be a program name with args.
22407 set dummy $tool_basename; ac_word=$2
22408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22409 $as_echo_n "checking for $ac_word... " >&6; }
22410 if ${ac_cv_path_XATTR+:} false; then :
22411   $as_echo_n "(cached) " >&6
22412 else
22413   case $XATTR in
22414   [\\/]* | ?:[\\/]*)
22415   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22416   ;;
22417   *)
22418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22419 for as_dir in $PATH
22420 do
22421   IFS=$as_save_IFS
22422   test -z "$as_dir" && as_dir=.
22423     for ac_exec_ext in '' $ac_executable_extensions; do
22424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22425     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22426     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22427     break 2
22428   fi
22429 done
22430   done
22431 IFS=$as_save_IFS
22432 
22433   ;;
22434 esac
22435 fi
22436 XATTR=$ac_cv_path_XATTR
22437 if test -n "$XATTR"; then
22438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22439 $as_echo "$XATTR" >&6; }
22440 else
22441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22442 $as_echo "no" >&6; }
22443 fi
22444 
22445 
22446           if test "x$XATTR" = x; then
22447             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22448           fi
22449         else
22450           # Otherwise we believe it is a complete path. Use it as it is.
22451           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22452 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22453           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22454 $as_echo_n "checking for XATTR... " >&6; }
22455           if test ! -x "$tool_specified"; then
22456             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22457 $as_echo "not found" >&6; }
22458             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22459           fi
22460           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22461 $as_echo "$tool_specified" >&6; }
22462         fi
22463       fi
22464     fi
22465 
22466   fi
22467 
22468 
22469 
22470   if test "x$XATTR" = x; then
22471     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22472   fi
22473 
22474 
22475 
22476 
22477   # Publish this variable in the help.
22478 
22479 
22480   if [ -z "${CODESIGN+x}" ]; then
22481     # The variable is not set by user, try to locate tool using the code snippet
22482     for ac_prog in codesign
22483 do
22484   # Extract the first word of "$ac_prog", so it can be a program name with args.
22485 set dummy $ac_prog; ac_word=$2
22486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22487 $as_echo_n "checking for $ac_word... " >&6; }
22488 if ${ac_cv_path_CODESIGN+:} false; then :
22489   $as_echo_n "(cached) " >&6
22490 else
22491   case $CODESIGN in
22492   [\\/]* | ?:[\\/]*)
22493   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22494   ;;
22495   *)
22496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22497 for as_dir in $PATH
22498 do
22499   IFS=$as_save_IFS
22500   test -z "$as_dir" && as_dir=.
22501     for ac_exec_ext in '' $ac_executable_extensions; do
22502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22503     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22505     break 2
22506   fi
22507 done
22508   done
22509 IFS=$as_save_IFS
22510 
22511   ;;
22512 esac
22513 fi
22514 CODESIGN=$ac_cv_path_CODESIGN
22515 if test -n "$CODESIGN"; then
22516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22517 $as_echo "$CODESIGN" >&6; }
22518 else
22519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22520 $as_echo "no" >&6; }
22521 fi
22522 
22523 
22524   test -n "$CODESIGN" && break
22525 done
22526 
22527   else
22528     # The variable is set, but is it from the command line or the environment?
22529 
22530     # Try to remove the string !CODESIGN! from our list.
22531     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22532     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22533       # If it failed, the variable was not from the command line. Ignore it,
22534       # but warn the user (except for BASH, which is always set by the calling BASH).
22535       if test "xCODESIGN" != xBASH; then
22536         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22537 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22538       fi
22539       # Try to locate tool using the code snippet
22540       for ac_prog in codesign
22541 do
22542   # Extract the first word of "$ac_prog", so it can be a program name with args.
22543 set dummy $ac_prog; ac_word=$2
22544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22545 $as_echo_n "checking for $ac_word... " >&6; }
22546 if ${ac_cv_path_CODESIGN+:} false; then :
22547   $as_echo_n "(cached) " >&6
22548 else
22549   case $CODESIGN in
22550   [\\/]* | ?:[\\/]*)
22551   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22552   ;;
22553   *)
22554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22555 for as_dir in $PATH
22556 do
22557   IFS=$as_save_IFS
22558   test -z "$as_dir" && as_dir=.
22559     for ac_exec_ext in '' $ac_executable_extensions; do
22560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22561     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22563     break 2
22564   fi
22565 done
22566   done
22567 IFS=$as_save_IFS
22568 
22569   ;;
22570 esac
22571 fi
22572 CODESIGN=$ac_cv_path_CODESIGN
22573 if test -n "$CODESIGN"; then
22574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22575 $as_echo "$CODESIGN" >&6; }
22576 else
22577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22578 $as_echo "no" >&6; }
22579 fi
22580 
22581 
22582   test -n "$CODESIGN" && break
22583 done
22584 
22585     else
22586       # If it succeeded, then it was overridden by the user. We will use it
22587       # for the tool.
22588 
22589       # First remove it from the list of overridden variables, so we can test
22590       # for unknown variables in the end.
22591       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22592 
22593       # Check if we try to supply an empty value
22594       if test "x$CODESIGN" = x; then
22595         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22596 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22597         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22598 $as_echo_n "checking for CODESIGN... " >&6; }
22599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22600 $as_echo "disabled" >&6; }
22601       else
22602         # Check if the provided tool contains a complete path.
22603         tool_specified="$CODESIGN"
22604         tool_basename="${tool_specified##*/}"
22605         if test "x$tool_basename" = "x$tool_specified"; then
22606           # A command without a complete path is provided, search $PATH.
22607           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22608 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22609           # Extract the first word of "$tool_basename", so it can be a program name with args.
22610 set dummy $tool_basename; ac_word=$2
22611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22612 $as_echo_n "checking for $ac_word... " >&6; }
22613 if ${ac_cv_path_CODESIGN+:} false; then :
22614   $as_echo_n "(cached) " >&6
22615 else
22616   case $CODESIGN in
22617   [\\/]* | ?:[\\/]*)
22618   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22619   ;;
22620   *)
22621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22622 for as_dir in $PATH
22623 do
22624   IFS=$as_save_IFS
22625   test -z "$as_dir" && as_dir=.
22626     for ac_exec_ext in '' $ac_executable_extensions; do
22627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22628     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22630     break 2
22631   fi
22632 done
22633   done
22634 IFS=$as_save_IFS
22635 
22636   ;;
22637 esac
22638 fi
22639 CODESIGN=$ac_cv_path_CODESIGN
22640 if test -n "$CODESIGN"; then
22641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22642 $as_echo "$CODESIGN" >&6; }
22643 else
22644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22645 $as_echo "no" >&6; }
22646 fi
22647 
22648 
22649           if test "x$CODESIGN" = x; then
22650             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22651           fi
22652         else
22653           # Otherwise we believe it is a complete path. Use it as it is.
22654           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22655 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22656           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22657 $as_echo_n "checking for CODESIGN... " >&6; }
22658           if test ! -x "$tool_specified"; then
22659             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22660 $as_echo "not found" >&6; }
22661             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22662           fi
22663           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22664 $as_echo "$tool_specified" >&6; }
22665         fi
22666       fi
22667     fi
22668 
22669   fi
22670 
22671 
22672     if test "x$CODESIGN" != "x"; then
22673       # Verify that the openjdk_codesign certificate is present
22674       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22675 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22676       rm -f codesign-testfile
22677       touch codesign-testfile
22678       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22679       rm -f codesign-testfile
22680       if test "x$CODESIGN" = x; then
22681         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22682 $as_echo "no" >&6; }
22683       else
22684         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22685 $as_echo "yes" >&6; }
22686       fi
22687     fi
22688 
22689 
22690 
22691   # Publish this variable in the help.
22692 
22693 
22694   if [ -z "${SETFILE+x}" ]; then
22695     # The variable is not set by user, try to locate tool using the code snippet
22696     for ac_prog in SetFile
22697 do
22698   # Extract the first word of "$ac_prog", so it can be a program name with args.
22699 set dummy $ac_prog; ac_word=$2
22700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22701 $as_echo_n "checking for $ac_word... " >&6; }
22702 if ${ac_cv_path_SETFILE+:} false; then :
22703   $as_echo_n "(cached) " >&6
22704 else
22705   case $SETFILE in
22706   [\\/]* | ?:[\\/]*)
22707   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22708   ;;
22709   *)
22710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22711 for as_dir in $PATH
22712 do
22713   IFS=$as_save_IFS
22714   test -z "$as_dir" && as_dir=.
22715     for ac_exec_ext in '' $ac_executable_extensions; do
22716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22717     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22719     break 2
22720   fi
22721 done
22722   done
22723 IFS=$as_save_IFS
22724 
22725   ;;
22726 esac
22727 fi
22728 SETFILE=$ac_cv_path_SETFILE
22729 if test -n "$SETFILE"; then
22730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22731 $as_echo "$SETFILE" >&6; }
22732 else
22733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22734 $as_echo "no" >&6; }
22735 fi
22736 
22737 
22738   test -n "$SETFILE" && break
22739 done
22740 
22741   else
22742     # The variable is set, but is it from the command line or the environment?
22743 
22744     # Try to remove the string !SETFILE! from our list.
22745     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22746     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22747       # If it failed, the variable was not from the command line. Ignore it,
22748       # but warn the user (except for BASH, which is always set by the calling BASH).
22749       if test "xSETFILE" != xBASH; then
22750         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22751 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22752       fi
22753       # Try to locate tool using the code snippet
22754       for ac_prog in SetFile
22755 do
22756   # Extract the first word of "$ac_prog", so it can be a program name with args.
22757 set dummy $ac_prog; ac_word=$2
22758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22759 $as_echo_n "checking for $ac_word... " >&6; }
22760 if ${ac_cv_path_SETFILE+:} false; then :
22761   $as_echo_n "(cached) " >&6
22762 else
22763   case $SETFILE in
22764   [\\/]* | ?:[\\/]*)
22765   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22766   ;;
22767   *)
22768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22769 for as_dir in $PATH
22770 do
22771   IFS=$as_save_IFS
22772   test -z "$as_dir" && as_dir=.
22773     for ac_exec_ext in '' $ac_executable_extensions; do
22774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22775     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22777     break 2
22778   fi
22779 done
22780   done
22781 IFS=$as_save_IFS
22782 
22783   ;;
22784 esac
22785 fi
22786 SETFILE=$ac_cv_path_SETFILE
22787 if test -n "$SETFILE"; then
22788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22789 $as_echo "$SETFILE" >&6; }
22790 else
22791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22792 $as_echo "no" >&6; }
22793 fi
22794 
22795 
22796   test -n "$SETFILE" && break
22797 done
22798 
22799     else
22800       # If it succeeded, then it was overridden by the user. We will use it
22801       # for the tool.
22802 
22803       # First remove it from the list of overridden variables, so we can test
22804       # for unknown variables in the end.
22805       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22806 
22807       # Check if we try to supply an empty value
22808       if test "x$SETFILE" = x; then
22809         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22810 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22811         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22812 $as_echo_n "checking for SETFILE... " >&6; }
22813         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22814 $as_echo "disabled" >&6; }
22815       else
22816         # Check if the provided tool contains a complete path.
22817         tool_specified="$SETFILE"
22818         tool_basename="${tool_specified##*/}"
22819         if test "x$tool_basename" = "x$tool_specified"; then
22820           # A command without a complete path is provided, search $PATH.
22821           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22822 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22823           # Extract the first word of "$tool_basename", so it can be a program name with args.
22824 set dummy $tool_basename; ac_word=$2
22825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22826 $as_echo_n "checking for $ac_word... " >&6; }
22827 if ${ac_cv_path_SETFILE+:} false; then :
22828   $as_echo_n "(cached) " >&6
22829 else
22830   case $SETFILE in
22831   [\\/]* | ?:[\\/]*)
22832   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22833   ;;
22834   *)
22835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22836 for as_dir in $PATH
22837 do
22838   IFS=$as_save_IFS
22839   test -z "$as_dir" && as_dir=.
22840     for ac_exec_ext in '' $ac_executable_extensions; do
22841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22842     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22844     break 2
22845   fi
22846 done
22847   done
22848 IFS=$as_save_IFS
22849 
22850   ;;
22851 esac
22852 fi
22853 SETFILE=$ac_cv_path_SETFILE
22854 if test -n "$SETFILE"; then
22855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22856 $as_echo "$SETFILE" >&6; }
22857 else
22858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22859 $as_echo "no" >&6; }
22860 fi
22861 
22862 
22863           if test "x$SETFILE" = x; then
22864             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22865           fi
22866         else
22867           # Otherwise we believe it is a complete path. Use it as it is.
22868           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22869 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22870           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22871 $as_echo_n "checking for SETFILE... " >&6; }
22872           if test ! -x "$tool_specified"; then
22873             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22874 $as_echo "not found" >&6; }
22875             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22876           fi
22877           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22878 $as_echo "$tool_specified" >&6; }
22879         fi
22880       fi
22881     fi
22882 
22883   fi
22884 
22885 
22886 
22887   if test "x$SETFILE" = x; then
22888     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22889   fi
22890 
22891 
22892   fi
22893 
22894 
22895   # Test if bash supports pipefail.
22896   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22897 $as_echo_n "checking if bash supports pipefail... " >&6; }
22898   if ${BASH} -c 'set -o pipefail'; then
22899     BASH_ARGS="$BASH_ARGS -o pipefail"
22900     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22901 $as_echo "yes" >&6; }
22902   else
22903     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22904 $as_echo "no" >&6; }
22905   fi
22906 
22907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22908 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22909   if ${BASH} -e -c 'true'; then
22910     BASH_ARGS="$BASH_ARGS -e"
22911     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22912 $as_echo "yes" >&6; }
22913   else
22914     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22915 $as_echo "no" >&6; }
22916   fi
22917 
22918 
22919 
22920 
22921 # Check if pkg-config is available.
22922 
22923 
22924 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22925         if test -n "$ac_tool_prefix"; then
22926   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22927 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22929 $as_echo_n "checking for $ac_word... " >&6; }
22930 if ${ac_cv_path_PKG_CONFIG+:} false; then :
22931   $as_echo_n "(cached) " >&6
22932 else
22933   case $PKG_CONFIG in
22934   [\\/]* | ?:[\\/]*)
22935   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22936   ;;
22937   *)
22938   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22939 for as_dir in $PATH
22940 do
22941   IFS=$as_save_IFS
22942   test -z "$as_dir" && as_dir=.
22943     for ac_exec_ext in '' $ac_executable_extensions; do
22944   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22945     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22946     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22947     break 2
22948   fi
22949 done
22950   done
22951 IFS=$as_save_IFS
22952 
22953   ;;
22954 esac
22955 fi
22956 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22957 if test -n "$PKG_CONFIG"; then
22958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22959 $as_echo "$PKG_CONFIG" >&6; }
22960 else
22961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22962 $as_echo "no" >&6; }
22963 fi
22964 
22965 
22966 fi
22967 if test -z "$ac_cv_path_PKG_CONFIG"; then
22968   ac_pt_PKG_CONFIG=$PKG_CONFIG
22969   # Extract the first word of "pkg-config", so it can be a program name with args.
22970 set dummy pkg-config; ac_word=$2
22971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22972 $as_echo_n "checking for $ac_word... " >&6; }
22973 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22974   $as_echo_n "(cached) " >&6
22975 else
22976   case $ac_pt_PKG_CONFIG in
22977   [\\/]* | ?:[\\/]*)
22978   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22979   ;;
22980   *)
22981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22982 for as_dir in $PATH
22983 do
22984   IFS=$as_save_IFS
22985   test -z "$as_dir" && as_dir=.
22986     for ac_exec_ext in '' $ac_executable_extensions; do
22987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22988     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22990     break 2
22991   fi
22992 done
22993   done
22994 IFS=$as_save_IFS
22995 
22996   ;;
22997 esac
22998 fi
22999 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23000 if test -n "$ac_pt_PKG_CONFIG"; then
23001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23002 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
23003 else
23004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23005 $as_echo "no" >&6; }
23006 fi
23007 
23008   if test "x$ac_pt_PKG_CONFIG" = x; then
23009     PKG_CONFIG=""
23010   else
23011     case $cross_compiling:$ac_tool_warned in
23012 yes:)
23013 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23014 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23015 ac_tool_warned=yes ;;
23016 esac
23017     PKG_CONFIG=$ac_pt_PKG_CONFIG
23018   fi
23019 else
23020   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23021 fi
23022 
23023 fi
23024 if test -n "$PKG_CONFIG"; then
23025         _pkg_min_version=0.9.0
23026         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23027 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23028         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23029                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23030 $as_echo "yes" >&6; }
23031         else
23032                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23033 $as_echo "no" >&6; }
23034                 PKG_CONFIG=""
23035         fi
23036 
23037 fi
23038 
23039 # After basic tools have been setup, we can check build os specific details.
23040 
23041   ###############################################################################
23042 
23043   # Note that this is the build platform OS version!
23044 
23045   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23046   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23047   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23048   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23049 
23050 
23051 
23052 
23053 
23054 ###############################################################################
23055 #
23056 # Determine OpenJDK variants, options and version numbers.
23057 #
23058 ###############################################################################
23059 
23060 # We need build & target for this.
23061 
23062 
23063   ###############################################################################
23064   #
23065   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23066   # We always build headless support.
23067   #
23068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23069 $as_echo_n "checking headful support... " >&6; }
23070   # Check whether --enable-headful was given.
23071 if test "${enable_headful+set}" = set; then :
23072   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23073 else
23074   SUPPORT_HEADFUL=yes
23075 fi
23076 
23077 
23078   SUPPORT_HEADLESS=yes
23079   BUILD_HEADLESS="BUILD_HEADLESS:=true"
23080 
23081   if test "x$SUPPORT_HEADFUL" = xyes; then
23082     # We are building both headful and headless.
23083     headful_msg="include support for both headful and headless"
23084   fi
23085 
23086   if test "x$SUPPORT_HEADFUL" = xno; then
23087     # Thus we are building headless only.
23088     BUILD_HEADLESS="BUILD_HEADLESS:=true"
23089     headful_msg="headless only"
23090   fi
23091 
23092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23093 $as_echo "$headful_msg" >&6; }
23094 
23095 
23096 
23097 
23098 
23099   # Control wether Hotspot runs Queens test after build.
23100   # Check whether --enable-hotspot-test-in-build was given.
23101 if test "${enable_hotspot_test_in_build+set}" = set; then :
23102   enableval=$enable_hotspot_test_in_build;
23103 else
23104   enable_hotspot_test_in_build=no
23105 fi
23106 
23107   if test "x$enable_hotspot_test_in_build" = "xyes"; then
23108     TEST_IN_BUILD=true
23109   else
23110     TEST_IN_BUILD=false
23111   fi
23112 
23113 
23114   ###############################################################################
23115   #
23116   # Choose cacerts source file
23117   #
23118 
23119 # Check whether --with-cacerts-file was given.
23120 if test "${with_cacerts_file+set}" = set; then :
23121   withval=$with_cacerts_file;
23122 fi
23123 
23124   if test "x$with_cacerts_file" != x; then
23125     CACERTS_FILE=$with_cacerts_file
23126   fi
23127 
23128 
23129   ###############################################################################
23130   #
23131   # Enable or disable unlimited crypto
23132   #
23133   # Check whether --enable-unlimited-crypto was given.
23134 if test "${enable_unlimited_crypto+set}" = set; then :
23135   enableval=$enable_unlimited_crypto;
23136 else
23137   enable_unlimited_crypto=no
23138 fi
23139 
23140   if test "x$enable_unlimited_crypto" = "xyes"; then
23141     UNLIMITED_CRYPTO=true
23142   else
23143     UNLIMITED_CRYPTO=false
23144   fi
23145 
23146 
23147   ###############################################################################
23148   #
23149   # Compress jars
23150   #
23151   COMPRESS_JARS=false
23152 
23153 
23154 
23155   # Setup default copyright year. Mostly overridden when building close to a new year.
23156 
23157 # Check whether --with-copyright-year was given.
23158 if test "${with_copyright_year+set}" = set; then :
23159   withval=$with_copyright_year;
23160 fi
23161 
23162   if test "x$with_copyright_year" = xyes; then
23163     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23164   elif test "x$with_copyright_year" != x; then
23165     COPYRIGHT_YEAR="$with_copyright_year"
23166   else
23167     COPYRIGHT_YEAR=`date +'%Y'`
23168   fi
23169 
23170 
23171 
23172   # Warn user that old version arguments are deprecated.
23173 
23174 
23175 # Check whether --with-milestone was given.
23176 if test "${with_milestone+set}" = set; then :
23177   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23178 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23179 fi
23180 
23181 
23182 
23183 
23184 # Check whether --with-update-version was given.
23185 if test "${with_update_version+set}" = set; then :
23186   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23187 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23188 fi
23189 
23190 
23191 
23192 
23193 # Check whether --with-user-release-suffix was given.
23194 if test "${with_user_release_suffix+set}" = set; then :
23195   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
23196 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23197 fi
23198 
23199 
23200 
23201 
23202 # Check whether --with-build-number was given.
23203 if test "${with_build_number+set}" = set; then :
23204   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23205 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23206 fi
23207 
23208 
23209 
23210   # Source the version numbers file
23211   . $AUTOCONF_DIR/version-numbers
23212 
23213   # Some non-version number information is set in that file
23214 
23215 
23216 
23217 
23218 
23219 
23220 
23221 
23222   # Override version from arguments
23223 
23224   # If --with-version-string is set, process it first. It is possible to
23225   # override parts with more specific flags, since these are processed later.
23226 
23227 # Check whether --with-version-string was given.
23228 if test "${with_version_string+set}" = set; then :
23229   withval=$with_version_string;
23230 fi
23231 
23232   if test "x$with_version_string" = xyes; then
23233     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23234   elif test "x$with_version_string" != x; then
23235     # Additional [] needed to keep m4 from mangling shell constructs.
23236     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23237       VERSION_MAJOR=${BASH_REMATCH[1]}
23238       VERSION_MINOR=${BASH_REMATCH[3]}
23239       VERSION_SECURITY=${BASH_REMATCH[5]}
23240       VERSION_PATCH=${BASH_REMATCH[7]}
23241       VERSION_PRE=${BASH_REMATCH[9]}
23242       version_plus_separator=${BASH_REMATCH[11]}
23243       VERSION_BUILD=${BASH_REMATCH[12]}
23244       VERSION_OPT=${BASH_REMATCH[14]}
23245       # Unspecified numerical fields are interpreted as 0.
23246       if test "x$VERSION_MINOR" = x; then
23247         VERSION_MINOR=0
23248       fi
23249       if test "x$VERSION_SECURITY" = x; then
23250         VERSION_SECURITY=0
23251       fi
23252       if test "x$VERSION_PATCH" = x; then
23253         VERSION_PATCH=0
23254       fi
23255       if test "x$version_plus_separator" != x \
23256           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23257         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23258       fi
23259       # Stop the version part process from setting default values.
23260       # We still allow them to explicitely override though.
23261       NO_DEFAULT_VERSION_PARTS=true
23262     else
23263       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23264     fi
23265   fi
23266 
23267 
23268 # Check whether --with-version-pre was given.
23269 if test "${with_version_pre+set}" = set; then :
23270   withval=$with_version_pre; with_version_pre_present=true
23271 else
23272   with_version_pre_present=false
23273 fi
23274 
23275 
23276   if test "x$with_version_pre_present" = xtrue; then
23277     if test "x$with_version_pre" = xyes; then
23278       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23279     elif test "x$with_version_pre" = xno; then
23280       # Interpret --without-* as empty string instead of the literal "no"
23281       VERSION_PRE=
23282     else
23283       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23284        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23285       if test "x$VERSION_PRE" != "x$with_version_pre"; then
23286         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23287 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23288       fi
23289     fi
23290   else
23291     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23292       # Default is to use "internal" as pre
23293       VERSION_PRE="internal"
23294     fi
23295   fi
23296 
23297 
23298 # Check whether --with-version-opt was given.
23299 if test "${with_version_opt+set}" = set; then :
23300   withval=$with_version_opt; with_version_opt_present=true
23301 else
23302   with_version_opt_present=false
23303 fi
23304 
23305 
23306   if test "x$with_version_opt_present" = xtrue; then
23307     if test "x$with_version_opt" = xyes; then
23308       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23309     elif test "x$with_version_opt" = xno; then
23310       # Interpret --without-* as empty string instead of the literal "no"
23311       VERSION_OPT=
23312     else
23313       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23314        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23315       if test "x$VERSION_OPT" != "x$with_version_opt"; then
23316         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23317 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23318       fi
23319     fi
23320   else
23321     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23322       # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23323       timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23324       # Outer [ ] to quote m4.
23325        username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23326        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23327       VERSION_OPT="$timestamp.$username.$basedirname"
23328     fi
23329   fi
23330 
23331 
23332 # Check whether --with-version-build was given.
23333 if test "${with_version_build+set}" = set; then :
23334   withval=$with_version_build; with_version_build_present=true
23335 else
23336   with_version_build_present=false
23337 fi
23338 
23339 
23340   if test "x$with_version_build_present" = xtrue; then
23341     if test "x$with_version_build" = xyes; then
23342       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23343     elif test "x$with_version_build" = xno; then
23344       # Interpret --without-* as empty string instead of the literal "no"
23345       VERSION_BUILD=
23346     elif test "x$with_version_build" = x; then
23347       VERSION_BUILD=
23348     else
23349 
23350   # Additional [] needed to keep m4 from mangling shell constructs.
23351   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23352     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23353   fi
23354   # Extract the version number without leading zeros.
23355   cleaned_value=${BASH_REMATCH[1]}
23356   if test "x$cleaned_value" = x; then
23357     # Special case for zero
23358     cleaned_value=${BASH_REMATCH[2]}
23359   fi
23360 
23361   if test $cleaned_value -gt 255; then
23362     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23363   fi
23364   if test "x$cleaned_value" != "x$with_version_build"; then
23365     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23366 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23367   fi
23368   VERSION_BUILD=$cleaned_value
23369 
23370     fi
23371   else
23372     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23373       # Default is to not have a build number.
23374       VERSION_BUILD=""
23375       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23376       VERSION_BUILD=0
23377     fi
23378   fi
23379 
23380 
23381 # Check whether --with-version-major was given.
23382 if test "${with_version_major+set}" = set; then :
23383   withval=$with_version_major; with_version_major_present=true
23384 else
23385   with_version_major_present=false
23386 fi
23387 
23388 
23389   if test "x$with_version_major_present" = xtrue; then
23390     if test "x$with_version_major" = xyes; then
23391       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23392     else
23393 
23394   # Additional [] needed to keep m4 from mangling shell constructs.
23395   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23396     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23397   fi
23398   # Extract the version number without leading zeros.
23399   cleaned_value=${BASH_REMATCH[1]}
23400   if test "x$cleaned_value" = x; then
23401     # Special case for zero
23402     cleaned_value=${BASH_REMATCH[2]}
23403   fi
23404 
23405   if test $cleaned_value -gt 255; then
23406     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23407   fi
23408   if test "x$cleaned_value" != "x$with_version_major"; then
23409     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23410 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23411   fi
23412   VERSION_MAJOR=$cleaned_value
23413 
23414     fi
23415   else
23416     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23417       # Default is to get value from version-numbers
23418       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23419     fi
23420   fi
23421 
23422 
23423 # Check whether --with-version-minor was given.
23424 if test "${with_version_minor+set}" = set; then :
23425   withval=$with_version_minor; with_version_minor_present=true
23426 else
23427   with_version_minor_present=false
23428 fi
23429 
23430 
23431   if test "x$with_version_minor_present" = xtrue; then
23432     if test "x$with_version_minor" = xyes; then
23433       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23434     elif test "x$with_version_minor" = xno; then
23435       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23436       VERSION_MINOR=0
23437     elif test "x$with_version_minor" = x; then
23438       VERSION_MINOR=0
23439     else
23440 
23441   # Additional [] needed to keep m4 from mangling shell constructs.
23442   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23443     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23444   fi
23445   # Extract the version number without leading zeros.
23446   cleaned_value=${BASH_REMATCH[1]}
23447   if test "x$cleaned_value" = x; then
23448     # Special case for zero
23449     cleaned_value=${BASH_REMATCH[2]}
23450   fi
23451 
23452   if test $cleaned_value -gt 255; then
23453     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23454   fi
23455   if test "x$cleaned_value" != "x$with_version_minor"; then
23456     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23457 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23458   fi
23459   VERSION_MINOR=$cleaned_value
23460 
23461     fi
23462   else
23463     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23464       # Default is 0, if unspecified
23465       VERSION_MINOR=0
23466     fi
23467   fi
23468 
23469 
23470 # Check whether --with-version-security was given.
23471 if test "${with_version_security+set}" = set; then :
23472   withval=$with_version_security; with_version_security_present=true
23473 else
23474   with_version_security_present=false
23475 fi
23476 
23477 
23478   if test "x$with_version_security_present" = xtrue; then
23479     if test "x$with_version_security" = xyes; then
23480       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23481     elif test "x$with_version_security" = xno; then
23482       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23483       VERSION_SECURITY=0
23484     elif test "x$with_version_security" = x; then
23485       VERSION_SECURITY=0
23486     else
23487 
23488   # Additional [] needed to keep m4 from mangling shell constructs.
23489   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23490     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23491   fi
23492   # Extract the version number without leading zeros.
23493   cleaned_value=${BASH_REMATCH[1]}
23494   if test "x$cleaned_value" = x; then
23495     # Special case for zero
23496     cleaned_value=${BASH_REMATCH[2]}
23497   fi
23498 
23499   if test $cleaned_value -gt 255; then
23500     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23501   fi
23502   if test "x$cleaned_value" != "x$with_version_security"; then
23503     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23504 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23505   fi
23506   VERSION_SECURITY=$cleaned_value
23507 
23508     fi
23509   else
23510     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23511       # Default is 0, if unspecified
23512       VERSION_SECURITY=0
23513     fi
23514   fi
23515 
23516 
23517 # Check whether --with-version-patch was given.
23518 if test "${with_version_patch+set}" = set; then :
23519   withval=$with_version_patch; with_version_patch_present=true
23520 else
23521   with_version_patch_present=false
23522 fi
23523 
23524 
23525   if test "x$with_version_patch_present" = xtrue; then
23526     if test "x$with_version_patch" = xyes; then
23527       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23528     elif test "x$with_version_patch" = xno; then
23529       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23530       VERSION_PATCH=0
23531     elif test "x$with_version_patch" = x; then
23532       VERSION_PATCH=0
23533     else
23534 
23535   # Additional [] needed to keep m4 from mangling shell constructs.
23536   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23537     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23538   fi
23539   # Extract the version number without leading zeros.
23540   cleaned_value=${BASH_REMATCH[1]}
23541   if test "x$cleaned_value" = x; then
23542     # Special case for zero
23543     cleaned_value=${BASH_REMATCH[2]}
23544   fi
23545 
23546   if test $cleaned_value -gt 255; then
23547     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23548   fi
23549   if test "x$cleaned_value" != "x$with_version_patch"; then
23550     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23551 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23552   fi
23553   VERSION_PATCH=$cleaned_value
23554 
23555     fi
23556   else
23557     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23558       # Default is 0, if unspecified
23559       VERSION_PATCH=0
23560     fi
23561   fi
23562 
23563   # Calculate derived version properties
23564 
23565   # Set VERSION_IS_GA based on if VERSION_PRE has a value
23566   if test "x$VERSION_PRE" = x; then
23567     VERSION_IS_GA=true
23568   else
23569     VERSION_IS_GA=false
23570   fi
23571 
23572   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23573   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23574 
23575   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23576   # Strip trailing zeroes from stripped_version_number
23577   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23578   VERSION_NUMBER=$stripped_version_number
23579 
23580   # The complete version string, with additional build information
23581   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23582     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23583   else
23584     # If either build or opt is set, we need a + separator
23585     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23586   fi
23587 
23588   # The short version string, just VERSION_NUMBER and PRE, if present.
23589   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23590 
23591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23592 $as_echo_n "checking for version string... " >&6; }
23593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23594 $as_echo "$VERSION_STRING" >&6; }
23595 
23596 
23597 
23598 
23599 
23600 
23601 
23602 
23603 
23604 
23605 
23606 
23607 
23608 
23609 
23610 ###############################################################################
23611 #
23612 # Setup BootJDK, used to bootstrap the build.
23613 #
23614 ###############################################################################
23615 
23616 
23617   BOOT_JDK_FOUND=no
23618 
23619 # Check whether --with-boot-jdk was given.
23620 if test "${with_boot_jdk+set}" = set; then :
23621   withval=$with_boot_jdk;
23622 fi
23623 
23624 
23625   # We look for the Boot JDK through various means, going from more certain to
23626   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23627   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23628   # must check if this is indeed valid; otherwise we'll continue looking.
23629 
23630   # Test: Is bootjdk explicitely set by command line arguments?
23631 
23632   if test "x$BOOT_JDK_FOUND" = xno; then
23633     # Now execute the test
23634 
23635   if test "x$with_boot_jdk" != x; then
23636     BOOT_JDK=$with_boot_jdk
23637     BOOT_JDK_FOUND=maybe
23638     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23639 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23640   fi
23641 
23642 
23643     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23644     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23645       # Do we have a bin/java?
23646       if test ! -x "$BOOT_JDK/bin/java"; then
23647         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23648 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23649         BOOT_JDK_FOUND=no
23650       else
23651         # Do we have a bin/javac?
23652         if test ! -x "$BOOT_JDK/bin/javac"; then
23653           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23654 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23655           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23656 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23657           BOOT_JDK_FOUND=no
23658         else
23659           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23660           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23661 
23662           # Extra M4 quote needed to protect [] in grep expression.
23663           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23664           if test "x$FOUND_CORRECT_VERSION" = x; then
23665             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23666 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23667             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23668 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23669             BOOT_JDK_FOUND=no
23670           else
23671             # We're done! :-)
23672             BOOT_JDK_FOUND=yes
23673 
23674   # Only process if variable expands to non-empty
23675 
23676   if test "x$BOOT_JDK" != x; then
23677     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23678 
23679   # Input might be given as Windows format, start by converting to
23680   # unix format.
23681   path="$BOOT_JDK"
23682   new_path=`$CYGPATH -u "$path"`
23683 
23684   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23685   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23686   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23687   # "foo.exe" is OK but "foo" is an error.
23688   #
23689   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23690   # It is also a way to make sure we got the proper file name for the real test later on.
23691   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23692   if test "x$test_shortpath" = x; then
23693     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23694 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23695     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23696   fi
23697 
23698   # Call helper function which possibly converts this using DOS-style short mode.
23699   # If so, the updated path is stored in $new_path.
23700 
23701   input_path="$new_path"
23702   # Check if we need to convert this using DOS-style short mode. If the path
23703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23704   # take no chances and rewrite it.
23705   # Note: m4 eats our [], so we need to use [ and ] instead.
23706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23707   if test "x$has_forbidden_chars" != x; then
23708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23709     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23710     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23711     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23712       # Going to short mode and back again did indeed matter. Since short mode is
23713       # case insensitive, let's make it lowercase to improve readability.
23714       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23715       # Now convert it back to Unix-style (cygpath)
23716       input_path=`$CYGPATH -u "$shortmode_path"`
23717       new_path="$input_path"
23718     fi
23719   fi
23720 
23721   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23722   if test "x$test_cygdrive_prefix" = x; then
23723     # As a simple fix, exclude /usr/bin since it's not a real path.
23724     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23725       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23726       # a path prefixed by /cygdrive for fixpath to work.
23727       new_path="$CYGWIN_ROOT_PATH$input_path"
23728     fi
23729   fi
23730 
23731 
23732   if test "x$path" != "x$new_path"; then
23733     BOOT_JDK="$new_path"
23734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23735 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23736   fi
23737 
23738     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23739 
23740   path="$BOOT_JDK"
23741   has_colon=`$ECHO $path | $GREP ^.:`
23742   new_path="$path"
23743   if test "x$has_colon" = x; then
23744     # Not in mixed or Windows style, start by that.
23745     new_path=`cmd //c echo $path`
23746   fi
23747 
23748 
23749   input_path="$new_path"
23750   # Check if we need to convert this using DOS-style short mode. If the path
23751   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23752   # take no chances and rewrite it.
23753   # Note: m4 eats our [], so we need to use [ and ] instead.
23754   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23755   if test "x$has_forbidden_chars" != x; then
23756     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23757     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23758   fi
23759 
23760 
23761   windows_path="$new_path"
23762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23763     unix_path=`$CYGPATH -u "$windows_path"`
23764     new_path="$unix_path"
23765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23767     new_path="$unix_path"
23768   fi
23769 
23770   if test "x$path" != "x$new_path"; then
23771     BOOT_JDK="$new_path"
23772     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23773 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23774   fi
23775 
23776   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23777   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23778 
23779     else
23780       # We're on a unix platform. Hooray! :)
23781       path="$BOOT_JDK"
23782       has_space=`$ECHO "$path" | $GREP " "`
23783       if test "x$has_space" != x; then
23784         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23785 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23786         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23787       fi
23788 
23789       # Use eval to expand a potential ~
23790       eval path="$path"
23791       if test ! -f "$path" && test ! -d "$path"; then
23792         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23793       fi
23794 
23795       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23796     fi
23797   fi
23798 
23799             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23800 $as_echo_n "checking for Boot JDK... " >&6; }
23801             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23802 $as_echo "$BOOT_JDK" >&6; }
23803             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23804 $as_echo_n "checking Boot JDK version... " >&6; }
23805             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23806             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23807 $as_echo "$BOOT_JDK_VERSION" >&6; }
23808           fi # end check jdk version
23809         fi # end check javac
23810       fi # end check java
23811     fi # end check boot jdk found
23812   fi
23813 
23814   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23815     # Having specified an argument which is incorrect will produce an instant failure;
23816     # we should not go on looking
23817     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23818   fi
23819 
23820   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23821 
23822   if test "x$BOOT_JDK_FOUND" = xno; then
23823     # Now execute the test
23824 
23825   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23826     # First check at user selected default
23827 
23828   if test "x$BOOT_JDK_FOUND" = xno; then
23829     # Now execute the test
23830 
23831   if test -x /usr/libexec/java_home; then
23832     BOOT_JDK=`/usr/libexec/java_home `
23833     BOOT_JDK_FOUND=maybe
23834     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23835 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23836   fi
23837 
23838 
23839     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23840     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23841       # Do we have a bin/java?
23842       if test ! -x "$BOOT_JDK/bin/java"; then
23843         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23844 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23845         BOOT_JDK_FOUND=no
23846       else
23847         # Do we have a bin/javac?
23848         if test ! -x "$BOOT_JDK/bin/javac"; then
23849           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23850 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23851           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23852 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23853           BOOT_JDK_FOUND=no
23854         else
23855           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23856           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23857 
23858           # Extra M4 quote needed to protect [] in grep expression.
23859           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23860           if test "x$FOUND_CORRECT_VERSION" = x; then
23861             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23862 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23863             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23864 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23865             BOOT_JDK_FOUND=no
23866           else
23867             # We're done! :-)
23868             BOOT_JDK_FOUND=yes
23869 
23870   # Only process if variable expands to non-empty
23871 
23872   if test "x$BOOT_JDK" != x; then
23873     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23874 
23875   # Input might be given as Windows format, start by converting to
23876   # unix format.
23877   path="$BOOT_JDK"
23878   new_path=`$CYGPATH -u "$path"`
23879 
23880   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23881   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23882   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23883   # "foo.exe" is OK but "foo" is an error.
23884   #
23885   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23886   # It is also a way to make sure we got the proper file name for the real test later on.
23887   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23888   if test "x$test_shortpath" = x; then
23889     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23890 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23891     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23892   fi
23893 
23894   # Call helper function which possibly converts this using DOS-style short mode.
23895   # If so, the updated path is stored in $new_path.
23896 
23897   input_path="$new_path"
23898   # Check if we need to convert this using DOS-style short mode. If the path
23899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23900   # take no chances and rewrite it.
23901   # Note: m4 eats our [], so we need to use [ and ] instead.
23902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23903   if test "x$has_forbidden_chars" != x; then
23904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23905     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23906     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23907     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23908       # Going to short mode and back again did indeed matter. Since short mode is
23909       # case insensitive, let's make it lowercase to improve readability.
23910       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23911       # Now convert it back to Unix-style (cygpath)
23912       input_path=`$CYGPATH -u "$shortmode_path"`
23913       new_path="$input_path"
23914     fi
23915   fi
23916 
23917   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23918   if test "x$test_cygdrive_prefix" = x; then
23919     # As a simple fix, exclude /usr/bin since it's not a real path.
23920     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23921       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23922       # a path prefixed by /cygdrive for fixpath to work.
23923       new_path="$CYGWIN_ROOT_PATH$input_path"
23924     fi
23925   fi
23926 
23927 
23928   if test "x$path" != "x$new_path"; then
23929     BOOT_JDK="$new_path"
23930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23931 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23932   fi
23933 
23934     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23935 
23936   path="$BOOT_JDK"
23937   has_colon=`$ECHO $path | $GREP ^.:`
23938   new_path="$path"
23939   if test "x$has_colon" = x; then
23940     # Not in mixed or Windows style, start by that.
23941     new_path=`cmd //c echo $path`
23942   fi
23943 
23944 
23945   input_path="$new_path"
23946   # Check if we need to convert this using DOS-style short mode. If the path
23947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23948   # take no chances and rewrite it.
23949   # Note: m4 eats our [], so we need to use [ and ] instead.
23950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23951   if test "x$has_forbidden_chars" != x; then
23952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23953     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23954   fi
23955 
23956 
23957   windows_path="$new_path"
23958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23959     unix_path=`$CYGPATH -u "$windows_path"`
23960     new_path="$unix_path"
23961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23962     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23963     new_path="$unix_path"
23964   fi
23965 
23966   if test "x$path" != "x$new_path"; then
23967     BOOT_JDK="$new_path"
23968     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23969 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23970   fi
23971 
23972   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23973   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23974 
23975     else
23976       # We're on a unix platform. Hooray! :)
23977       path="$BOOT_JDK"
23978       has_space=`$ECHO "$path" | $GREP " "`
23979       if test "x$has_space" != x; then
23980         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23981 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23982         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23983       fi
23984 
23985       # Use eval to expand a potential ~
23986       eval path="$path"
23987       if test ! -f "$path" && test ! -d "$path"; then
23988         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23989       fi
23990 
23991       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23992     fi
23993   fi
23994 
23995             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23996 $as_echo_n "checking for Boot JDK... " >&6; }
23997             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23998 $as_echo "$BOOT_JDK" >&6; }
23999             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24000 $as_echo_n "checking Boot JDK version... " >&6; }
24001             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24002             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24003 $as_echo "$BOOT_JDK_VERSION" >&6; }
24004           fi # end check jdk version
24005         fi # end check javac
24006       fi # end check java
24007     fi # end check boot jdk found
24008   fi
24009 
24010     # If that did not work out (e.g. too old), try explicit versions instead
24011 
24012   if test "x$BOOT_JDK_FOUND" = xno; then
24013     # Now execute the test
24014 
24015   if test -x /usr/libexec/java_home; then
24016     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24017     BOOT_JDK_FOUND=maybe
24018     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24019 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24020   fi
24021 
24022 
24023     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24024     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24025       # Do we have a bin/java?
24026       if test ! -x "$BOOT_JDK/bin/java"; then
24027         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24028 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24029         BOOT_JDK_FOUND=no
24030       else
24031         # Do we have a bin/javac?
24032         if test ! -x "$BOOT_JDK/bin/javac"; then
24033           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24034 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24035           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24036 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24037           BOOT_JDK_FOUND=no
24038         else
24039           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24040           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24041 
24042           # Extra M4 quote needed to protect [] in grep expression.
24043           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24044           if test "x$FOUND_CORRECT_VERSION" = x; then
24045             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24046 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24047             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24048 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24049             BOOT_JDK_FOUND=no
24050           else
24051             # We're done! :-)
24052             BOOT_JDK_FOUND=yes
24053 
24054   # Only process if variable expands to non-empty
24055 
24056   if test "x$BOOT_JDK" != x; then
24057     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24058 
24059   # Input might be given as Windows format, start by converting to
24060   # unix format.
24061   path="$BOOT_JDK"
24062   new_path=`$CYGPATH -u "$path"`
24063 
24064   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24065   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24066   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24067   # "foo.exe" is OK but "foo" is an error.
24068   #
24069   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24070   # It is also a way to make sure we got the proper file name for the real test later on.
24071   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24072   if test "x$test_shortpath" = x; then
24073     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24074 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24075     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24076   fi
24077 
24078   # Call helper function which possibly converts this using DOS-style short mode.
24079   # If so, the updated path is stored in $new_path.
24080 
24081   input_path="$new_path"
24082   # Check if we need to convert this using DOS-style short mode. If the path
24083   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24084   # take no chances and rewrite it.
24085   # Note: m4 eats our [], so we need to use [ and ] instead.
24086   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24087   if test "x$has_forbidden_chars" != x; then
24088     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24089     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24090     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24091     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24092       # Going to short mode and back again did indeed matter. Since short mode is
24093       # case insensitive, let's make it lowercase to improve readability.
24094       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24095       # Now convert it back to Unix-style (cygpath)
24096       input_path=`$CYGPATH -u "$shortmode_path"`
24097       new_path="$input_path"
24098     fi
24099   fi
24100 
24101   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24102   if test "x$test_cygdrive_prefix" = x; then
24103     # As a simple fix, exclude /usr/bin since it's not a real path.
24104     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24105       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24106       # a path prefixed by /cygdrive for fixpath to work.
24107       new_path="$CYGWIN_ROOT_PATH$input_path"
24108     fi
24109   fi
24110 
24111 
24112   if test "x$path" != "x$new_path"; then
24113     BOOT_JDK="$new_path"
24114     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24115 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24116   fi
24117 
24118     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24119 
24120   path="$BOOT_JDK"
24121   has_colon=`$ECHO $path | $GREP ^.:`
24122   new_path="$path"
24123   if test "x$has_colon" = x; then
24124     # Not in mixed or Windows style, start by that.
24125     new_path=`cmd //c echo $path`
24126   fi
24127 
24128 
24129   input_path="$new_path"
24130   # Check if we need to convert this using DOS-style short mode. If the path
24131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24132   # take no chances and rewrite it.
24133   # Note: m4 eats our [], so we need to use [ and ] instead.
24134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24135   if test "x$has_forbidden_chars" != x; then
24136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24137     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24138   fi
24139 
24140 
24141   windows_path="$new_path"
24142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24143     unix_path=`$CYGPATH -u "$windows_path"`
24144     new_path="$unix_path"
24145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24147     new_path="$unix_path"
24148   fi
24149 
24150   if test "x$path" != "x$new_path"; then
24151     BOOT_JDK="$new_path"
24152     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24153 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24154   fi
24155 
24156   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24157   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24158 
24159     else
24160       # We're on a unix platform. Hooray! :)
24161       path="$BOOT_JDK"
24162       has_space=`$ECHO "$path" | $GREP " "`
24163       if test "x$has_space" != x; then
24164         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24165 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24166         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24167       fi
24168 
24169       # Use eval to expand a potential ~
24170       eval path="$path"
24171       if test ! -f "$path" && test ! -d "$path"; then
24172         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24173       fi
24174 
24175       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24176     fi
24177   fi
24178 
24179             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24180 $as_echo_n "checking for Boot JDK... " >&6; }
24181             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24182 $as_echo "$BOOT_JDK" >&6; }
24183             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24184 $as_echo_n "checking Boot JDK version... " >&6; }
24185             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24186             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24187 $as_echo "$BOOT_JDK_VERSION" >&6; }
24188           fi # end check jdk version
24189         fi # end check javac
24190       fi # end check java
24191     fi # end check boot jdk found
24192   fi
24193 
24194 
24195   if test "x$BOOT_JDK_FOUND" = xno; then
24196     # Now execute the test
24197 
24198   if test -x /usr/libexec/java_home; then
24199     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24200     BOOT_JDK_FOUND=maybe
24201     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24202 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24203   fi
24204 
24205 
24206     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24207     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24208       # Do we have a bin/java?
24209       if test ! -x "$BOOT_JDK/bin/java"; then
24210         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24211 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24212         BOOT_JDK_FOUND=no
24213       else
24214         # Do we have a bin/javac?
24215         if test ! -x "$BOOT_JDK/bin/javac"; then
24216           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24217 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24218           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24219 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24220           BOOT_JDK_FOUND=no
24221         else
24222           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24223           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24224 
24225           # Extra M4 quote needed to protect [] in grep expression.
24226           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24227           if test "x$FOUND_CORRECT_VERSION" = x; then
24228             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24229 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24230             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24231 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24232             BOOT_JDK_FOUND=no
24233           else
24234             # We're done! :-)
24235             BOOT_JDK_FOUND=yes
24236 
24237   # Only process if variable expands to non-empty
24238 
24239   if test "x$BOOT_JDK" != x; then
24240     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24241 
24242   # Input might be given as Windows format, start by converting to
24243   # unix format.
24244   path="$BOOT_JDK"
24245   new_path=`$CYGPATH -u "$path"`
24246 
24247   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24248   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24249   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24250   # "foo.exe" is OK but "foo" is an error.
24251   #
24252   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24253   # It is also a way to make sure we got the proper file name for the real test later on.
24254   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24255   if test "x$test_shortpath" = x; then
24256     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24257 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24258     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24259   fi
24260 
24261   # Call helper function which possibly converts this using DOS-style short mode.
24262   # If so, the updated path is stored in $new_path.
24263 
24264   input_path="$new_path"
24265   # Check if we need to convert this using DOS-style short mode. If the path
24266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24267   # take no chances and rewrite it.
24268   # Note: m4 eats our [], so we need to use [ and ] instead.
24269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24270   if test "x$has_forbidden_chars" != x; then
24271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24272     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24273     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24274     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24275       # Going to short mode and back again did indeed matter. Since short mode is
24276       # case insensitive, let's make it lowercase to improve readability.
24277       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24278       # Now convert it back to Unix-style (cygpath)
24279       input_path=`$CYGPATH -u "$shortmode_path"`
24280       new_path="$input_path"
24281     fi
24282   fi
24283 
24284   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24285   if test "x$test_cygdrive_prefix" = x; then
24286     # As a simple fix, exclude /usr/bin since it's not a real path.
24287     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24288       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24289       # a path prefixed by /cygdrive for fixpath to work.
24290       new_path="$CYGWIN_ROOT_PATH$input_path"
24291     fi
24292   fi
24293 
24294 
24295   if test "x$path" != "x$new_path"; then
24296     BOOT_JDK="$new_path"
24297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24298 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24299   fi
24300 
24301     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24302 
24303   path="$BOOT_JDK"
24304   has_colon=`$ECHO $path | $GREP ^.:`
24305   new_path="$path"
24306   if test "x$has_colon" = x; then
24307     # Not in mixed or Windows style, start by that.
24308     new_path=`cmd //c echo $path`
24309   fi
24310 
24311 
24312   input_path="$new_path"
24313   # Check if we need to convert this using DOS-style short mode. If the path
24314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24315   # take no chances and rewrite it.
24316   # Note: m4 eats our [], so we need to use [ and ] instead.
24317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24318   if test "x$has_forbidden_chars" != x; then
24319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24320     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24321   fi
24322 
24323 
24324   windows_path="$new_path"
24325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24326     unix_path=`$CYGPATH -u "$windows_path"`
24327     new_path="$unix_path"
24328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24330     new_path="$unix_path"
24331   fi
24332 
24333   if test "x$path" != "x$new_path"; then
24334     BOOT_JDK="$new_path"
24335     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24336 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24337   fi
24338 
24339   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24340   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24341 
24342     else
24343       # We're on a unix platform. Hooray! :)
24344       path="$BOOT_JDK"
24345       has_space=`$ECHO "$path" | $GREP " "`
24346       if test "x$has_space" != x; then
24347         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24348 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24349         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24350       fi
24351 
24352       # Use eval to expand a potential ~
24353       eval path="$path"
24354       if test ! -f "$path" && test ! -d "$path"; then
24355         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24356       fi
24357 
24358       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24359     fi
24360   fi
24361 
24362             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24363 $as_echo_n "checking for Boot JDK... " >&6; }
24364             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24365 $as_echo "$BOOT_JDK" >&6; }
24366             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24367 $as_echo_n "checking Boot JDK version... " >&6; }
24368             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24369             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24370 $as_echo "$BOOT_JDK_VERSION" >&6; }
24371           fi # end check jdk version
24372         fi # end check javac
24373       fi # end check java
24374     fi # end check boot jdk found
24375   fi
24376 
24377 
24378   if test "x$BOOT_JDK_FOUND" = xno; then
24379     # Now execute the test
24380 
24381   if test -x /usr/libexec/java_home; then
24382     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24383     BOOT_JDK_FOUND=maybe
24384     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24385 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24386   fi
24387 
24388 
24389     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24390     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24391       # Do we have a bin/java?
24392       if test ! -x "$BOOT_JDK/bin/java"; then
24393         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24394 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24395         BOOT_JDK_FOUND=no
24396       else
24397         # Do we have a bin/javac?
24398         if test ! -x "$BOOT_JDK/bin/javac"; then
24399           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24400 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24401           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24402 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24403           BOOT_JDK_FOUND=no
24404         else
24405           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24406           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24407 
24408           # Extra M4 quote needed to protect [] in grep expression.
24409           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24410           if test "x$FOUND_CORRECT_VERSION" = x; then
24411             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24412 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24413             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24414 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24415             BOOT_JDK_FOUND=no
24416           else
24417             # We're done! :-)
24418             BOOT_JDK_FOUND=yes
24419 
24420   # Only process if variable expands to non-empty
24421 
24422   if test "x$BOOT_JDK" != x; then
24423     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24424 
24425   # Input might be given as Windows format, start by converting to
24426   # unix format.
24427   path="$BOOT_JDK"
24428   new_path=`$CYGPATH -u "$path"`
24429 
24430   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24431   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24432   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24433   # "foo.exe" is OK but "foo" is an error.
24434   #
24435   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24436   # It is also a way to make sure we got the proper file name for the real test later on.
24437   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24438   if test "x$test_shortpath" = x; then
24439     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24440 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24441     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24442   fi
24443 
24444   # Call helper function which possibly converts this using DOS-style short mode.
24445   # If so, the updated path is stored in $new_path.
24446 
24447   input_path="$new_path"
24448   # Check if we need to convert this using DOS-style short mode. If the path
24449   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24450   # take no chances and rewrite it.
24451   # Note: m4 eats our [], so we need to use [ and ] instead.
24452   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24453   if test "x$has_forbidden_chars" != x; then
24454     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24455     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24456     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24457     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24458       # Going to short mode and back again did indeed matter. Since short mode is
24459       # case insensitive, let's make it lowercase to improve readability.
24460       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24461       # Now convert it back to Unix-style (cygpath)
24462       input_path=`$CYGPATH -u "$shortmode_path"`
24463       new_path="$input_path"
24464     fi
24465   fi
24466 
24467   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24468   if test "x$test_cygdrive_prefix" = x; then
24469     # As a simple fix, exclude /usr/bin since it's not a real path.
24470     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24471       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24472       # a path prefixed by /cygdrive for fixpath to work.
24473       new_path="$CYGWIN_ROOT_PATH$input_path"
24474     fi
24475   fi
24476 
24477 
24478   if test "x$path" != "x$new_path"; then
24479     BOOT_JDK="$new_path"
24480     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24481 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24482   fi
24483 
24484     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24485 
24486   path="$BOOT_JDK"
24487   has_colon=`$ECHO $path | $GREP ^.:`
24488   new_path="$path"
24489   if test "x$has_colon" = x; then
24490     # Not in mixed or Windows style, start by that.
24491     new_path=`cmd //c echo $path`
24492   fi
24493 
24494 
24495   input_path="$new_path"
24496   # Check if we need to convert this using DOS-style short mode. If the path
24497   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24498   # take no chances and rewrite it.
24499   # Note: m4 eats our [], so we need to use [ and ] instead.
24500   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24501   if test "x$has_forbidden_chars" != x; then
24502     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24503     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24504   fi
24505 
24506 
24507   windows_path="$new_path"
24508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24509     unix_path=`$CYGPATH -u "$windows_path"`
24510     new_path="$unix_path"
24511   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24512     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24513     new_path="$unix_path"
24514   fi
24515 
24516   if test "x$path" != "x$new_path"; then
24517     BOOT_JDK="$new_path"
24518     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24519 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24520   fi
24521 
24522   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24523   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24524 
24525     else
24526       # We're on a unix platform. Hooray! :)
24527       path="$BOOT_JDK"
24528       has_space=`$ECHO "$path" | $GREP " "`
24529       if test "x$has_space" != x; then
24530         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24531 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24532         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24533       fi
24534 
24535       # Use eval to expand a potential ~
24536       eval path="$path"
24537       if test ! -f "$path" && test ! -d "$path"; then
24538         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24539       fi
24540 
24541       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24542     fi
24543   fi
24544 
24545             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24546 $as_echo_n "checking for Boot JDK... " >&6; }
24547             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24548 $as_echo "$BOOT_JDK" >&6; }
24549             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24550 $as_echo_n "checking Boot JDK version... " >&6; }
24551             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24552             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24553 $as_echo "$BOOT_JDK_VERSION" >&6; }
24554           fi # end check jdk version
24555         fi # end check javac
24556       fi # end check java
24557     fi # end check boot jdk found
24558   fi
24559 
24560   fi
24561 
24562 
24563     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24564     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24565       # Do we have a bin/java?
24566       if test ! -x "$BOOT_JDK/bin/java"; then
24567         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24568 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24569         BOOT_JDK_FOUND=no
24570       else
24571         # Do we have a bin/javac?
24572         if test ! -x "$BOOT_JDK/bin/javac"; then
24573           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24574 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24575           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24576 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24577           BOOT_JDK_FOUND=no
24578         else
24579           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24580           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24581 
24582           # Extra M4 quote needed to protect [] in grep expression.
24583           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24584           if test "x$FOUND_CORRECT_VERSION" = x; then
24585             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24586 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24587             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24588 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24589             BOOT_JDK_FOUND=no
24590           else
24591             # We're done! :-)
24592             BOOT_JDK_FOUND=yes
24593 
24594   # Only process if variable expands to non-empty
24595 
24596   if test "x$BOOT_JDK" != x; then
24597     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24598 
24599   # Input might be given as Windows format, start by converting to
24600   # unix format.
24601   path="$BOOT_JDK"
24602   new_path=`$CYGPATH -u "$path"`
24603 
24604   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24605   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24606   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24607   # "foo.exe" is OK but "foo" is an error.
24608   #
24609   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24610   # It is also a way to make sure we got the proper file name for the real test later on.
24611   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24612   if test "x$test_shortpath" = x; then
24613     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24614 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24615     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24616   fi
24617 
24618   # Call helper function which possibly converts this using DOS-style short mode.
24619   # If so, the updated path is stored in $new_path.
24620 
24621   input_path="$new_path"
24622   # Check if we need to convert this using DOS-style short mode. If the path
24623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24624   # take no chances and rewrite it.
24625   # Note: m4 eats our [], so we need to use [ and ] instead.
24626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24627   if test "x$has_forbidden_chars" != x; then
24628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24629     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24630     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24631     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24632       # Going to short mode and back again did indeed matter. Since short mode is
24633       # case insensitive, let's make it lowercase to improve readability.
24634       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24635       # Now convert it back to Unix-style (cygpath)
24636       input_path=`$CYGPATH -u "$shortmode_path"`
24637       new_path="$input_path"
24638     fi
24639   fi
24640 
24641   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24642   if test "x$test_cygdrive_prefix" = x; then
24643     # As a simple fix, exclude /usr/bin since it's not a real path.
24644     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24645       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24646       # a path prefixed by /cygdrive for fixpath to work.
24647       new_path="$CYGWIN_ROOT_PATH$input_path"
24648     fi
24649   fi
24650 
24651 
24652   if test "x$path" != "x$new_path"; then
24653     BOOT_JDK="$new_path"
24654     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24655 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24656   fi
24657 
24658     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24659 
24660   path="$BOOT_JDK"
24661   has_colon=`$ECHO $path | $GREP ^.:`
24662   new_path="$path"
24663   if test "x$has_colon" = x; then
24664     # Not in mixed or Windows style, start by that.
24665     new_path=`cmd //c echo $path`
24666   fi
24667 
24668 
24669   input_path="$new_path"
24670   # Check if we need to convert this using DOS-style short mode. If the path
24671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24672   # take no chances and rewrite it.
24673   # Note: m4 eats our [], so we need to use [ and ] instead.
24674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24675   if test "x$has_forbidden_chars" != x; then
24676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24677     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24678   fi
24679 
24680 
24681   windows_path="$new_path"
24682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24683     unix_path=`$CYGPATH -u "$windows_path"`
24684     new_path="$unix_path"
24685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24687     new_path="$unix_path"
24688   fi
24689 
24690   if test "x$path" != "x$new_path"; then
24691     BOOT_JDK="$new_path"
24692     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24693 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24694   fi
24695 
24696   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24697   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24698 
24699     else
24700       # We're on a unix platform. Hooray! :)
24701       path="$BOOT_JDK"
24702       has_space=`$ECHO "$path" | $GREP " "`
24703       if test "x$has_space" != x; then
24704         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24705 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24706         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24707       fi
24708 
24709       # Use eval to expand a potential ~
24710       eval path="$path"
24711       if test ! -f "$path" && test ! -d "$path"; then
24712         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24713       fi
24714 
24715       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24716     fi
24717   fi
24718 
24719             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24720 $as_echo_n "checking for Boot JDK... " >&6; }
24721             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24722 $as_echo "$BOOT_JDK" >&6; }
24723             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24724 $as_echo_n "checking Boot JDK version... " >&6; }
24725             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24726             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24727 $as_echo "$BOOT_JDK_VERSION" >&6; }
24728           fi # end check jdk version
24729         fi # end check javac
24730       fi # end check java
24731     fi # end check boot jdk found
24732   fi
24733 
24734 
24735   # Test: Is $JAVA_HOME set?
24736 
24737   if test "x$BOOT_JDK_FOUND" = xno; then
24738     # Now execute the test
24739 
24740   if test "x$JAVA_HOME" != x; then
24741     JAVA_HOME_PROCESSED="$JAVA_HOME"
24742 
24743   # Only process if variable expands to non-empty
24744 
24745   if test "x$JAVA_HOME_PROCESSED" != x; then
24746     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24747 
24748   # Input might be given as Windows format, start by converting to
24749   # unix format.
24750   path="$JAVA_HOME_PROCESSED"
24751   new_path=`$CYGPATH -u "$path"`
24752 
24753   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24754   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24755   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24756   # "foo.exe" is OK but "foo" is an error.
24757   #
24758   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24759   # It is also a way to make sure we got the proper file name for the real test later on.
24760   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24761   if test "x$test_shortpath" = x; then
24762     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24763 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24764     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24765   fi
24766 
24767   # Call helper function which possibly converts this using DOS-style short mode.
24768   # If so, the updated path is stored in $new_path.
24769 
24770   input_path="$new_path"
24771   # Check if we need to convert this using DOS-style short mode. If the path
24772   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24773   # take no chances and rewrite it.
24774   # Note: m4 eats our [], so we need to use [ and ] instead.
24775   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24776   if test "x$has_forbidden_chars" != x; then
24777     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24778     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24779     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24780     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24781       # Going to short mode and back again did indeed matter. Since short mode is
24782       # case insensitive, let's make it lowercase to improve readability.
24783       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24784       # Now convert it back to Unix-style (cygpath)
24785       input_path=`$CYGPATH -u "$shortmode_path"`
24786       new_path="$input_path"
24787     fi
24788   fi
24789 
24790   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24791   if test "x$test_cygdrive_prefix" = x; then
24792     # As a simple fix, exclude /usr/bin since it's not a real path.
24793     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24794       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24795       # a path prefixed by /cygdrive for fixpath to work.
24796       new_path="$CYGWIN_ROOT_PATH$input_path"
24797     fi
24798   fi
24799 
24800 
24801   if test "x$path" != "x$new_path"; then
24802     JAVA_HOME_PROCESSED="$new_path"
24803     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24804 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24805   fi
24806 
24807     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24808 
24809   path="$JAVA_HOME_PROCESSED"
24810   has_colon=`$ECHO $path | $GREP ^.:`
24811   new_path="$path"
24812   if test "x$has_colon" = x; then
24813     # Not in mixed or Windows style, start by that.
24814     new_path=`cmd //c echo $path`
24815   fi
24816 
24817 
24818   input_path="$new_path"
24819   # Check if we need to convert this using DOS-style short mode. If the path
24820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24821   # take no chances and rewrite it.
24822   # Note: m4 eats our [], so we need to use [ and ] instead.
24823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24824   if test "x$has_forbidden_chars" != x; then
24825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24826     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24827   fi
24828 
24829 
24830   windows_path="$new_path"
24831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24832     unix_path=`$CYGPATH -u "$windows_path"`
24833     new_path="$unix_path"
24834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24836     new_path="$unix_path"
24837   fi
24838 
24839   if test "x$path" != "x$new_path"; then
24840     JAVA_HOME_PROCESSED="$new_path"
24841     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24842 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24843   fi
24844 
24845   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24846   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24847 
24848     else
24849       # We're on a unix platform. Hooray! :)
24850       path="$JAVA_HOME_PROCESSED"
24851       has_space=`$ECHO "$path" | $GREP " "`
24852       if test "x$has_space" != x; then
24853         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24854 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24855         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24856       fi
24857 
24858       # Use eval to expand a potential ~
24859       eval path="$path"
24860       if test ! -f "$path" && test ! -d "$path"; then
24861         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24862       fi
24863 
24864       JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24865     fi
24866   fi
24867 
24868     if test ! -d "$JAVA_HOME_PROCESSED"; then
24869       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24870 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24871     else
24872       # Aha, the user has set a JAVA_HOME
24873       # let us use that as the Boot JDK.
24874       BOOT_JDK="$JAVA_HOME_PROCESSED"
24875       BOOT_JDK_FOUND=maybe
24876       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24877 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24878     fi
24879   fi
24880 
24881 
24882     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24883     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24884       # Do we have a bin/java?
24885       if test ! -x "$BOOT_JDK/bin/java"; then
24886         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24887 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24888         BOOT_JDK_FOUND=no
24889       else
24890         # Do we have a bin/javac?
24891         if test ! -x "$BOOT_JDK/bin/javac"; then
24892           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24893 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24894           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24895 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24896           BOOT_JDK_FOUND=no
24897         else
24898           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24899           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24900 
24901           # Extra M4 quote needed to protect [] in grep expression.
24902           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24903           if test "x$FOUND_CORRECT_VERSION" = x; then
24904             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24905 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24906             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24907 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24908             BOOT_JDK_FOUND=no
24909           else
24910             # We're done! :-)
24911             BOOT_JDK_FOUND=yes
24912 
24913   # Only process if variable expands to non-empty
24914 
24915   if test "x$BOOT_JDK" != x; then
24916     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24917 
24918   # Input might be given as Windows format, start by converting to
24919   # unix format.
24920   path="$BOOT_JDK"
24921   new_path=`$CYGPATH -u "$path"`
24922 
24923   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24924   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24925   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24926   # "foo.exe" is OK but "foo" is an error.
24927   #
24928   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24929   # It is also a way to make sure we got the proper file name for the real test later on.
24930   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24931   if test "x$test_shortpath" = x; then
24932     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24933 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24934     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24935   fi
24936 
24937   # Call helper function which possibly converts this using DOS-style short mode.
24938   # If so, the updated path is stored in $new_path.
24939 
24940   input_path="$new_path"
24941   # Check if we need to convert this using DOS-style short mode. If the path
24942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24943   # take no chances and rewrite it.
24944   # Note: m4 eats our [], so we need to use [ and ] instead.
24945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24946   if test "x$has_forbidden_chars" != x; then
24947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24948     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24949     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24950     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24951       # Going to short mode and back again did indeed matter. Since short mode is
24952       # case insensitive, let's make it lowercase to improve readability.
24953       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24954       # Now convert it back to Unix-style (cygpath)
24955       input_path=`$CYGPATH -u "$shortmode_path"`
24956       new_path="$input_path"
24957     fi
24958   fi
24959 
24960   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24961   if test "x$test_cygdrive_prefix" = x; then
24962     # As a simple fix, exclude /usr/bin since it's not a real path.
24963     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24964       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24965       # a path prefixed by /cygdrive for fixpath to work.
24966       new_path="$CYGWIN_ROOT_PATH$input_path"
24967     fi
24968   fi
24969 
24970 
24971   if test "x$path" != "x$new_path"; then
24972     BOOT_JDK="$new_path"
24973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24974 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24975   fi
24976 
24977     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24978 
24979   path="$BOOT_JDK"
24980   has_colon=`$ECHO $path | $GREP ^.:`
24981   new_path="$path"
24982   if test "x$has_colon" = x; then
24983     # Not in mixed or Windows style, start by that.
24984     new_path=`cmd //c echo $path`
24985   fi
24986 
24987 
24988   input_path="$new_path"
24989   # Check if we need to convert this using DOS-style short mode. If the path
24990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24991   # take no chances and rewrite it.
24992   # Note: m4 eats our [], so we need to use [ and ] instead.
24993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24994   if test "x$has_forbidden_chars" != x; then
24995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24996     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24997   fi
24998 
24999 
25000   windows_path="$new_path"
25001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25002     unix_path=`$CYGPATH -u "$windows_path"`
25003     new_path="$unix_path"
25004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25006     new_path="$unix_path"
25007   fi
25008 
25009   if test "x$path" != "x$new_path"; then
25010     BOOT_JDK="$new_path"
25011     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25012 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25013   fi
25014 
25015   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25016   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25017 
25018     else
25019       # We're on a unix platform. Hooray! :)
25020       path="$BOOT_JDK"
25021       has_space=`$ECHO "$path" | $GREP " "`
25022       if test "x$has_space" != x; then
25023         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25024 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25025         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25026       fi
25027 
25028       # Use eval to expand a potential ~
25029       eval path="$path"
25030       if test ! -f "$path" && test ! -d "$path"; then
25031         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25032       fi
25033 
25034       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25035     fi
25036   fi
25037 
25038             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25039 $as_echo_n "checking for Boot JDK... " >&6; }
25040             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25041 $as_echo "$BOOT_JDK" >&6; }
25042             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25043 $as_echo_n "checking Boot JDK version... " >&6; }
25044             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25045             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25046 $as_echo "$BOOT_JDK_VERSION" >&6; }
25047           fi # end check jdk version
25048         fi # end check javac
25049       fi # end check java
25050     fi # end check boot jdk found
25051   fi
25052 
25053 
25054   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25055 
25056   if test "x$BOOT_JDK_FOUND" = xno; then
25057     # Now execute the test
25058 
25059   # Extract the first word of "javac", so it can be a program name with args.
25060 set dummy javac; ac_word=$2
25061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25062 $as_echo_n "checking for $ac_word... " >&6; }
25063 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25064   $as_echo_n "(cached) " >&6
25065 else
25066   case $JAVAC_CHECK in
25067   [\\/]* | ?:[\\/]*)
25068   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25069   ;;
25070   *)
25071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25072 for as_dir in $PATH
25073 do
25074   IFS=$as_save_IFS
25075   test -z "$as_dir" && as_dir=.
25076     for ac_exec_ext in '' $ac_executable_extensions; do
25077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25078     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25080     break 2
25081   fi
25082 done
25083   done
25084 IFS=$as_save_IFS
25085 
25086   ;;
25087 esac
25088 fi
25089 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25090 if test -n "$JAVAC_CHECK"; then
25091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25092 $as_echo "$JAVAC_CHECK" >&6; }
25093 else
25094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25095 $as_echo "no" >&6; }
25096 fi
25097 
25098 
25099   # Extract the first word of "java", so it can be a program name with args.
25100 set dummy java; ac_word=$2
25101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25102 $as_echo_n "checking for $ac_word... " >&6; }
25103 if ${ac_cv_path_JAVA_CHECK+:} false; then :
25104   $as_echo_n "(cached) " >&6
25105 else
25106   case $JAVA_CHECK in
25107   [\\/]* | ?:[\\/]*)
25108   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25109   ;;
25110   *)
25111   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25112 for as_dir in $PATH
25113 do
25114   IFS=$as_save_IFS
25115   test -z "$as_dir" && as_dir=.
25116     for ac_exec_ext in '' $ac_executable_extensions; do
25117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25118     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25120     break 2
25121   fi
25122 done
25123   done
25124 IFS=$as_save_IFS
25125 
25126   ;;
25127 esac
25128 fi
25129 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25130 if test -n "$JAVA_CHECK"; then
25131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25132 $as_echo "$JAVA_CHECK" >&6; }
25133 else
25134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25135 $as_echo "no" >&6; }
25136 fi
25137 
25138 
25139   BINARY="$JAVAC_CHECK"
25140   if test "x$JAVAC_CHECK" = x; then
25141     BINARY="$JAVA_CHECK"
25142   fi
25143   if test "x$BINARY" != x; then
25144     # So there is a java(c) binary, it might be part of a JDK.
25145     # Lets find the JDK/JRE directory by following symbolic links.
25146     # Linux/GNU systems often have links from /usr/bin/java to
25147     # /etc/alternatives/java to the real JDK binary.
25148 
25149   if test "x$OPENJDK_BUILD_OS" != xwindows; then
25150     # Follow a chain of symbolic links. Use readlink
25151     # where it exists, else fall back to horribly
25152     # complicated shell code.
25153     if test "x$READLINK_TESTED" != yes; then
25154       # On MacOSX there is a readlink tool with a different
25155       # purpose than the GNU readlink tool. Check the found readlink.
25156       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25157       if test "x$ISGNU" = x; then
25158         # A readlink that we do not know how to use.
25159         # Are there other non-GNU readlinks out there?
25160         READLINK_TESTED=yes
25161         READLINK=
25162       fi
25163     fi
25164 
25165     if test "x$READLINK" != x; then
25166       BINARY=`$READLINK -f $BINARY`
25167     else
25168       # Save the current directory for restoring afterwards
25169       STARTDIR=$PWD
25170       COUNTER=0
25171       sym_link_dir=`$DIRNAME $BINARY`
25172       sym_link_file=`$BASENAME $BINARY`
25173       cd $sym_link_dir
25174       # Use -P flag to resolve symlinks in directories.
25175       cd `$THEPWDCMD -P`
25176       sym_link_dir=`$THEPWDCMD -P`
25177       # Resolve file symlinks
25178       while test $COUNTER -lt 20; do
25179         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25180         if test "x$ISLINK" == x; then
25181           # This is not a symbolic link! We are done!
25182           break
25183         fi
25184         # Again resolve directory symlinks since the target of the just found
25185         # link could be in a different directory
25186         cd `$DIRNAME $ISLINK`
25187         sym_link_dir=`$THEPWDCMD -P`
25188         sym_link_file=`$BASENAME $ISLINK`
25189         let COUNTER=COUNTER+1
25190       done
25191       cd $STARTDIR
25192       BINARY=$sym_link_dir/$sym_link_file
25193     fi
25194   fi
25195 
25196     BOOT_JDK=`dirname "$BINARY"`
25197     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25198     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25199       # Looks like we found ourselves an JDK
25200       BOOT_JDK_FOUND=maybe
25201       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25202 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25203     fi
25204   fi
25205 
25206 
25207     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25208     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25209       # Do we have a bin/java?
25210       if test ! -x "$BOOT_JDK/bin/java"; then
25211         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25212 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25213         BOOT_JDK_FOUND=no
25214       else
25215         # Do we have a bin/javac?
25216         if test ! -x "$BOOT_JDK/bin/javac"; then
25217           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25218 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25219           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25220 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25221           BOOT_JDK_FOUND=no
25222         else
25223           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25224           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25225 
25226           # Extra M4 quote needed to protect [] in grep expression.
25227           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25228           if test "x$FOUND_CORRECT_VERSION" = x; then
25229             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25230 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25231             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25232 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25233             BOOT_JDK_FOUND=no
25234           else
25235             # We're done! :-)
25236             BOOT_JDK_FOUND=yes
25237 
25238   # Only process if variable expands to non-empty
25239 
25240   if test "x$BOOT_JDK" != x; then
25241     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25242 
25243   # Input might be given as Windows format, start by converting to
25244   # unix format.
25245   path="$BOOT_JDK"
25246   new_path=`$CYGPATH -u "$path"`
25247 
25248   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25249   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25250   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25251   # "foo.exe" is OK but "foo" is an error.
25252   #
25253   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25254   # It is also a way to make sure we got the proper file name for the real test later on.
25255   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25256   if test "x$test_shortpath" = x; then
25257     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25258 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25259     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25260   fi
25261 
25262   # Call helper function which possibly converts this using DOS-style short mode.
25263   # If so, the updated path is stored in $new_path.
25264 
25265   input_path="$new_path"
25266   # Check if we need to convert this using DOS-style short mode. If the path
25267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25268   # take no chances and rewrite it.
25269   # Note: m4 eats our [], so we need to use [ and ] instead.
25270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25271   if test "x$has_forbidden_chars" != x; then
25272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25273     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25274     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25275     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25276       # Going to short mode and back again did indeed matter. Since short mode is
25277       # case insensitive, let's make it lowercase to improve readability.
25278       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25279       # Now convert it back to Unix-style (cygpath)
25280       input_path=`$CYGPATH -u "$shortmode_path"`
25281       new_path="$input_path"
25282     fi
25283   fi
25284 
25285   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25286   if test "x$test_cygdrive_prefix" = x; then
25287     # As a simple fix, exclude /usr/bin since it's not a real path.
25288     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25289       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25290       # a path prefixed by /cygdrive for fixpath to work.
25291       new_path="$CYGWIN_ROOT_PATH$input_path"
25292     fi
25293   fi
25294 
25295 
25296   if test "x$path" != "x$new_path"; then
25297     BOOT_JDK="$new_path"
25298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25299 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25300   fi
25301 
25302     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25303 
25304   path="$BOOT_JDK"
25305   has_colon=`$ECHO $path | $GREP ^.:`
25306   new_path="$path"
25307   if test "x$has_colon" = x; then
25308     # Not in mixed or Windows style, start by that.
25309     new_path=`cmd //c echo $path`
25310   fi
25311 
25312 
25313   input_path="$new_path"
25314   # Check if we need to convert this using DOS-style short mode. If the path
25315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25316   # take no chances and rewrite it.
25317   # Note: m4 eats our [], so we need to use [ and ] instead.
25318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25319   if test "x$has_forbidden_chars" != x; then
25320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25321     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25322   fi
25323 
25324 
25325   windows_path="$new_path"
25326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25327     unix_path=`$CYGPATH -u "$windows_path"`
25328     new_path="$unix_path"
25329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25331     new_path="$unix_path"
25332   fi
25333 
25334   if test "x$path" != "x$new_path"; then
25335     BOOT_JDK="$new_path"
25336     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25337 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25338   fi
25339 
25340   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25341   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25342 
25343     else
25344       # We're on a unix platform. Hooray! :)
25345       path="$BOOT_JDK"
25346       has_space=`$ECHO "$path" | $GREP " "`
25347       if test "x$has_space" != x; then
25348         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25349 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25350         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25351       fi
25352 
25353       # Use eval to expand a potential ~
25354       eval path="$path"
25355       if test ! -f "$path" && test ! -d "$path"; then
25356         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25357       fi
25358 
25359       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25360     fi
25361   fi
25362 
25363             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25364 $as_echo_n "checking for Boot JDK... " >&6; }
25365             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25366 $as_echo "$BOOT_JDK" >&6; }
25367             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25368 $as_echo_n "checking Boot JDK version... " >&6; }
25369             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25370             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25371 $as_echo "$BOOT_JDK_VERSION" >&6; }
25372           fi # end check jdk version
25373         fi # end check javac
25374       fi # end check java
25375     fi # end check boot jdk found
25376   fi
25377 
25378 
25379   # Test: Is there a JDK installed in default, well-known locations?
25380 
25381   if test "x$BOOT_JDK_FOUND" = xno; then
25382     # Now execute the test
25383 
25384   if test "x$OPENJDK_TARGET_OS" = xwindows; then
25385 
25386   if test "x$BOOT_JDK_FOUND" = xno; then
25387     # Now execute the test
25388 
25389   if test "x$ProgramW6432" != x; then
25390     VIRTUAL_DIR="$ProgramW6432/Java"
25391 
25392   windows_path="$VIRTUAL_DIR"
25393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25394     unix_path=`$CYGPATH -u "$windows_path"`
25395     VIRTUAL_DIR="$unix_path"
25396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25397     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25398     VIRTUAL_DIR="$unix_path"
25399   fi
25400 
25401 
25402   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25403   BOOT_JDK_SUFFIX=""
25404   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25405   if test "x$ALL_JDKS_FOUND" != x; then
25406     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25407 
25408   if test "x$BOOT_JDK_FOUND" = xno; then
25409     # Now execute the test
25410 
25411         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25412         if test -d "$BOOT_JDK"; then
25413           BOOT_JDK_FOUND=maybe
25414           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25415 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25416         fi
25417 
25418 
25419     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25420     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25421       # Do we have a bin/java?
25422       if test ! -x "$BOOT_JDK/bin/java"; then
25423         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25424 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25425         BOOT_JDK_FOUND=no
25426       else
25427         # Do we have a bin/javac?
25428         if test ! -x "$BOOT_JDK/bin/javac"; then
25429           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25430 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25431           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25432 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25433           BOOT_JDK_FOUND=no
25434         else
25435           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25436           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25437 
25438           # Extra M4 quote needed to protect [] in grep expression.
25439           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25440           if test "x$FOUND_CORRECT_VERSION" = x; then
25441             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25442 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25443             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25444 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25445             BOOT_JDK_FOUND=no
25446           else
25447             # We're done! :-)
25448             BOOT_JDK_FOUND=yes
25449 
25450   # Only process if variable expands to non-empty
25451 
25452   if test "x$BOOT_JDK" != x; then
25453     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25454 
25455   # Input might be given as Windows format, start by converting to
25456   # unix format.
25457   path="$BOOT_JDK"
25458   new_path=`$CYGPATH -u "$path"`
25459 
25460   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25461   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25462   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25463   # "foo.exe" is OK but "foo" is an error.
25464   #
25465   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25466   # It is also a way to make sure we got the proper file name for the real test later on.
25467   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25468   if test "x$test_shortpath" = x; then
25469     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25470 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25471     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25472   fi
25473 
25474   # Call helper function which possibly converts this using DOS-style short mode.
25475   # If so, the updated path is stored in $new_path.
25476 
25477   input_path="$new_path"
25478   # Check if we need to convert this using DOS-style short mode. If the path
25479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25480   # take no chances and rewrite it.
25481   # Note: m4 eats our [], so we need to use [ and ] instead.
25482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25483   if test "x$has_forbidden_chars" != x; then
25484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25485     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25486     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25487     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25488       # Going to short mode and back again did indeed matter. Since short mode is
25489       # case insensitive, let's make it lowercase to improve readability.
25490       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25491       # Now convert it back to Unix-style (cygpath)
25492       input_path=`$CYGPATH -u "$shortmode_path"`
25493       new_path="$input_path"
25494     fi
25495   fi
25496 
25497   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25498   if test "x$test_cygdrive_prefix" = x; then
25499     # As a simple fix, exclude /usr/bin since it's not a real path.
25500     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25501       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25502       # a path prefixed by /cygdrive for fixpath to work.
25503       new_path="$CYGWIN_ROOT_PATH$input_path"
25504     fi
25505   fi
25506 
25507 
25508   if test "x$path" != "x$new_path"; then
25509     BOOT_JDK="$new_path"
25510     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25511 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25512   fi
25513 
25514     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25515 
25516   path="$BOOT_JDK"
25517   has_colon=`$ECHO $path | $GREP ^.:`
25518   new_path="$path"
25519   if test "x$has_colon" = x; then
25520     # Not in mixed or Windows style, start by that.
25521     new_path=`cmd //c echo $path`
25522   fi
25523 
25524 
25525   input_path="$new_path"
25526   # Check if we need to convert this using DOS-style short mode. If the path
25527   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25528   # take no chances and rewrite it.
25529   # Note: m4 eats our [], so we need to use [ and ] instead.
25530   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25531   if test "x$has_forbidden_chars" != x; then
25532     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25533     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25534   fi
25535 
25536 
25537   windows_path="$new_path"
25538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25539     unix_path=`$CYGPATH -u "$windows_path"`
25540     new_path="$unix_path"
25541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25543     new_path="$unix_path"
25544   fi
25545 
25546   if test "x$path" != "x$new_path"; then
25547     BOOT_JDK="$new_path"
25548     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25549 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25550   fi
25551 
25552   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25553   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25554 
25555     else
25556       # We're on a unix platform. Hooray! :)
25557       path="$BOOT_JDK"
25558       has_space=`$ECHO "$path" | $GREP " "`
25559       if test "x$has_space" != x; then
25560         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25561 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25562         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25563       fi
25564 
25565       # Use eval to expand a potential ~
25566       eval path="$path"
25567       if test ! -f "$path" && test ! -d "$path"; then
25568         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25569       fi
25570 
25571       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25572     fi
25573   fi
25574 
25575             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25576 $as_echo_n "checking for Boot JDK... " >&6; }
25577             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25578 $as_echo "$BOOT_JDK" >&6; }
25579             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25580 $as_echo_n "checking Boot JDK version... " >&6; }
25581             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25582             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25583 $as_echo "$BOOT_JDK_VERSION" >&6; }
25584           fi # end check jdk version
25585         fi # end check javac
25586       fi # end check java
25587     fi # end check boot jdk found
25588   fi
25589 
25590     done
25591   fi
25592 
25593   fi
25594 
25595 
25596     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25597     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25598       # Do we have a bin/java?
25599       if test ! -x "$BOOT_JDK/bin/java"; then
25600         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25601 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25602         BOOT_JDK_FOUND=no
25603       else
25604         # Do we have a bin/javac?
25605         if test ! -x "$BOOT_JDK/bin/javac"; then
25606           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25607 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25608           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25609 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25610           BOOT_JDK_FOUND=no
25611         else
25612           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25613           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25614 
25615           # Extra M4 quote needed to protect [] in grep expression.
25616           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25617           if test "x$FOUND_CORRECT_VERSION" = x; then
25618             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25619 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25620             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25621 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25622             BOOT_JDK_FOUND=no
25623           else
25624             # We're done! :-)
25625             BOOT_JDK_FOUND=yes
25626 
25627   # Only process if variable expands to non-empty
25628 
25629   if test "x$BOOT_JDK" != x; then
25630     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25631 
25632   # Input might be given as Windows format, start by converting to
25633   # unix format.
25634   path="$BOOT_JDK"
25635   new_path=`$CYGPATH -u "$path"`
25636 
25637   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25638   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25639   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25640   # "foo.exe" is OK but "foo" is an error.
25641   #
25642   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25643   # It is also a way to make sure we got the proper file name for the real test later on.
25644   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25645   if test "x$test_shortpath" = x; then
25646     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25647 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25648     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25649   fi
25650 
25651   # Call helper function which possibly converts this using DOS-style short mode.
25652   # If so, the updated path is stored in $new_path.
25653 
25654   input_path="$new_path"
25655   # Check if we need to convert this using DOS-style short mode. If the path
25656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25657   # take no chances and rewrite it.
25658   # Note: m4 eats our [], so we need to use [ and ] instead.
25659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25660   if test "x$has_forbidden_chars" != x; then
25661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25662     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25663     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25664     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25665       # Going to short mode and back again did indeed matter. Since short mode is
25666       # case insensitive, let's make it lowercase to improve readability.
25667       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668       # Now convert it back to Unix-style (cygpath)
25669       input_path=`$CYGPATH -u "$shortmode_path"`
25670       new_path="$input_path"
25671     fi
25672   fi
25673 
25674   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25675   if test "x$test_cygdrive_prefix" = x; then
25676     # As a simple fix, exclude /usr/bin since it's not a real path.
25677     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25678       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25679       # a path prefixed by /cygdrive for fixpath to work.
25680       new_path="$CYGWIN_ROOT_PATH$input_path"
25681     fi
25682   fi
25683 
25684 
25685   if test "x$path" != "x$new_path"; then
25686     BOOT_JDK="$new_path"
25687     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25688 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25689   fi
25690 
25691     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25692 
25693   path="$BOOT_JDK"
25694   has_colon=`$ECHO $path | $GREP ^.:`
25695   new_path="$path"
25696   if test "x$has_colon" = x; then
25697     # Not in mixed or Windows style, start by that.
25698     new_path=`cmd //c echo $path`
25699   fi
25700 
25701 
25702   input_path="$new_path"
25703   # Check if we need to convert this using DOS-style short mode. If the path
25704   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25705   # take no chances and rewrite it.
25706   # Note: m4 eats our [], so we need to use [ and ] instead.
25707   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25708   if test "x$has_forbidden_chars" != x; then
25709     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25710     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25711   fi
25712 
25713 
25714   windows_path="$new_path"
25715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25716     unix_path=`$CYGPATH -u "$windows_path"`
25717     new_path="$unix_path"
25718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25720     new_path="$unix_path"
25721   fi
25722 
25723   if test "x$path" != "x$new_path"; then
25724     BOOT_JDK="$new_path"
25725     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25726 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25727   fi
25728 
25729   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25730   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25731 
25732     else
25733       # We're on a unix platform. Hooray! :)
25734       path="$BOOT_JDK"
25735       has_space=`$ECHO "$path" | $GREP " "`
25736       if test "x$has_space" != x; then
25737         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25738 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25739         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25740       fi
25741 
25742       # Use eval to expand a potential ~
25743       eval path="$path"
25744       if test ! -f "$path" && test ! -d "$path"; then
25745         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25746       fi
25747 
25748       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25749     fi
25750   fi
25751 
25752             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25753 $as_echo_n "checking for Boot JDK... " >&6; }
25754             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25755 $as_echo "$BOOT_JDK" >&6; }
25756             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25757 $as_echo_n "checking Boot JDK version... " >&6; }
25758             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25759             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25760 $as_echo "$BOOT_JDK_VERSION" >&6; }
25761           fi # end check jdk version
25762         fi # end check javac
25763       fi # end check java
25764     fi # end check boot jdk found
25765   fi
25766 
25767 
25768   if test "x$BOOT_JDK_FOUND" = xno; then
25769     # Now execute the test
25770 
25771   if test "x$PROGRAMW6432" != x; then
25772     VIRTUAL_DIR="$PROGRAMW6432/Java"
25773 
25774   windows_path="$VIRTUAL_DIR"
25775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25776     unix_path=`$CYGPATH -u "$windows_path"`
25777     VIRTUAL_DIR="$unix_path"
25778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25780     VIRTUAL_DIR="$unix_path"
25781   fi
25782 
25783 
25784   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25785   BOOT_JDK_SUFFIX=""
25786   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25787   if test "x$ALL_JDKS_FOUND" != x; then
25788     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25789 
25790   if test "x$BOOT_JDK_FOUND" = xno; then
25791     # Now execute the test
25792 
25793         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25794         if test -d "$BOOT_JDK"; then
25795           BOOT_JDK_FOUND=maybe
25796           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25797 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25798         fi
25799 
25800 
25801     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25802     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25803       # Do we have a bin/java?
25804       if test ! -x "$BOOT_JDK/bin/java"; then
25805         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25807         BOOT_JDK_FOUND=no
25808       else
25809         # Do we have a bin/javac?
25810         if test ! -x "$BOOT_JDK/bin/javac"; then
25811           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25812 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25813           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25814 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25815           BOOT_JDK_FOUND=no
25816         else
25817           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25818           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25819 
25820           # Extra M4 quote needed to protect [] in grep expression.
25821           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25822           if test "x$FOUND_CORRECT_VERSION" = x; then
25823             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25824 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25825             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25826 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25827             BOOT_JDK_FOUND=no
25828           else
25829             # We're done! :-)
25830             BOOT_JDK_FOUND=yes
25831 
25832   # Only process if variable expands to non-empty
25833 
25834   if test "x$BOOT_JDK" != x; then
25835     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25836 
25837   # Input might be given as Windows format, start by converting to
25838   # unix format.
25839   path="$BOOT_JDK"
25840   new_path=`$CYGPATH -u "$path"`
25841 
25842   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25843   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25844   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25845   # "foo.exe" is OK but "foo" is an error.
25846   #
25847   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25848   # It is also a way to make sure we got the proper file name for the real test later on.
25849   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25850   if test "x$test_shortpath" = x; then
25851     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25852 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25853     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25854   fi
25855 
25856   # Call helper function which possibly converts this using DOS-style short mode.
25857   # If so, the updated path is stored in $new_path.
25858 
25859   input_path="$new_path"
25860   # Check if we need to convert this using DOS-style short mode. If the path
25861   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25862   # take no chances and rewrite it.
25863   # Note: m4 eats our [], so we need to use [ and ] instead.
25864   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25865   if test "x$has_forbidden_chars" != x; then
25866     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25867     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25868     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25869     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25870       # Going to short mode and back again did indeed matter. Since short mode is
25871       # case insensitive, let's make it lowercase to improve readability.
25872       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25873       # Now convert it back to Unix-style (cygpath)
25874       input_path=`$CYGPATH -u "$shortmode_path"`
25875       new_path="$input_path"
25876     fi
25877   fi
25878 
25879   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25880   if test "x$test_cygdrive_prefix" = x; then
25881     # As a simple fix, exclude /usr/bin since it's not a real path.
25882     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25883       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25884       # a path prefixed by /cygdrive for fixpath to work.
25885       new_path="$CYGWIN_ROOT_PATH$input_path"
25886     fi
25887   fi
25888 
25889 
25890   if test "x$path" != "x$new_path"; then
25891     BOOT_JDK="$new_path"
25892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25893 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25894   fi
25895 
25896     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25897 
25898   path="$BOOT_JDK"
25899   has_colon=`$ECHO $path | $GREP ^.:`
25900   new_path="$path"
25901   if test "x$has_colon" = x; then
25902     # Not in mixed or Windows style, start by that.
25903     new_path=`cmd //c echo $path`
25904   fi
25905 
25906 
25907   input_path="$new_path"
25908   # Check if we need to convert this using DOS-style short mode. If the path
25909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25910   # take no chances and rewrite it.
25911   # Note: m4 eats our [], so we need to use [ and ] instead.
25912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25913   if test "x$has_forbidden_chars" != x; then
25914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25915     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25916   fi
25917 
25918 
25919   windows_path="$new_path"
25920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25921     unix_path=`$CYGPATH -u "$windows_path"`
25922     new_path="$unix_path"
25923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25925     new_path="$unix_path"
25926   fi
25927 
25928   if test "x$path" != "x$new_path"; then
25929     BOOT_JDK="$new_path"
25930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25931 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25932   fi
25933 
25934   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25935   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25936 
25937     else
25938       # We're on a unix platform. Hooray! :)
25939       path="$BOOT_JDK"
25940       has_space=`$ECHO "$path" | $GREP " "`
25941       if test "x$has_space" != x; then
25942         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25943 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25944         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25945       fi
25946 
25947       # Use eval to expand a potential ~
25948       eval path="$path"
25949       if test ! -f "$path" && test ! -d "$path"; then
25950         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25951       fi
25952 
25953       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25954     fi
25955   fi
25956 
25957             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25958 $as_echo_n "checking for Boot JDK... " >&6; }
25959             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25960 $as_echo "$BOOT_JDK" >&6; }
25961             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25962 $as_echo_n "checking Boot JDK version... " >&6; }
25963             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25964             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25965 $as_echo "$BOOT_JDK_VERSION" >&6; }
25966           fi # end check jdk version
25967         fi # end check javac
25968       fi # end check java
25969     fi # end check boot jdk found
25970   fi
25971 
25972     done
25973   fi
25974 
25975   fi
25976 
25977 
25978     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25979     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25980       # Do we have a bin/java?
25981       if test ! -x "$BOOT_JDK/bin/java"; then
25982         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25983 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25984         BOOT_JDK_FOUND=no
25985       else
25986         # Do we have a bin/javac?
25987         if test ! -x "$BOOT_JDK/bin/javac"; then
25988           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25989 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25990           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25991 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25992           BOOT_JDK_FOUND=no
25993         else
25994           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25995           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25996 
25997           # Extra M4 quote needed to protect [] in grep expression.
25998           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25999           if test "x$FOUND_CORRECT_VERSION" = x; then
26000             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26001 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26002             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26003 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26004             BOOT_JDK_FOUND=no
26005           else
26006             # We're done! :-)
26007             BOOT_JDK_FOUND=yes
26008 
26009   # Only process if variable expands to non-empty
26010 
26011   if test "x$BOOT_JDK" != x; then
26012     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26013 
26014   # Input might be given as Windows format, start by converting to
26015   # unix format.
26016   path="$BOOT_JDK"
26017   new_path=`$CYGPATH -u "$path"`
26018 
26019   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26020   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26021   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26022   # "foo.exe" is OK but "foo" is an error.
26023   #
26024   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26025   # It is also a way to make sure we got the proper file name for the real test later on.
26026   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26027   if test "x$test_shortpath" = x; then
26028     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26029 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26030     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26031   fi
26032 
26033   # Call helper function which possibly converts this using DOS-style short mode.
26034   # If so, the updated path is stored in $new_path.
26035 
26036   input_path="$new_path"
26037   # Check if we need to convert this using DOS-style short mode. If the path
26038   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26039   # take no chances and rewrite it.
26040   # Note: m4 eats our [], so we need to use [ and ] instead.
26041   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26042   if test "x$has_forbidden_chars" != x; then
26043     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26044     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26045     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26046     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26047       # Going to short mode and back again did indeed matter. Since short mode is
26048       # case insensitive, let's make it lowercase to improve readability.
26049       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26050       # Now convert it back to Unix-style (cygpath)
26051       input_path=`$CYGPATH -u "$shortmode_path"`
26052       new_path="$input_path"
26053     fi
26054   fi
26055 
26056   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26057   if test "x$test_cygdrive_prefix" = x; then
26058     # As a simple fix, exclude /usr/bin since it's not a real path.
26059     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26060       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26061       # a path prefixed by /cygdrive for fixpath to work.
26062       new_path="$CYGWIN_ROOT_PATH$input_path"
26063     fi
26064   fi
26065 
26066 
26067   if test "x$path" != "x$new_path"; then
26068     BOOT_JDK="$new_path"
26069     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26070 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26071   fi
26072 
26073     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26074 
26075   path="$BOOT_JDK"
26076   has_colon=`$ECHO $path | $GREP ^.:`
26077   new_path="$path"
26078   if test "x$has_colon" = x; then
26079     # Not in mixed or Windows style, start by that.
26080     new_path=`cmd //c echo $path`
26081   fi
26082 
26083 
26084   input_path="$new_path"
26085   # Check if we need to convert this using DOS-style short mode. If the path
26086   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26087   # take no chances and rewrite it.
26088   # Note: m4 eats our [], so we need to use [ and ] instead.
26089   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26090   if test "x$has_forbidden_chars" != x; then
26091     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26092     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26093   fi
26094 
26095 
26096   windows_path="$new_path"
26097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26098     unix_path=`$CYGPATH -u "$windows_path"`
26099     new_path="$unix_path"
26100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26101     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26102     new_path="$unix_path"
26103   fi
26104 
26105   if test "x$path" != "x$new_path"; then
26106     BOOT_JDK="$new_path"
26107     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26108 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26109   fi
26110 
26111   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26112   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26113 
26114     else
26115       # We're on a unix platform. Hooray! :)
26116       path="$BOOT_JDK"
26117       has_space=`$ECHO "$path" | $GREP " "`
26118       if test "x$has_space" != x; then
26119         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26120 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26121         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26122       fi
26123 
26124       # Use eval to expand a potential ~
26125       eval path="$path"
26126       if test ! -f "$path" && test ! -d "$path"; then
26127         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26128       fi
26129 
26130       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26131     fi
26132   fi
26133 
26134             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26135 $as_echo_n "checking for Boot JDK... " >&6; }
26136             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26137 $as_echo "$BOOT_JDK" >&6; }
26138             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26139 $as_echo_n "checking Boot JDK version... " >&6; }
26140             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26141             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26142 $as_echo "$BOOT_JDK_VERSION" >&6; }
26143           fi # end check jdk version
26144         fi # end check javac
26145       fi # end check java
26146     fi # end check boot jdk found
26147   fi
26148 
26149 
26150   if test "x$BOOT_JDK_FOUND" = xno; then
26151     # Now execute the test
26152 
26153   if test "x$PROGRAMFILES" != x; then
26154     VIRTUAL_DIR="$PROGRAMFILES/Java"
26155 
26156   windows_path="$VIRTUAL_DIR"
26157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26158     unix_path=`$CYGPATH -u "$windows_path"`
26159     VIRTUAL_DIR="$unix_path"
26160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26161     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26162     VIRTUAL_DIR="$unix_path"
26163   fi
26164 
26165 
26166   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26167   BOOT_JDK_SUFFIX=""
26168   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26169   if test "x$ALL_JDKS_FOUND" != x; then
26170     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26171 
26172   if test "x$BOOT_JDK_FOUND" = xno; then
26173     # Now execute the test
26174 
26175         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26176         if test -d "$BOOT_JDK"; then
26177           BOOT_JDK_FOUND=maybe
26178           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26179 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26180         fi
26181 
26182 
26183     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26184     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26185       # Do we have a bin/java?
26186       if test ! -x "$BOOT_JDK/bin/java"; then
26187         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26188 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26189         BOOT_JDK_FOUND=no
26190       else
26191         # Do we have a bin/javac?
26192         if test ! -x "$BOOT_JDK/bin/javac"; then
26193           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26194 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26195           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26196 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26197           BOOT_JDK_FOUND=no
26198         else
26199           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26200           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26201 
26202           # Extra M4 quote needed to protect [] in grep expression.
26203           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26204           if test "x$FOUND_CORRECT_VERSION" = x; then
26205             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26206 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26207             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26208 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26209             BOOT_JDK_FOUND=no
26210           else
26211             # We're done! :-)
26212             BOOT_JDK_FOUND=yes
26213 
26214   # Only process if variable expands to non-empty
26215 
26216   if test "x$BOOT_JDK" != x; then
26217     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26218 
26219   # Input might be given as Windows format, start by converting to
26220   # unix format.
26221   path="$BOOT_JDK"
26222   new_path=`$CYGPATH -u "$path"`
26223 
26224   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26225   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26226   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26227   # "foo.exe" is OK but "foo" is an error.
26228   #
26229   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26230   # It is also a way to make sure we got the proper file name for the real test later on.
26231   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26232   if test "x$test_shortpath" = x; then
26233     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26234 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26235     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26236   fi
26237 
26238   # Call helper function which possibly converts this using DOS-style short mode.
26239   # If so, the updated path is stored in $new_path.
26240 
26241   input_path="$new_path"
26242   # Check if we need to convert this using DOS-style short mode. If the path
26243   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26244   # take no chances and rewrite it.
26245   # Note: m4 eats our [], so we need to use [ and ] instead.
26246   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26247   if test "x$has_forbidden_chars" != x; then
26248     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26249     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26250     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26251     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26252       # Going to short mode and back again did indeed matter. Since short mode is
26253       # case insensitive, let's make it lowercase to improve readability.
26254       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26255       # Now convert it back to Unix-style (cygpath)
26256       input_path=`$CYGPATH -u "$shortmode_path"`
26257       new_path="$input_path"
26258     fi
26259   fi
26260 
26261   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26262   if test "x$test_cygdrive_prefix" = x; then
26263     # As a simple fix, exclude /usr/bin since it's not a real path.
26264     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26265       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26266       # a path prefixed by /cygdrive for fixpath to work.
26267       new_path="$CYGWIN_ROOT_PATH$input_path"
26268     fi
26269   fi
26270 
26271 
26272   if test "x$path" != "x$new_path"; then
26273     BOOT_JDK="$new_path"
26274     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26275 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26276   fi
26277 
26278     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26279 
26280   path="$BOOT_JDK"
26281   has_colon=`$ECHO $path | $GREP ^.:`
26282   new_path="$path"
26283   if test "x$has_colon" = x; then
26284     # Not in mixed or Windows style, start by that.
26285     new_path=`cmd //c echo $path`
26286   fi
26287 
26288 
26289   input_path="$new_path"
26290   # Check if we need to convert this using DOS-style short mode. If the path
26291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26292   # take no chances and rewrite it.
26293   # Note: m4 eats our [], so we need to use [ and ] instead.
26294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26295   if test "x$has_forbidden_chars" != x; then
26296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26297     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26298   fi
26299 
26300 
26301   windows_path="$new_path"
26302   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26303     unix_path=`$CYGPATH -u "$windows_path"`
26304     new_path="$unix_path"
26305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26306     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26307     new_path="$unix_path"
26308   fi
26309 
26310   if test "x$path" != "x$new_path"; then
26311     BOOT_JDK="$new_path"
26312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26313 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26314   fi
26315 
26316   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26317   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26318 
26319     else
26320       # We're on a unix platform. Hooray! :)
26321       path="$BOOT_JDK"
26322       has_space=`$ECHO "$path" | $GREP " "`
26323       if test "x$has_space" != x; then
26324         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26325 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26326         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26327       fi
26328 
26329       # Use eval to expand a potential ~
26330       eval path="$path"
26331       if test ! -f "$path" && test ! -d "$path"; then
26332         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26333       fi
26334 
26335       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26336     fi
26337   fi
26338 
26339             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26340 $as_echo_n "checking for Boot JDK... " >&6; }
26341             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26342 $as_echo "$BOOT_JDK" >&6; }
26343             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26344 $as_echo_n "checking Boot JDK version... " >&6; }
26345             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26346             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26347 $as_echo "$BOOT_JDK_VERSION" >&6; }
26348           fi # end check jdk version
26349         fi # end check javac
26350       fi # end check java
26351     fi # end check boot jdk found
26352   fi
26353 
26354     done
26355   fi
26356 
26357   fi
26358 
26359 
26360     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26361     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26362       # Do we have a bin/java?
26363       if test ! -x "$BOOT_JDK/bin/java"; then
26364         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26365 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26366         BOOT_JDK_FOUND=no
26367       else
26368         # Do we have a bin/javac?
26369         if test ! -x "$BOOT_JDK/bin/javac"; then
26370           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26371 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26372           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26373 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26374           BOOT_JDK_FOUND=no
26375         else
26376           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26377           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26378 
26379           # Extra M4 quote needed to protect [] in grep expression.
26380           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26381           if test "x$FOUND_CORRECT_VERSION" = x; then
26382             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26383 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26384             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26385 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26386             BOOT_JDK_FOUND=no
26387           else
26388             # We're done! :-)
26389             BOOT_JDK_FOUND=yes
26390 
26391   # Only process if variable expands to non-empty
26392 
26393   if test "x$BOOT_JDK" != x; then
26394     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26395 
26396   # Input might be given as Windows format, start by converting to
26397   # unix format.
26398   path="$BOOT_JDK"
26399   new_path=`$CYGPATH -u "$path"`
26400 
26401   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26402   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26403   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26404   # "foo.exe" is OK but "foo" is an error.
26405   #
26406   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26407   # It is also a way to make sure we got the proper file name for the real test later on.
26408   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26409   if test "x$test_shortpath" = x; then
26410     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26411 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26412     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26413   fi
26414 
26415   # Call helper function which possibly converts this using DOS-style short mode.
26416   # If so, the updated path is stored in $new_path.
26417 
26418   input_path="$new_path"
26419   # Check if we need to convert this using DOS-style short mode. If the path
26420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26421   # take no chances and rewrite it.
26422   # Note: m4 eats our [], so we need to use [ and ] instead.
26423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26424   if test "x$has_forbidden_chars" != x; then
26425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26426     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26427     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26428     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26429       # Going to short mode and back again did indeed matter. Since short mode is
26430       # case insensitive, let's make it lowercase to improve readability.
26431       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26432       # Now convert it back to Unix-style (cygpath)
26433       input_path=`$CYGPATH -u "$shortmode_path"`
26434       new_path="$input_path"
26435     fi
26436   fi
26437 
26438   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26439   if test "x$test_cygdrive_prefix" = x; then
26440     # As a simple fix, exclude /usr/bin since it's not a real path.
26441     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26442       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26443       # a path prefixed by /cygdrive for fixpath to work.
26444       new_path="$CYGWIN_ROOT_PATH$input_path"
26445     fi
26446   fi
26447 
26448 
26449   if test "x$path" != "x$new_path"; then
26450     BOOT_JDK="$new_path"
26451     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26452 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26453   fi
26454 
26455     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26456 
26457   path="$BOOT_JDK"
26458   has_colon=`$ECHO $path | $GREP ^.:`
26459   new_path="$path"
26460   if test "x$has_colon" = x; then
26461     # Not in mixed or Windows style, start by that.
26462     new_path=`cmd //c echo $path`
26463   fi
26464 
26465 
26466   input_path="$new_path"
26467   # Check if we need to convert this using DOS-style short mode. If the path
26468   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26469   # take no chances and rewrite it.
26470   # Note: m4 eats our [], so we need to use [ and ] instead.
26471   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26472   if test "x$has_forbidden_chars" != x; then
26473     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26474     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26475   fi
26476 
26477 
26478   windows_path="$new_path"
26479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26480     unix_path=`$CYGPATH -u "$windows_path"`
26481     new_path="$unix_path"
26482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26484     new_path="$unix_path"
26485   fi
26486 
26487   if test "x$path" != "x$new_path"; then
26488     BOOT_JDK="$new_path"
26489     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26490 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26491   fi
26492 
26493   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26494   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26495 
26496     else
26497       # We're on a unix platform. Hooray! :)
26498       path="$BOOT_JDK"
26499       has_space=`$ECHO "$path" | $GREP " "`
26500       if test "x$has_space" != x; then
26501         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26502 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26503         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26504       fi
26505 
26506       # Use eval to expand a potential ~
26507       eval path="$path"
26508       if test ! -f "$path" && test ! -d "$path"; then
26509         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26510       fi
26511 
26512       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26513     fi
26514   fi
26515 
26516             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26517 $as_echo_n "checking for Boot JDK... " >&6; }
26518             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26519 $as_echo "$BOOT_JDK" >&6; }
26520             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26521 $as_echo_n "checking Boot JDK version... " >&6; }
26522             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26523             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26524 $as_echo "$BOOT_JDK_VERSION" >&6; }
26525           fi # end check jdk version
26526         fi # end check javac
26527       fi # end check java
26528     fi # end check boot jdk found
26529   fi
26530 
26531 
26532   if test "x$BOOT_JDK_FOUND" = xno; then
26533     # Now execute the test
26534 
26535   if test "x$ProgramFiles" != x; then
26536     VIRTUAL_DIR="$ProgramFiles/Java"
26537 
26538   windows_path="$VIRTUAL_DIR"
26539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26540     unix_path=`$CYGPATH -u "$windows_path"`
26541     VIRTUAL_DIR="$unix_path"
26542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26543     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26544     VIRTUAL_DIR="$unix_path"
26545   fi
26546 
26547 
26548   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26549   BOOT_JDK_SUFFIX=""
26550   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26551   if test "x$ALL_JDKS_FOUND" != x; then
26552     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26553 
26554   if test "x$BOOT_JDK_FOUND" = xno; then
26555     # Now execute the test
26556 
26557         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26558         if test -d "$BOOT_JDK"; then
26559           BOOT_JDK_FOUND=maybe
26560           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26561 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26562         fi
26563 
26564 
26565     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26566     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26567       # Do we have a bin/java?
26568       if test ! -x "$BOOT_JDK/bin/java"; then
26569         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26570 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26571         BOOT_JDK_FOUND=no
26572       else
26573         # Do we have a bin/javac?
26574         if test ! -x "$BOOT_JDK/bin/javac"; then
26575           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26576 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26577           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26578 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26579           BOOT_JDK_FOUND=no
26580         else
26581           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26582           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26583 
26584           # Extra M4 quote needed to protect [] in grep expression.
26585           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26586           if test "x$FOUND_CORRECT_VERSION" = x; then
26587             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26588 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26589             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26590 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26591             BOOT_JDK_FOUND=no
26592           else
26593             # We're done! :-)
26594             BOOT_JDK_FOUND=yes
26595 
26596   # Only process if variable expands to non-empty
26597 
26598   if test "x$BOOT_JDK" != x; then
26599     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26600 
26601   # Input might be given as Windows format, start by converting to
26602   # unix format.
26603   path="$BOOT_JDK"
26604   new_path=`$CYGPATH -u "$path"`
26605 
26606   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26607   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26608   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26609   # "foo.exe" is OK but "foo" is an error.
26610   #
26611   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26612   # It is also a way to make sure we got the proper file name for the real test later on.
26613   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26614   if test "x$test_shortpath" = x; then
26615     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26616 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26617     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26618   fi
26619 
26620   # Call helper function which possibly converts this using DOS-style short mode.
26621   # If so, the updated path is stored in $new_path.
26622 
26623   input_path="$new_path"
26624   # Check if we need to convert this using DOS-style short mode. If the path
26625   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26626   # take no chances and rewrite it.
26627   # Note: m4 eats our [], so we need to use [ and ] instead.
26628   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26629   if test "x$has_forbidden_chars" != x; then
26630     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26631     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26632     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26633     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26634       # Going to short mode and back again did indeed matter. Since short mode is
26635       # case insensitive, let's make it lowercase to improve readability.
26636       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26637       # Now convert it back to Unix-style (cygpath)
26638       input_path=`$CYGPATH -u "$shortmode_path"`
26639       new_path="$input_path"
26640     fi
26641   fi
26642 
26643   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26644   if test "x$test_cygdrive_prefix" = x; then
26645     # As a simple fix, exclude /usr/bin since it's not a real path.
26646     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26647       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26648       # a path prefixed by /cygdrive for fixpath to work.
26649       new_path="$CYGWIN_ROOT_PATH$input_path"
26650     fi
26651   fi
26652 
26653 
26654   if test "x$path" != "x$new_path"; then
26655     BOOT_JDK="$new_path"
26656     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26657 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26658   fi
26659 
26660     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26661 
26662   path="$BOOT_JDK"
26663   has_colon=`$ECHO $path | $GREP ^.:`
26664   new_path="$path"
26665   if test "x$has_colon" = x; then
26666     # Not in mixed or Windows style, start by that.
26667     new_path=`cmd //c echo $path`
26668   fi
26669 
26670 
26671   input_path="$new_path"
26672   # Check if we need to convert this using DOS-style short mode. If the path
26673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26674   # take no chances and rewrite it.
26675   # Note: m4 eats our [], so we need to use [ and ] instead.
26676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26677   if test "x$has_forbidden_chars" != x; then
26678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26679     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26680   fi
26681 
26682 
26683   windows_path="$new_path"
26684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26685     unix_path=`$CYGPATH -u "$windows_path"`
26686     new_path="$unix_path"
26687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26689     new_path="$unix_path"
26690   fi
26691 
26692   if test "x$path" != "x$new_path"; then
26693     BOOT_JDK="$new_path"
26694     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26695 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26696   fi
26697 
26698   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26699   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26700 
26701     else
26702       # We're on a unix platform. Hooray! :)
26703       path="$BOOT_JDK"
26704       has_space=`$ECHO "$path" | $GREP " "`
26705       if test "x$has_space" != x; then
26706         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26707 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26708         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26709       fi
26710 
26711       # Use eval to expand a potential ~
26712       eval path="$path"
26713       if test ! -f "$path" && test ! -d "$path"; then
26714         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26715       fi
26716 
26717       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26718     fi
26719   fi
26720 
26721             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26722 $as_echo_n "checking for Boot JDK... " >&6; }
26723             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26724 $as_echo "$BOOT_JDK" >&6; }
26725             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26726 $as_echo_n "checking Boot JDK version... " >&6; }
26727             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26728             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26729 $as_echo "$BOOT_JDK_VERSION" >&6; }
26730           fi # end check jdk version
26731         fi # end check javac
26732       fi # end check java
26733     fi # end check boot jdk found
26734   fi
26735 
26736     done
26737   fi
26738 
26739   fi
26740 
26741 
26742     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26743     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26744       # Do we have a bin/java?
26745       if test ! -x "$BOOT_JDK/bin/java"; then
26746         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26747 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26748         BOOT_JDK_FOUND=no
26749       else
26750         # Do we have a bin/javac?
26751         if test ! -x "$BOOT_JDK/bin/javac"; then
26752           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26753 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26754           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26755 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26756           BOOT_JDK_FOUND=no
26757         else
26758           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26759           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26760 
26761           # Extra M4 quote needed to protect [] in grep expression.
26762           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26763           if test "x$FOUND_CORRECT_VERSION" = x; then
26764             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26765 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26766             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26767 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26768             BOOT_JDK_FOUND=no
26769           else
26770             # We're done! :-)
26771             BOOT_JDK_FOUND=yes
26772 
26773   # Only process if variable expands to non-empty
26774 
26775   if test "x$BOOT_JDK" != x; then
26776     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26777 
26778   # Input might be given as Windows format, start by converting to
26779   # unix format.
26780   path="$BOOT_JDK"
26781   new_path=`$CYGPATH -u "$path"`
26782 
26783   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26784   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26785   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26786   # "foo.exe" is OK but "foo" is an error.
26787   #
26788   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26789   # It is also a way to make sure we got the proper file name for the real test later on.
26790   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26791   if test "x$test_shortpath" = x; then
26792     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26793 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26794     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26795   fi
26796 
26797   # Call helper function which possibly converts this using DOS-style short mode.
26798   # If so, the updated path is stored in $new_path.
26799 
26800   input_path="$new_path"
26801   # Check if we need to convert this using DOS-style short mode. If the path
26802   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26803   # take no chances and rewrite it.
26804   # Note: m4 eats our [], so we need to use [ and ] instead.
26805   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26806   if test "x$has_forbidden_chars" != x; then
26807     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26808     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26809     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26810     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26811       # Going to short mode and back again did indeed matter. Since short mode is
26812       # case insensitive, let's make it lowercase to improve readability.
26813       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26814       # Now convert it back to Unix-style (cygpath)
26815       input_path=`$CYGPATH -u "$shortmode_path"`
26816       new_path="$input_path"
26817     fi
26818   fi
26819 
26820   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26821   if test "x$test_cygdrive_prefix" = x; then
26822     # As a simple fix, exclude /usr/bin since it's not a real path.
26823     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26824       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26825       # a path prefixed by /cygdrive for fixpath to work.
26826       new_path="$CYGWIN_ROOT_PATH$input_path"
26827     fi
26828   fi
26829 
26830 
26831   if test "x$path" != "x$new_path"; then
26832     BOOT_JDK="$new_path"
26833     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26834 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26835   fi
26836 
26837     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26838 
26839   path="$BOOT_JDK"
26840   has_colon=`$ECHO $path | $GREP ^.:`
26841   new_path="$path"
26842   if test "x$has_colon" = x; then
26843     # Not in mixed or Windows style, start by that.
26844     new_path=`cmd //c echo $path`
26845   fi
26846 
26847 
26848   input_path="$new_path"
26849   # Check if we need to convert this using DOS-style short mode. If the path
26850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26851   # take no chances and rewrite it.
26852   # Note: m4 eats our [], so we need to use [ and ] instead.
26853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26854   if test "x$has_forbidden_chars" != x; then
26855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26856     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26857   fi
26858 
26859 
26860   windows_path="$new_path"
26861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26862     unix_path=`$CYGPATH -u "$windows_path"`
26863     new_path="$unix_path"
26864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26866     new_path="$unix_path"
26867   fi
26868 
26869   if test "x$path" != "x$new_path"; then
26870     BOOT_JDK="$new_path"
26871     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26872 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26873   fi
26874 
26875   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26876   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26877 
26878     else
26879       # We're on a unix platform. Hooray! :)
26880       path="$BOOT_JDK"
26881       has_space=`$ECHO "$path" | $GREP " "`
26882       if test "x$has_space" != x; then
26883         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26884 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26885         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26886       fi
26887 
26888       # Use eval to expand a potential ~
26889       eval path="$path"
26890       if test ! -f "$path" && test ! -d "$path"; then
26891         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26892       fi
26893 
26894       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26895     fi
26896   fi
26897 
26898             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26899 $as_echo_n "checking for Boot JDK... " >&6; }
26900             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26901 $as_echo "$BOOT_JDK" >&6; }
26902             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26903 $as_echo_n "checking Boot JDK version... " >&6; }
26904             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26905             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26906 $as_echo "$BOOT_JDK_VERSION" >&6; }
26907           fi # end check jdk version
26908         fi # end check javac
26909       fi # end check java
26910     fi # end check boot jdk found
26911   fi
26912 
26913 
26914   if test "x$BOOT_JDK_FOUND" = xno; then
26915     # Now execute the test
26916 
26917   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26918   BOOT_JDK_SUFFIX=""
26919   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26920   if test "x$ALL_JDKS_FOUND" != x; then
26921     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26922 
26923   if test "x$BOOT_JDK_FOUND" = xno; then
26924     # Now execute the test
26925 
26926         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26927         if test -d "$BOOT_JDK"; then
26928           BOOT_JDK_FOUND=maybe
26929           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26930 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26931         fi
26932 
26933 
26934     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26935     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26936       # Do we have a bin/java?
26937       if test ! -x "$BOOT_JDK/bin/java"; then
26938         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26939 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26940         BOOT_JDK_FOUND=no
26941       else
26942         # Do we have a bin/javac?
26943         if test ! -x "$BOOT_JDK/bin/javac"; then
26944           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26945 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26946           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26947 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26948           BOOT_JDK_FOUND=no
26949         else
26950           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26951           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26952 
26953           # Extra M4 quote needed to protect [] in grep expression.
26954           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26955           if test "x$FOUND_CORRECT_VERSION" = x; then
26956             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26957 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26958             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26959 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26960             BOOT_JDK_FOUND=no
26961           else
26962             # We're done! :-)
26963             BOOT_JDK_FOUND=yes
26964 
26965   # Only process if variable expands to non-empty
26966 
26967   if test "x$BOOT_JDK" != x; then
26968     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26969 
26970   # Input might be given as Windows format, start by converting to
26971   # unix format.
26972   path="$BOOT_JDK"
26973   new_path=`$CYGPATH -u "$path"`
26974 
26975   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26976   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26977   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26978   # "foo.exe" is OK but "foo" is an error.
26979   #
26980   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26981   # It is also a way to make sure we got the proper file name for the real test later on.
26982   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26983   if test "x$test_shortpath" = x; then
26984     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26985 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26986     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26987   fi
26988 
26989   # Call helper function which possibly converts this using DOS-style short mode.
26990   # If so, the updated path is stored in $new_path.
26991 
26992   input_path="$new_path"
26993   # Check if we need to convert this using DOS-style short mode. If the path
26994   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26995   # take no chances and rewrite it.
26996   # Note: m4 eats our [], so we need to use [ and ] instead.
26997   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26998   if test "x$has_forbidden_chars" != x; then
26999     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27000     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27001     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27002     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27003       # Going to short mode and back again did indeed matter. Since short mode is
27004       # case insensitive, let's make it lowercase to improve readability.
27005       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27006       # Now convert it back to Unix-style (cygpath)
27007       input_path=`$CYGPATH -u "$shortmode_path"`
27008       new_path="$input_path"
27009     fi
27010   fi
27011 
27012   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27013   if test "x$test_cygdrive_prefix" = x; then
27014     # As a simple fix, exclude /usr/bin since it's not a real path.
27015     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27016       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27017       # a path prefixed by /cygdrive for fixpath to work.
27018       new_path="$CYGWIN_ROOT_PATH$input_path"
27019     fi
27020   fi
27021 
27022 
27023   if test "x$path" != "x$new_path"; then
27024     BOOT_JDK="$new_path"
27025     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27026 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27027   fi
27028 
27029     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27030 
27031   path="$BOOT_JDK"
27032   has_colon=`$ECHO $path | $GREP ^.:`
27033   new_path="$path"
27034   if test "x$has_colon" = x; then
27035     # Not in mixed or Windows style, start by that.
27036     new_path=`cmd //c echo $path`
27037   fi
27038 
27039 
27040   input_path="$new_path"
27041   # Check if we need to convert this using DOS-style short mode. If the path
27042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27043   # take no chances and rewrite it.
27044   # Note: m4 eats our [], so we need to use [ and ] instead.
27045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27046   if test "x$has_forbidden_chars" != x; then
27047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27048     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27049   fi
27050 
27051 
27052   windows_path="$new_path"
27053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27054     unix_path=`$CYGPATH -u "$windows_path"`
27055     new_path="$unix_path"
27056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27058     new_path="$unix_path"
27059   fi
27060 
27061   if test "x$path" != "x$new_path"; then
27062     BOOT_JDK="$new_path"
27063     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27064 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27065   fi
27066 
27067   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27068   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27069 
27070     else
27071       # We're on a unix platform. Hooray! :)
27072       path="$BOOT_JDK"
27073       has_space=`$ECHO "$path" | $GREP " "`
27074       if test "x$has_space" != x; then
27075         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27076 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27077         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27078       fi
27079 
27080       # Use eval to expand a potential ~
27081       eval path="$path"
27082       if test ! -f "$path" && test ! -d "$path"; then
27083         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27084       fi
27085 
27086       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27087     fi
27088   fi
27089 
27090             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27091 $as_echo_n "checking for Boot JDK... " >&6; }
27092             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27093 $as_echo "$BOOT_JDK" >&6; }
27094             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27095 $as_echo_n "checking Boot JDK version... " >&6; }
27096             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27097             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27098 $as_echo "$BOOT_JDK_VERSION" >&6; }
27099           fi # end check jdk version
27100         fi # end check javac
27101       fi # end check java
27102     fi # end check boot jdk found
27103   fi
27104 
27105     done
27106   fi
27107 
27108 
27109     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27110     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27111       # Do we have a bin/java?
27112       if test ! -x "$BOOT_JDK/bin/java"; then
27113         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27114 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27115         BOOT_JDK_FOUND=no
27116       else
27117         # Do we have a bin/javac?
27118         if test ! -x "$BOOT_JDK/bin/javac"; then
27119           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27120 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27121           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27122 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27123           BOOT_JDK_FOUND=no
27124         else
27125           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27126           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27127 
27128           # Extra M4 quote needed to protect [] in grep expression.
27129           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27130           if test "x$FOUND_CORRECT_VERSION" = x; then
27131             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27132 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27133             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27134 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27135             BOOT_JDK_FOUND=no
27136           else
27137             # We're done! :-)
27138             BOOT_JDK_FOUND=yes
27139 
27140   # Only process if variable expands to non-empty
27141 
27142   if test "x$BOOT_JDK" != x; then
27143     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27144 
27145   # Input might be given as Windows format, start by converting to
27146   # unix format.
27147   path="$BOOT_JDK"
27148   new_path=`$CYGPATH -u "$path"`
27149 
27150   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27151   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27152   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27153   # "foo.exe" is OK but "foo" is an error.
27154   #
27155   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27156   # It is also a way to make sure we got the proper file name for the real test later on.
27157   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27158   if test "x$test_shortpath" = x; then
27159     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27160 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27161     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27162   fi
27163 
27164   # Call helper function which possibly converts this using DOS-style short mode.
27165   # If so, the updated path is stored in $new_path.
27166 
27167   input_path="$new_path"
27168   # Check if we need to convert this using DOS-style short mode. If the path
27169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27170   # take no chances and rewrite it.
27171   # Note: m4 eats our [], so we need to use [ and ] instead.
27172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27173   if test "x$has_forbidden_chars" != x; then
27174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27175     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27176     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27177     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27178       # Going to short mode and back again did indeed matter. Since short mode is
27179       # case insensitive, let's make it lowercase to improve readability.
27180       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27181       # Now convert it back to Unix-style (cygpath)
27182       input_path=`$CYGPATH -u "$shortmode_path"`
27183       new_path="$input_path"
27184     fi
27185   fi
27186 
27187   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27188   if test "x$test_cygdrive_prefix" = x; then
27189     # As a simple fix, exclude /usr/bin since it's not a real path.
27190     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27191       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27192       # a path prefixed by /cygdrive for fixpath to work.
27193       new_path="$CYGWIN_ROOT_PATH$input_path"
27194     fi
27195   fi
27196 
27197 
27198   if test "x$path" != "x$new_path"; then
27199     BOOT_JDK="$new_path"
27200     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27201 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27202   fi
27203 
27204     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27205 
27206   path="$BOOT_JDK"
27207   has_colon=`$ECHO $path | $GREP ^.:`
27208   new_path="$path"
27209   if test "x$has_colon" = x; then
27210     # Not in mixed or Windows style, start by that.
27211     new_path=`cmd //c echo $path`
27212   fi
27213 
27214 
27215   input_path="$new_path"
27216   # Check if we need to convert this using DOS-style short mode. If the path
27217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27218   # take no chances and rewrite it.
27219   # Note: m4 eats our [], so we need to use [ and ] instead.
27220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27221   if test "x$has_forbidden_chars" != x; then
27222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27223     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27224   fi
27225 
27226 
27227   windows_path="$new_path"
27228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27229     unix_path=`$CYGPATH -u "$windows_path"`
27230     new_path="$unix_path"
27231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27232     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27233     new_path="$unix_path"
27234   fi
27235 
27236   if test "x$path" != "x$new_path"; then
27237     BOOT_JDK="$new_path"
27238     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27239 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27240   fi
27241 
27242   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27243   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27244 
27245     else
27246       # We're on a unix platform. Hooray! :)
27247       path="$BOOT_JDK"
27248       has_space=`$ECHO "$path" | $GREP " "`
27249       if test "x$has_space" != x; then
27250         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27251 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27252         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27253       fi
27254 
27255       # Use eval to expand a potential ~
27256       eval path="$path"
27257       if test ! -f "$path" && test ! -d "$path"; then
27258         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27259       fi
27260 
27261       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27262     fi
27263   fi
27264 
27265             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27266 $as_echo_n "checking for Boot JDK... " >&6; }
27267             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27268 $as_echo "$BOOT_JDK" >&6; }
27269             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27270 $as_echo_n "checking Boot JDK version... " >&6; }
27271             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27272             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27273 $as_echo "$BOOT_JDK_VERSION" >&6; }
27274           fi # end check jdk version
27275         fi # end check javac
27276       fi # end check java
27277     fi # end check boot jdk found
27278   fi
27279 
27280   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27281 
27282   if test "x$BOOT_JDK_FOUND" = xno; then
27283     # Now execute the test
27284 
27285   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27286   BOOT_JDK_SUFFIX="/Contents/Home"
27287   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27288   if test "x$ALL_JDKS_FOUND" != x; then
27289     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27290 
27291   if test "x$BOOT_JDK_FOUND" = xno; then
27292     # Now execute the test
27293 
27294         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27295         if test -d "$BOOT_JDK"; then
27296           BOOT_JDK_FOUND=maybe
27297           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27298 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27299         fi
27300 
27301 
27302     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27303     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27304       # Do we have a bin/java?
27305       if test ! -x "$BOOT_JDK/bin/java"; then
27306         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27307 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27308         BOOT_JDK_FOUND=no
27309       else
27310         # Do we have a bin/javac?
27311         if test ! -x "$BOOT_JDK/bin/javac"; then
27312           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27313 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27314           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27315 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27316           BOOT_JDK_FOUND=no
27317         else
27318           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27319           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27320 
27321           # Extra M4 quote needed to protect [] in grep expression.
27322           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27323           if test "x$FOUND_CORRECT_VERSION" = x; then
27324             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27325 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27326             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27327 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27328             BOOT_JDK_FOUND=no
27329           else
27330             # We're done! :-)
27331             BOOT_JDK_FOUND=yes
27332 
27333   # Only process if variable expands to non-empty
27334 
27335   if test "x$BOOT_JDK" != x; then
27336     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27337 
27338   # Input might be given as Windows format, start by converting to
27339   # unix format.
27340   path="$BOOT_JDK"
27341   new_path=`$CYGPATH -u "$path"`
27342 
27343   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27344   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27345   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27346   # "foo.exe" is OK but "foo" is an error.
27347   #
27348   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27349   # It is also a way to make sure we got the proper file name for the real test later on.
27350   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27351   if test "x$test_shortpath" = x; then
27352     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27353 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27354     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27355   fi
27356 
27357   # Call helper function which possibly converts this using DOS-style short mode.
27358   # If so, the updated path is stored in $new_path.
27359 
27360   input_path="$new_path"
27361   # Check if we need to convert this using DOS-style short mode. If the path
27362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27363   # take no chances and rewrite it.
27364   # Note: m4 eats our [], so we need to use [ and ] instead.
27365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27366   if test "x$has_forbidden_chars" != x; then
27367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27368     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27369     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27370     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27371       # Going to short mode and back again did indeed matter. Since short mode is
27372       # case insensitive, let's make it lowercase to improve readability.
27373       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27374       # Now convert it back to Unix-style (cygpath)
27375       input_path=`$CYGPATH -u "$shortmode_path"`
27376       new_path="$input_path"
27377     fi
27378   fi
27379 
27380   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27381   if test "x$test_cygdrive_prefix" = x; then
27382     # As a simple fix, exclude /usr/bin since it's not a real path.
27383     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27384       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27385       # a path prefixed by /cygdrive for fixpath to work.
27386       new_path="$CYGWIN_ROOT_PATH$input_path"
27387     fi
27388   fi
27389 
27390 
27391   if test "x$path" != "x$new_path"; then
27392     BOOT_JDK="$new_path"
27393     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27394 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27395   fi
27396 
27397     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27398 
27399   path="$BOOT_JDK"
27400   has_colon=`$ECHO $path | $GREP ^.:`
27401   new_path="$path"
27402   if test "x$has_colon" = x; then
27403     # Not in mixed or Windows style, start by that.
27404     new_path=`cmd //c echo $path`
27405   fi
27406 
27407 
27408   input_path="$new_path"
27409   # Check if we need to convert this using DOS-style short mode. If the path
27410   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27411   # take no chances and rewrite it.
27412   # Note: m4 eats our [], so we need to use [ and ] instead.
27413   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27414   if test "x$has_forbidden_chars" != x; then
27415     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27416     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27417   fi
27418 
27419 
27420   windows_path="$new_path"
27421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27422     unix_path=`$CYGPATH -u "$windows_path"`
27423     new_path="$unix_path"
27424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27425     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27426     new_path="$unix_path"
27427   fi
27428 
27429   if test "x$path" != "x$new_path"; then
27430     BOOT_JDK="$new_path"
27431     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27432 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27433   fi
27434 
27435   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27436   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27437 
27438     else
27439       # We're on a unix platform. Hooray! :)
27440       path="$BOOT_JDK"
27441       has_space=`$ECHO "$path" | $GREP " "`
27442       if test "x$has_space" != x; then
27443         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27444 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27445         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27446       fi
27447 
27448       # Use eval to expand a potential ~
27449       eval path="$path"
27450       if test ! -f "$path" && test ! -d "$path"; then
27451         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27452       fi
27453 
27454       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27455     fi
27456   fi
27457 
27458             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27459 $as_echo_n "checking for Boot JDK... " >&6; }
27460             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27461 $as_echo "$BOOT_JDK" >&6; }
27462             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27463 $as_echo_n "checking Boot JDK version... " >&6; }
27464             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27465             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27466 $as_echo "$BOOT_JDK_VERSION" >&6; }
27467           fi # end check jdk version
27468         fi # end check javac
27469       fi # end check java
27470     fi # end check boot jdk found
27471   fi
27472 
27473     done
27474   fi
27475 
27476 
27477     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27478     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27479       # Do we have a bin/java?
27480       if test ! -x "$BOOT_JDK/bin/java"; then
27481         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27482 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27483         BOOT_JDK_FOUND=no
27484       else
27485         # Do we have a bin/javac?
27486         if test ! -x "$BOOT_JDK/bin/javac"; then
27487           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27488 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27489           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27490 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27491           BOOT_JDK_FOUND=no
27492         else
27493           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27494           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27495 
27496           # Extra M4 quote needed to protect [] in grep expression.
27497           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27498           if test "x$FOUND_CORRECT_VERSION" = x; then
27499             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27500 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27501             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27502 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27503             BOOT_JDK_FOUND=no
27504           else
27505             # We're done! :-)
27506             BOOT_JDK_FOUND=yes
27507 
27508   # Only process if variable expands to non-empty
27509 
27510   if test "x$BOOT_JDK" != x; then
27511     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27512 
27513   # Input might be given as Windows format, start by converting to
27514   # unix format.
27515   path="$BOOT_JDK"
27516   new_path=`$CYGPATH -u "$path"`
27517 
27518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27521   # "foo.exe" is OK but "foo" is an error.
27522   #
27523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27524   # It is also a way to make sure we got the proper file name for the real test later on.
27525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27526   if test "x$test_shortpath" = x; then
27527     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27528 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27529     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27530   fi
27531 
27532   # Call helper function which possibly converts this using DOS-style short mode.
27533   # If so, the updated path is stored in $new_path.
27534 
27535   input_path="$new_path"
27536   # Check if we need to convert this using DOS-style short mode. If the path
27537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27538   # take no chances and rewrite it.
27539   # Note: m4 eats our [], so we need to use [ and ] instead.
27540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27541   if test "x$has_forbidden_chars" != x; then
27542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27543     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27544     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27545     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27546       # Going to short mode and back again did indeed matter. Since short mode is
27547       # case insensitive, let's make it lowercase to improve readability.
27548       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27549       # Now convert it back to Unix-style (cygpath)
27550       input_path=`$CYGPATH -u "$shortmode_path"`
27551       new_path="$input_path"
27552     fi
27553   fi
27554 
27555   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27556   if test "x$test_cygdrive_prefix" = x; then
27557     # As a simple fix, exclude /usr/bin since it's not a real path.
27558     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27559       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27560       # a path prefixed by /cygdrive for fixpath to work.
27561       new_path="$CYGWIN_ROOT_PATH$input_path"
27562     fi
27563   fi
27564 
27565 
27566   if test "x$path" != "x$new_path"; then
27567     BOOT_JDK="$new_path"
27568     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27569 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27570   fi
27571 
27572     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27573 
27574   path="$BOOT_JDK"
27575   has_colon=`$ECHO $path | $GREP ^.:`
27576   new_path="$path"
27577   if test "x$has_colon" = x; then
27578     # Not in mixed or Windows style, start by that.
27579     new_path=`cmd //c echo $path`
27580   fi
27581 
27582 
27583   input_path="$new_path"
27584   # Check if we need to convert this using DOS-style short mode. If the path
27585   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27586   # take no chances and rewrite it.
27587   # Note: m4 eats our [], so we need to use [ and ] instead.
27588   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27589   if test "x$has_forbidden_chars" != x; then
27590     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27591     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27592   fi
27593 
27594 
27595   windows_path="$new_path"
27596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27597     unix_path=`$CYGPATH -u "$windows_path"`
27598     new_path="$unix_path"
27599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27601     new_path="$unix_path"
27602   fi
27603 
27604   if test "x$path" != "x$new_path"; then
27605     BOOT_JDK="$new_path"
27606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27607 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27608   fi
27609 
27610   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27611   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27612 
27613     else
27614       # We're on a unix platform. Hooray! :)
27615       path="$BOOT_JDK"
27616       has_space=`$ECHO "$path" | $GREP " "`
27617       if test "x$has_space" != x; then
27618         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27619 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27620         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27621       fi
27622 
27623       # Use eval to expand a potential ~
27624       eval path="$path"
27625       if test ! -f "$path" && test ! -d "$path"; then
27626         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27627       fi
27628 
27629       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27630     fi
27631   fi
27632 
27633             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27634 $as_echo_n "checking for Boot JDK... " >&6; }
27635             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27636 $as_echo "$BOOT_JDK" >&6; }
27637             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27638 $as_echo_n "checking Boot JDK version... " >&6; }
27639             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27640             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27641 $as_echo "$BOOT_JDK_VERSION" >&6; }
27642           fi # end check jdk version
27643         fi # end check javac
27644       fi # end check java
27645     fi # end check boot jdk found
27646   fi
27647 
27648 
27649   if test "x$BOOT_JDK_FOUND" = xno; then
27650     # Now execute the test
27651 
27652   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27653   BOOT_JDK_SUFFIX="/Contents/Home"
27654   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27655   if test "x$ALL_JDKS_FOUND" != x; then
27656     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27657 
27658   if test "x$BOOT_JDK_FOUND" = xno; then
27659     # Now execute the test
27660 
27661         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27662         if test -d "$BOOT_JDK"; then
27663           BOOT_JDK_FOUND=maybe
27664           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27665 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27666         fi
27667 
27668 
27669     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27670     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27671       # Do we have a bin/java?
27672       if test ! -x "$BOOT_JDK/bin/java"; then
27673         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27674 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27675         BOOT_JDK_FOUND=no
27676       else
27677         # Do we have a bin/javac?
27678         if test ! -x "$BOOT_JDK/bin/javac"; then
27679           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27680 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27681           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27682 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27683           BOOT_JDK_FOUND=no
27684         else
27685           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27686           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27687 
27688           # Extra M4 quote needed to protect [] in grep expression.
27689           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27690           if test "x$FOUND_CORRECT_VERSION" = x; then
27691             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27692 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27693             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27694 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27695             BOOT_JDK_FOUND=no
27696           else
27697             # We're done! :-)
27698             BOOT_JDK_FOUND=yes
27699 
27700   # Only process if variable expands to non-empty
27701 
27702   if test "x$BOOT_JDK" != x; then
27703     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27704 
27705   # Input might be given as Windows format, start by converting to
27706   # unix format.
27707   path="$BOOT_JDK"
27708   new_path=`$CYGPATH -u "$path"`
27709 
27710   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27711   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27712   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27713   # "foo.exe" is OK but "foo" is an error.
27714   #
27715   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27716   # It is also a way to make sure we got the proper file name for the real test later on.
27717   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27718   if test "x$test_shortpath" = x; then
27719     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27720 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27721     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27722   fi
27723 
27724   # Call helper function which possibly converts this using DOS-style short mode.
27725   # If so, the updated path is stored in $new_path.
27726 
27727   input_path="$new_path"
27728   # Check if we need to convert this using DOS-style short mode. If the path
27729   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27730   # take no chances and rewrite it.
27731   # Note: m4 eats our [], so we need to use [ and ] instead.
27732   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27733   if test "x$has_forbidden_chars" != x; then
27734     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27735     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27736     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27737     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27738       # Going to short mode and back again did indeed matter. Since short mode is
27739       # case insensitive, let's make it lowercase to improve readability.
27740       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27741       # Now convert it back to Unix-style (cygpath)
27742       input_path=`$CYGPATH -u "$shortmode_path"`
27743       new_path="$input_path"
27744     fi
27745   fi
27746 
27747   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27748   if test "x$test_cygdrive_prefix" = x; then
27749     # As a simple fix, exclude /usr/bin since it's not a real path.
27750     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27751       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27752       # a path prefixed by /cygdrive for fixpath to work.
27753       new_path="$CYGWIN_ROOT_PATH$input_path"
27754     fi
27755   fi
27756 
27757 
27758   if test "x$path" != "x$new_path"; then
27759     BOOT_JDK="$new_path"
27760     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27761 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27762   fi
27763 
27764     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27765 
27766   path="$BOOT_JDK"
27767   has_colon=`$ECHO $path | $GREP ^.:`
27768   new_path="$path"
27769   if test "x$has_colon" = x; then
27770     # Not in mixed or Windows style, start by that.
27771     new_path=`cmd //c echo $path`
27772   fi
27773 
27774 
27775   input_path="$new_path"
27776   # Check if we need to convert this using DOS-style short mode. If the path
27777   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27778   # take no chances and rewrite it.
27779   # Note: m4 eats our [], so we need to use [ and ] instead.
27780   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27781   if test "x$has_forbidden_chars" != x; then
27782     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27783     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27784   fi
27785 
27786 
27787   windows_path="$new_path"
27788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27789     unix_path=`$CYGPATH -u "$windows_path"`
27790     new_path="$unix_path"
27791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27793     new_path="$unix_path"
27794   fi
27795 
27796   if test "x$path" != "x$new_path"; then
27797     BOOT_JDK="$new_path"
27798     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27799 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27800   fi
27801 
27802   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27803   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27804 
27805     else
27806       # We're on a unix platform. Hooray! :)
27807       path="$BOOT_JDK"
27808       has_space=`$ECHO "$path" | $GREP " "`
27809       if test "x$has_space" != x; then
27810         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27811 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27812         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27813       fi
27814 
27815       # Use eval to expand a potential ~
27816       eval path="$path"
27817       if test ! -f "$path" && test ! -d "$path"; then
27818         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27819       fi
27820 
27821       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27822     fi
27823   fi
27824 
27825             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27826 $as_echo_n "checking for Boot JDK... " >&6; }
27827             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27828 $as_echo "$BOOT_JDK" >&6; }
27829             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27830 $as_echo_n "checking Boot JDK version... " >&6; }
27831             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27832             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27833 $as_echo "$BOOT_JDK_VERSION" >&6; }
27834           fi # end check jdk version
27835         fi # end check javac
27836       fi # end check java
27837     fi # end check boot jdk found
27838   fi
27839 
27840     done
27841   fi
27842 
27843 
27844     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27845     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27846       # Do we have a bin/java?
27847       if test ! -x "$BOOT_JDK/bin/java"; then
27848         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27849 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27850         BOOT_JDK_FOUND=no
27851       else
27852         # Do we have a bin/javac?
27853         if test ! -x "$BOOT_JDK/bin/javac"; then
27854           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27855 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27856           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27857 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27858           BOOT_JDK_FOUND=no
27859         else
27860           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27861           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27862 
27863           # Extra M4 quote needed to protect [] in grep expression.
27864           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27865           if test "x$FOUND_CORRECT_VERSION" = x; then
27866             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27868             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27869 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27870             BOOT_JDK_FOUND=no
27871           else
27872             # We're done! :-)
27873             BOOT_JDK_FOUND=yes
27874 
27875   # Only process if variable expands to non-empty
27876 
27877   if test "x$BOOT_JDK" != x; then
27878     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27879 
27880   # Input might be given as Windows format, start by converting to
27881   # unix format.
27882   path="$BOOT_JDK"
27883   new_path=`$CYGPATH -u "$path"`
27884 
27885   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27886   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27887   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27888   # "foo.exe" is OK but "foo" is an error.
27889   #
27890   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27891   # It is also a way to make sure we got the proper file name for the real test later on.
27892   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27893   if test "x$test_shortpath" = x; then
27894     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27895 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27896     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27897   fi
27898 
27899   # Call helper function which possibly converts this using DOS-style short mode.
27900   # If so, the updated path is stored in $new_path.
27901 
27902   input_path="$new_path"
27903   # Check if we need to convert this using DOS-style short mode. If the path
27904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27905   # take no chances and rewrite it.
27906   # Note: m4 eats our [], so we need to use [ and ] instead.
27907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27908   if test "x$has_forbidden_chars" != x; then
27909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27910     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27911     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27912     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27913       # Going to short mode and back again did indeed matter. Since short mode is
27914       # case insensitive, let's make it lowercase to improve readability.
27915       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27916       # Now convert it back to Unix-style (cygpath)
27917       input_path=`$CYGPATH -u "$shortmode_path"`
27918       new_path="$input_path"
27919     fi
27920   fi
27921 
27922   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27923   if test "x$test_cygdrive_prefix" = x; then
27924     # As a simple fix, exclude /usr/bin since it's not a real path.
27925     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27926       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27927       # a path prefixed by /cygdrive for fixpath to work.
27928       new_path="$CYGWIN_ROOT_PATH$input_path"
27929     fi
27930   fi
27931 
27932 
27933   if test "x$path" != "x$new_path"; then
27934     BOOT_JDK="$new_path"
27935     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27936 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27937   fi
27938 
27939     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27940 
27941   path="$BOOT_JDK"
27942   has_colon=`$ECHO $path | $GREP ^.:`
27943   new_path="$path"
27944   if test "x$has_colon" = x; then
27945     # Not in mixed or Windows style, start by that.
27946     new_path=`cmd //c echo $path`
27947   fi
27948 
27949 
27950   input_path="$new_path"
27951   # Check if we need to convert this using DOS-style short mode. If the path
27952   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27953   # take no chances and rewrite it.
27954   # Note: m4 eats our [], so we need to use [ and ] instead.
27955   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27956   if test "x$has_forbidden_chars" != x; then
27957     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27958     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27959   fi
27960 
27961 
27962   windows_path="$new_path"
27963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27964     unix_path=`$CYGPATH -u "$windows_path"`
27965     new_path="$unix_path"
27966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27968     new_path="$unix_path"
27969   fi
27970 
27971   if test "x$path" != "x$new_path"; then
27972     BOOT_JDK="$new_path"
27973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27974 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27975   fi
27976 
27977   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27978   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27979 
27980     else
27981       # We're on a unix platform. Hooray! :)
27982       path="$BOOT_JDK"
27983       has_space=`$ECHO "$path" | $GREP " "`
27984       if test "x$has_space" != x; then
27985         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27986 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27987         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27988       fi
27989 
27990       # Use eval to expand a potential ~
27991       eval path="$path"
27992       if test ! -f "$path" && test ! -d "$path"; then
27993         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27994       fi
27995 
27996       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27997     fi
27998   fi
27999 
28000             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28001 $as_echo_n "checking for Boot JDK... " >&6; }
28002             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28003 $as_echo "$BOOT_JDK" >&6; }
28004             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28005 $as_echo_n "checking Boot JDK version... " >&6; }
28006             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28007             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28008 $as_echo "$BOOT_JDK_VERSION" >&6; }
28009           fi # end check jdk version
28010         fi # end check javac
28011       fi # end check java
28012     fi # end check boot jdk found
28013   fi
28014 
28015   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28016 
28017   if test "x$BOOT_JDK_FOUND" = xno; then
28018     # Now execute the test
28019 
28020   BOOT_JDK_PREFIX="/usr/lib/jvm"
28021   BOOT_JDK_SUFFIX=""
28022   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28023   if test "x$ALL_JDKS_FOUND" != x; then
28024     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28025 
28026   if test "x$BOOT_JDK_FOUND" = xno; then
28027     # Now execute the test
28028 
28029         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28030         if test -d "$BOOT_JDK"; then
28031           BOOT_JDK_FOUND=maybe
28032           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28033 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28034         fi
28035 
28036 
28037     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28038     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28039       # Do we have a bin/java?
28040       if test ! -x "$BOOT_JDK/bin/java"; then
28041         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28042 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28043         BOOT_JDK_FOUND=no
28044       else
28045         # Do we have a bin/javac?
28046         if test ! -x "$BOOT_JDK/bin/javac"; then
28047           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28048 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28049           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28050 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28051           BOOT_JDK_FOUND=no
28052         else
28053           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28054           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28055 
28056           # Extra M4 quote needed to protect [] in grep expression.
28057           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28058           if test "x$FOUND_CORRECT_VERSION" = x; then
28059             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28060 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28061             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28062 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28063             BOOT_JDK_FOUND=no
28064           else
28065             # We're done! :-)
28066             BOOT_JDK_FOUND=yes
28067 
28068   # Only process if variable expands to non-empty
28069 
28070   if test "x$BOOT_JDK" != x; then
28071     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28072 
28073   # Input might be given as Windows format, start by converting to
28074   # unix format.
28075   path="$BOOT_JDK"
28076   new_path=`$CYGPATH -u "$path"`
28077 
28078   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28079   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28080   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28081   # "foo.exe" is OK but "foo" is an error.
28082   #
28083   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28084   # It is also a way to make sure we got the proper file name for the real test later on.
28085   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28086   if test "x$test_shortpath" = x; then
28087     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28088 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28089     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28090   fi
28091 
28092   # Call helper function which possibly converts this using DOS-style short mode.
28093   # If so, the updated path is stored in $new_path.
28094 
28095   input_path="$new_path"
28096   # Check if we need to convert this using DOS-style short mode. If the path
28097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28098   # take no chances and rewrite it.
28099   # Note: m4 eats our [], so we need to use [ and ] instead.
28100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28101   if test "x$has_forbidden_chars" != x; then
28102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28106       # Going to short mode and back again did indeed matter. Since short mode is
28107       # case insensitive, let's make it lowercase to improve readability.
28108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28109       # Now convert it back to Unix-style (cygpath)
28110       input_path=`$CYGPATH -u "$shortmode_path"`
28111       new_path="$input_path"
28112     fi
28113   fi
28114 
28115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28116   if test "x$test_cygdrive_prefix" = x; then
28117     # As a simple fix, exclude /usr/bin since it's not a real path.
28118     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28120       # a path prefixed by /cygdrive for fixpath to work.
28121       new_path="$CYGWIN_ROOT_PATH$input_path"
28122     fi
28123   fi
28124 
28125 
28126   if test "x$path" != "x$new_path"; then
28127     BOOT_JDK="$new_path"
28128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28129 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28130   fi
28131 
28132     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28133 
28134   path="$BOOT_JDK"
28135   has_colon=`$ECHO $path | $GREP ^.:`
28136   new_path="$path"
28137   if test "x$has_colon" = x; then
28138     # Not in mixed or Windows style, start by that.
28139     new_path=`cmd //c echo $path`
28140   fi
28141 
28142 
28143   input_path="$new_path"
28144   # Check if we need to convert this using DOS-style short mode. If the path
28145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28146   # take no chances and rewrite it.
28147   # Note: m4 eats our [], so we need to use [ and ] instead.
28148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28149   if test "x$has_forbidden_chars" != x; then
28150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28151     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28152   fi
28153 
28154 
28155   windows_path="$new_path"
28156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28157     unix_path=`$CYGPATH -u "$windows_path"`
28158     new_path="$unix_path"
28159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28161     new_path="$unix_path"
28162   fi
28163 
28164   if test "x$path" != "x$new_path"; then
28165     BOOT_JDK="$new_path"
28166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28167 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28168   fi
28169 
28170   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28171   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28172 
28173     else
28174       # We're on a unix platform. Hooray! :)
28175       path="$BOOT_JDK"
28176       has_space=`$ECHO "$path" | $GREP " "`
28177       if test "x$has_space" != x; then
28178         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28179 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28180         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28181       fi
28182 
28183       # Use eval to expand a potential ~
28184       eval path="$path"
28185       if test ! -f "$path" && test ! -d "$path"; then
28186         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28187       fi
28188 
28189       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28190     fi
28191   fi
28192 
28193             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28194 $as_echo_n "checking for Boot JDK... " >&6; }
28195             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28196 $as_echo "$BOOT_JDK" >&6; }
28197             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28198 $as_echo_n "checking Boot JDK version... " >&6; }
28199             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28200             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28201 $as_echo "$BOOT_JDK_VERSION" >&6; }
28202           fi # end check jdk version
28203         fi # end check javac
28204       fi # end check java
28205     fi # end check boot jdk found
28206   fi
28207 
28208     done
28209   fi
28210 
28211 
28212     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28213     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28214       # Do we have a bin/java?
28215       if test ! -x "$BOOT_JDK/bin/java"; then
28216         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28217 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28218         BOOT_JDK_FOUND=no
28219       else
28220         # Do we have a bin/javac?
28221         if test ! -x "$BOOT_JDK/bin/javac"; then
28222           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28223 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28224           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28225 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28226           BOOT_JDK_FOUND=no
28227         else
28228           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28229           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28230 
28231           # Extra M4 quote needed to protect [] in grep expression.
28232           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28233           if test "x$FOUND_CORRECT_VERSION" = x; then
28234             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28235 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28236             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28237 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28238             BOOT_JDK_FOUND=no
28239           else
28240             # We're done! :-)
28241             BOOT_JDK_FOUND=yes
28242 
28243   # Only process if variable expands to non-empty
28244 
28245   if test "x$BOOT_JDK" != x; then
28246     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28247 
28248   # Input might be given as Windows format, start by converting to
28249   # unix format.
28250   path="$BOOT_JDK"
28251   new_path=`$CYGPATH -u "$path"`
28252 
28253   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28254   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28255   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28256   # "foo.exe" is OK but "foo" is an error.
28257   #
28258   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28259   # It is also a way to make sure we got the proper file name for the real test later on.
28260   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28261   if test "x$test_shortpath" = x; then
28262     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28263 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28264     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28265   fi
28266 
28267   # Call helper function which possibly converts this using DOS-style short mode.
28268   # If so, the updated path is stored in $new_path.
28269 
28270   input_path="$new_path"
28271   # Check if we need to convert this using DOS-style short mode. If the path
28272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28273   # take no chances and rewrite it.
28274   # Note: m4 eats our [], so we need to use [ and ] instead.
28275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28276   if test "x$has_forbidden_chars" != x; then
28277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28278     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28279     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28280     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28281       # Going to short mode and back again did indeed matter. Since short mode is
28282       # case insensitive, let's make it lowercase to improve readability.
28283       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28284       # Now convert it back to Unix-style (cygpath)
28285       input_path=`$CYGPATH -u "$shortmode_path"`
28286       new_path="$input_path"
28287     fi
28288   fi
28289 
28290   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28291   if test "x$test_cygdrive_prefix" = x; then
28292     # As a simple fix, exclude /usr/bin since it's not a real path.
28293     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28294       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28295       # a path prefixed by /cygdrive for fixpath to work.
28296       new_path="$CYGWIN_ROOT_PATH$input_path"
28297     fi
28298   fi
28299 
28300 
28301   if test "x$path" != "x$new_path"; then
28302     BOOT_JDK="$new_path"
28303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28305   fi
28306 
28307     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28308 
28309   path="$BOOT_JDK"
28310   has_colon=`$ECHO $path | $GREP ^.:`
28311   new_path="$path"
28312   if test "x$has_colon" = x; then
28313     # Not in mixed or Windows style, start by that.
28314     new_path=`cmd //c echo $path`
28315   fi
28316 
28317 
28318   input_path="$new_path"
28319   # Check if we need to convert this using DOS-style short mode. If the path
28320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28321   # take no chances and rewrite it.
28322   # Note: m4 eats our [], so we need to use [ and ] instead.
28323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28324   if test "x$has_forbidden_chars" != x; then
28325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28326     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28327   fi
28328 
28329 
28330   windows_path="$new_path"
28331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28332     unix_path=`$CYGPATH -u "$windows_path"`
28333     new_path="$unix_path"
28334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28336     new_path="$unix_path"
28337   fi
28338 
28339   if test "x$path" != "x$new_path"; then
28340     BOOT_JDK="$new_path"
28341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28342 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28343   fi
28344 
28345   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28346   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28347 
28348     else
28349       # We're on a unix platform. Hooray! :)
28350       path="$BOOT_JDK"
28351       has_space=`$ECHO "$path" | $GREP " "`
28352       if test "x$has_space" != x; then
28353         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28354 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28355         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28356       fi
28357 
28358       # Use eval to expand a potential ~
28359       eval path="$path"
28360       if test ! -f "$path" && test ! -d "$path"; then
28361         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28362       fi
28363 
28364       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28365     fi
28366   fi
28367 
28368             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28369 $as_echo_n "checking for Boot JDK... " >&6; }
28370             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28371 $as_echo "$BOOT_JDK" >&6; }
28372             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28373 $as_echo_n "checking Boot JDK version... " >&6; }
28374             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28375             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28376 $as_echo "$BOOT_JDK_VERSION" >&6; }
28377           fi # end check jdk version
28378         fi # end check javac
28379       fi # end check java
28380     fi # end check boot jdk found
28381   fi
28382 
28383   fi
28384 
28385 
28386     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28387     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28388       # Do we have a bin/java?
28389       if test ! -x "$BOOT_JDK/bin/java"; then
28390         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28391 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28392         BOOT_JDK_FOUND=no
28393       else
28394         # Do we have a bin/javac?
28395         if test ! -x "$BOOT_JDK/bin/javac"; then
28396           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28397 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28398           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28399 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28400           BOOT_JDK_FOUND=no
28401         else
28402           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28403           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28404 
28405           # Extra M4 quote needed to protect [] in grep expression.
28406           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28407           if test "x$FOUND_CORRECT_VERSION" = x; then
28408             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28409 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28410             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28411 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28412             BOOT_JDK_FOUND=no
28413           else
28414             # We're done! :-)
28415             BOOT_JDK_FOUND=yes
28416 
28417   # Only process if variable expands to non-empty
28418 
28419   if test "x$BOOT_JDK" != x; then
28420     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28421 
28422   # Input might be given as Windows format, start by converting to
28423   # unix format.
28424   path="$BOOT_JDK"
28425   new_path=`$CYGPATH -u "$path"`
28426 
28427   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28428   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28429   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28430   # "foo.exe" is OK but "foo" is an error.
28431   #
28432   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28433   # It is also a way to make sure we got the proper file name for the real test later on.
28434   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28435   if test "x$test_shortpath" = x; then
28436     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28437 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28438     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28439   fi
28440 
28441   # Call helper function which possibly converts this using DOS-style short mode.
28442   # If so, the updated path is stored in $new_path.
28443 
28444   input_path="$new_path"
28445   # Check if we need to convert this using DOS-style short mode. If the path
28446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28447   # take no chances and rewrite it.
28448   # Note: m4 eats our [], so we need to use [ and ] instead.
28449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28450   if test "x$has_forbidden_chars" != x; then
28451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28455       # Going to short mode and back again did indeed matter. Since short mode is
28456       # case insensitive, let's make it lowercase to improve readability.
28457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28458       # Now convert it back to Unix-style (cygpath)
28459       input_path=`$CYGPATH -u "$shortmode_path"`
28460       new_path="$input_path"
28461     fi
28462   fi
28463 
28464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28465   if test "x$test_cygdrive_prefix" = x; then
28466     # As a simple fix, exclude /usr/bin since it's not a real path.
28467     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28469       # a path prefixed by /cygdrive for fixpath to work.
28470       new_path="$CYGWIN_ROOT_PATH$input_path"
28471     fi
28472   fi
28473 
28474 
28475   if test "x$path" != "x$new_path"; then
28476     BOOT_JDK="$new_path"
28477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28478 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28479   fi
28480 
28481     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28482 
28483   path="$BOOT_JDK"
28484   has_colon=`$ECHO $path | $GREP ^.:`
28485   new_path="$path"
28486   if test "x$has_colon" = x; then
28487     # Not in mixed or Windows style, start by that.
28488     new_path=`cmd //c echo $path`
28489   fi
28490 
28491 
28492   input_path="$new_path"
28493   # Check if we need to convert this using DOS-style short mode. If the path
28494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28495   # take no chances and rewrite it.
28496   # Note: m4 eats our [], so we need to use [ and ] instead.
28497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28498   if test "x$has_forbidden_chars" != x; then
28499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28500     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28501   fi
28502 
28503 
28504   windows_path="$new_path"
28505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28506     unix_path=`$CYGPATH -u "$windows_path"`
28507     new_path="$unix_path"
28508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28510     new_path="$unix_path"
28511   fi
28512 
28513   if test "x$path" != "x$new_path"; then
28514     BOOT_JDK="$new_path"
28515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28516 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28517   fi
28518 
28519   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28520   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28521 
28522     else
28523       # We're on a unix platform. Hooray! :)
28524       path="$BOOT_JDK"
28525       has_space=`$ECHO "$path" | $GREP " "`
28526       if test "x$has_space" != x; then
28527         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28528 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28529         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28530       fi
28531 
28532       # Use eval to expand a potential ~
28533       eval path="$path"
28534       if test ! -f "$path" && test ! -d "$path"; then
28535         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28536       fi
28537 
28538       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28539     fi
28540   fi
28541 
28542             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28543 $as_echo_n "checking for Boot JDK... " >&6; }
28544             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28545 $as_echo "$BOOT_JDK" >&6; }
28546             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28547 $as_echo_n "checking Boot JDK version... " >&6; }
28548             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28549             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28550 $as_echo "$BOOT_JDK_VERSION" >&6; }
28551           fi # end check jdk version
28552         fi # end check javac
28553       fi # end check java
28554     fi # end check boot jdk found
28555   fi
28556 
28557 
28558   # If we haven't found anything yet, we've truly lost. Give up.
28559   if test "x$BOOT_JDK_FOUND" = xno; then
28560 
28561   # Print a helpful message on how to acquire the necessary build dependency.
28562   # openjdk is the help tag: freetype, cups, alsa etc
28563   MISSING_DEPENDENCY=openjdk
28564 
28565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28566     cygwin_help $MISSING_DEPENDENCY
28567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28568     msys_help $MISSING_DEPENDENCY
28569   else
28570     PKGHANDLER_COMMAND=
28571 
28572     case $PKGHANDLER in
28573       apt-get)
28574         apt_help     $MISSING_DEPENDENCY ;;
28575       yum)
28576         yum_help     $MISSING_DEPENDENCY ;;
28577       port)
28578         port_help    $MISSING_DEPENDENCY ;;
28579       pkgutil)
28580         pkgutil_help $MISSING_DEPENDENCY ;;
28581       pkgadd)
28582         pkgadd_help  $MISSING_DEPENDENCY ;;
28583     esac
28584 
28585     if test "x$PKGHANDLER_COMMAND" != x; then
28586       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28587     fi
28588   fi
28589 
28590     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28591 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28592     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28593 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28594     as_fn_error $? "Cannot continue" "$LINENO" 5
28595   fi
28596 
28597 
28598 
28599   # Setup tools from the Boot JDK.
28600 
28601   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28602 
28603   # Publish this variable in the help.
28604 
28605 
28606   if [ -z "${JAVA+x}" ]; then
28607     # The variable is not set by user, try to locate tool using the code snippet
28608 
28609       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28610 $as_echo_n "checking for java in Boot JDK... " >&6; }
28611       JAVA=$BOOT_JDK/bin/java
28612       if test ! -x $JAVA; then
28613         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28614 $as_echo "not found" >&6; }
28615         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28616 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28617         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28618       fi
28619       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28620 $as_echo "ok" >&6; }
28621 
28622 
28623   else
28624     # The variable is set, but is it from the command line or the environment?
28625 
28626     # Try to remove the string !JAVA! from our list.
28627     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28628     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28629       # If it failed, the variable was not from the command line. Ignore it,
28630       # but warn the user (except for BASH, which is always set by the calling BASH).
28631       if test "xJAVA" != xBASH; then
28632         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28633 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28634       fi
28635       # Try to locate tool using the code snippet
28636 
28637       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28638 $as_echo_n "checking for java in Boot JDK... " >&6; }
28639       JAVA=$BOOT_JDK/bin/java
28640       if test ! -x $JAVA; then
28641         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28642 $as_echo "not found" >&6; }
28643         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28644 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28645         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28646       fi
28647       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28648 $as_echo "ok" >&6; }
28649 
28650 
28651     else
28652       # If it succeeded, then it was overridden by the user. We will use it
28653       # for the tool.
28654 
28655       # First remove it from the list of overridden variables, so we can test
28656       # for unknown variables in the end.
28657       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28658 
28659       # Check if we try to supply an empty value
28660       if test "x$JAVA" = x; then
28661         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28662 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28663         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28664 $as_echo_n "checking for JAVA... " >&6; }
28665         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28666 $as_echo "disabled" >&6; }
28667       else
28668         # Check if the provided tool contains a complete path.
28669         tool_specified="$JAVA"
28670         tool_basename="${tool_specified##*/}"
28671         if test "x$tool_basename" = "x$tool_specified"; then
28672           # A command without a complete path is provided, search $PATH.
28673           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28674 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28675           # Extract the first word of "$tool_basename", so it can be a program name with args.
28676 set dummy $tool_basename; ac_word=$2
28677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28678 $as_echo_n "checking for $ac_word... " >&6; }
28679 if ${ac_cv_path_JAVA+:} false; then :
28680   $as_echo_n "(cached) " >&6
28681 else
28682   case $JAVA in
28683   [\\/]* | ?:[\\/]*)
28684   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28685   ;;
28686   *)
28687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28688 for as_dir in $PATH
28689 do
28690   IFS=$as_save_IFS
28691   test -z "$as_dir" && as_dir=.
28692     for ac_exec_ext in '' $ac_executable_extensions; do
28693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28694     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28696     break 2
28697   fi
28698 done
28699   done
28700 IFS=$as_save_IFS
28701 
28702   ;;
28703 esac
28704 fi
28705 JAVA=$ac_cv_path_JAVA
28706 if test -n "$JAVA"; then
28707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28708 $as_echo "$JAVA" >&6; }
28709 else
28710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28711 $as_echo "no" >&6; }
28712 fi
28713 
28714 
28715           if test "x$JAVA" = x; then
28716             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28717           fi
28718         else
28719           # Otherwise we believe it is a complete path. Use it as it is.
28720           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28721 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28722           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28723 $as_echo_n "checking for JAVA... " >&6; }
28724           if test ! -x "$tool_specified"; then
28725             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28726 $as_echo "not found" >&6; }
28727             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28728           fi
28729           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28730 $as_echo "$tool_specified" >&6; }
28731         fi
28732       fi
28733     fi
28734 
28735   fi
28736 
28737 
28738 
28739   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28740 
28741   # Publish this variable in the help.
28742 
28743 
28744   if [ -z "${JAVAC+x}" ]; then
28745     # The variable is not set by user, try to locate tool using the code snippet
28746 
28747       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28748 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28749       JAVAC=$BOOT_JDK/bin/javac
28750       if test ! -x $JAVAC; then
28751         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28752 $as_echo "not found" >&6; }
28753         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28754 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28755         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28756       fi
28757       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28758 $as_echo "ok" >&6; }
28759 
28760 
28761   else
28762     # The variable is set, but is it from the command line or the environment?
28763 
28764     # Try to remove the string !JAVAC! from our list.
28765     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28766     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28767       # If it failed, the variable was not from the command line. Ignore it,
28768       # but warn the user (except for BASH, which is always set by the calling BASH).
28769       if test "xJAVAC" != xBASH; then
28770         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28771 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28772       fi
28773       # Try to locate tool using the code snippet
28774 
28775       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28776 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28777       JAVAC=$BOOT_JDK/bin/javac
28778       if test ! -x $JAVAC; then
28779         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28780 $as_echo "not found" >&6; }
28781         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28782 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28783         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28784       fi
28785       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28786 $as_echo "ok" >&6; }
28787 
28788 
28789     else
28790       # If it succeeded, then it was overridden by the user. We will use it
28791       # for the tool.
28792 
28793       # First remove it from the list of overridden variables, so we can test
28794       # for unknown variables in the end.
28795       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28796 
28797       # Check if we try to supply an empty value
28798       if test "x$JAVAC" = x; then
28799         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28800 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28801         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28802 $as_echo_n "checking for JAVAC... " >&6; }
28803         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28804 $as_echo "disabled" >&6; }
28805       else
28806         # Check if the provided tool contains a complete path.
28807         tool_specified="$JAVAC"
28808         tool_basename="${tool_specified##*/}"
28809         if test "x$tool_basename" = "x$tool_specified"; then
28810           # A command without a complete path is provided, search $PATH.
28811           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28812 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28813           # Extract the first word of "$tool_basename", so it can be a program name with args.
28814 set dummy $tool_basename; ac_word=$2
28815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28816 $as_echo_n "checking for $ac_word... " >&6; }
28817 if ${ac_cv_path_JAVAC+:} false; then :
28818   $as_echo_n "(cached) " >&6
28819 else
28820   case $JAVAC in
28821   [\\/]* | ?:[\\/]*)
28822   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28823   ;;
28824   *)
28825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28826 for as_dir in $PATH
28827 do
28828   IFS=$as_save_IFS
28829   test -z "$as_dir" && as_dir=.
28830     for ac_exec_ext in '' $ac_executable_extensions; do
28831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28832     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28834     break 2
28835   fi
28836 done
28837   done
28838 IFS=$as_save_IFS
28839 
28840   ;;
28841 esac
28842 fi
28843 JAVAC=$ac_cv_path_JAVAC
28844 if test -n "$JAVAC"; then
28845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28846 $as_echo "$JAVAC" >&6; }
28847 else
28848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28849 $as_echo "no" >&6; }
28850 fi
28851 
28852 
28853           if test "x$JAVAC" = x; then
28854             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28855           fi
28856         else
28857           # Otherwise we believe it is a complete path. Use it as it is.
28858           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28859 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28860           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28861 $as_echo_n "checking for JAVAC... " >&6; }
28862           if test ! -x "$tool_specified"; then
28863             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28864 $as_echo "not found" >&6; }
28865             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28866           fi
28867           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28868 $as_echo "$tool_specified" >&6; }
28869         fi
28870       fi
28871     fi
28872 
28873   fi
28874 
28875 
28876 
28877   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28878 
28879   # Publish this variable in the help.
28880 
28881 
28882   if [ -z "${JAVAH+x}" ]; then
28883     # The variable is not set by user, try to locate tool using the code snippet
28884 
28885       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28886 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28887       JAVAH=$BOOT_JDK/bin/javah
28888       if test ! -x $JAVAH; then
28889         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28890 $as_echo "not found" >&6; }
28891         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28892 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28893         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28894       fi
28895       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28896 $as_echo "ok" >&6; }
28897 
28898 
28899   else
28900     # The variable is set, but is it from the command line or the environment?
28901 
28902     # Try to remove the string !JAVAH! from our list.
28903     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28904     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28905       # If it failed, the variable was not from the command line. Ignore it,
28906       # but warn the user (except for BASH, which is always set by the calling BASH).
28907       if test "xJAVAH" != xBASH; then
28908         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28909 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28910       fi
28911       # Try to locate tool using the code snippet
28912 
28913       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28914 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28915       JAVAH=$BOOT_JDK/bin/javah
28916       if test ! -x $JAVAH; then
28917         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28918 $as_echo "not found" >&6; }
28919         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28920 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28921         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28922       fi
28923       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28924 $as_echo "ok" >&6; }
28925 
28926 
28927     else
28928       # If it succeeded, then it was overridden by the user. We will use it
28929       # for the tool.
28930 
28931       # First remove it from the list of overridden variables, so we can test
28932       # for unknown variables in the end.
28933       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28934 
28935       # Check if we try to supply an empty value
28936       if test "x$JAVAH" = x; then
28937         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28938 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28939         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28940 $as_echo_n "checking for JAVAH... " >&6; }
28941         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28942 $as_echo "disabled" >&6; }
28943       else
28944         # Check if the provided tool contains a complete path.
28945         tool_specified="$JAVAH"
28946         tool_basename="${tool_specified##*/}"
28947         if test "x$tool_basename" = "x$tool_specified"; then
28948           # A command without a complete path is provided, search $PATH.
28949           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28950 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28951           # Extract the first word of "$tool_basename", so it can be a program name with args.
28952 set dummy $tool_basename; ac_word=$2
28953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28954 $as_echo_n "checking for $ac_word... " >&6; }
28955 if ${ac_cv_path_JAVAH+:} false; then :
28956   $as_echo_n "(cached) " >&6
28957 else
28958   case $JAVAH in
28959   [\\/]* | ?:[\\/]*)
28960   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28961   ;;
28962   *)
28963   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28964 for as_dir in $PATH
28965 do
28966   IFS=$as_save_IFS
28967   test -z "$as_dir" && as_dir=.
28968     for ac_exec_ext in '' $ac_executable_extensions; do
28969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28970     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28972     break 2
28973   fi
28974 done
28975   done
28976 IFS=$as_save_IFS
28977 
28978   ;;
28979 esac
28980 fi
28981 JAVAH=$ac_cv_path_JAVAH
28982 if test -n "$JAVAH"; then
28983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28984 $as_echo "$JAVAH" >&6; }
28985 else
28986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28987 $as_echo "no" >&6; }
28988 fi
28989 
28990 
28991           if test "x$JAVAH" = x; then
28992             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28993           fi
28994         else
28995           # Otherwise we believe it is a complete path. Use it as it is.
28996           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28997 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28998           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28999 $as_echo_n "checking for JAVAH... " >&6; }
29000           if test ! -x "$tool_specified"; then
29001             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29002 $as_echo "not found" >&6; }
29003             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29004           fi
29005           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29006 $as_echo "$tool_specified" >&6; }
29007         fi
29008       fi
29009     fi
29010 
29011   fi
29012 
29013 
29014 
29015   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29016 
29017   # Publish this variable in the help.
29018 
29019 
29020   if [ -z "${JAR+x}" ]; then
29021     # The variable is not set by user, try to locate tool using the code snippet
29022 
29023       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29024 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29025       JAR=$BOOT_JDK/bin/jar
29026       if test ! -x $JAR; then
29027         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29028 $as_echo "not found" >&6; }
29029         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29030 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29031         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29032       fi
29033       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29034 $as_echo "ok" >&6; }
29035 
29036 
29037   else
29038     # The variable is set, but is it from the command line or the environment?
29039 
29040     # Try to remove the string !JAR! from our list.
29041     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29042     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29043       # If it failed, the variable was not from the command line. Ignore it,
29044       # but warn the user (except for BASH, which is always set by the calling BASH).
29045       if test "xJAR" != xBASH; then
29046         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29047 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29048       fi
29049       # Try to locate tool using the code snippet
29050 
29051       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29052 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29053       JAR=$BOOT_JDK/bin/jar
29054       if test ! -x $JAR; then
29055         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29056 $as_echo "not found" >&6; }
29057         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29058 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29059         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29060       fi
29061       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29062 $as_echo "ok" >&6; }
29063 
29064 
29065     else
29066       # If it succeeded, then it was overridden by the user. We will use it
29067       # for the tool.
29068 
29069       # First remove it from the list of overridden variables, so we can test
29070       # for unknown variables in the end.
29071       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29072 
29073       # Check if we try to supply an empty value
29074       if test "x$JAR" = x; then
29075         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29076 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29077         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29078 $as_echo_n "checking for JAR... " >&6; }
29079         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29080 $as_echo "disabled" >&6; }
29081       else
29082         # Check if the provided tool contains a complete path.
29083         tool_specified="$JAR"
29084         tool_basename="${tool_specified##*/}"
29085         if test "x$tool_basename" = "x$tool_specified"; then
29086           # A command without a complete path is provided, search $PATH.
29087           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29088 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29089           # Extract the first word of "$tool_basename", so it can be a program name with args.
29090 set dummy $tool_basename; ac_word=$2
29091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29092 $as_echo_n "checking for $ac_word... " >&6; }
29093 if ${ac_cv_path_JAR+:} false; then :
29094   $as_echo_n "(cached) " >&6
29095 else
29096   case $JAR in
29097   [\\/]* | ?:[\\/]*)
29098   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29099   ;;
29100   *)
29101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29102 for as_dir in $PATH
29103 do
29104   IFS=$as_save_IFS
29105   test -z "$as_dir" && as_dir=.
29106     for ac_exec_ext in '' $ac_executable_extensions; do
29107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29108     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29110     break 2
29111   fi
29112 done
29113   done
29114 IFS=$as_save_IFS
29115 
29116   ;;
29117 esac
29118 fi
29119 JAR=$ac_cv_path_JAR
29120 if test -n "$JAR"; then
29121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29122 $as_echo "$JAR" >&6; }
29123 else
29124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29125 $as_echo "no" >&6; }
29126 fi
29127 
29128 
29129           if test "x$JAR" = x; then
29130             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29131           fi
29132         else
29133           # Otherwise we believe it is a complete path. Use it as it is.
29134           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29135 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29136           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29137 $as_echo_n "checking for JAR... " >&6; }
29138           if test ! -x "$tool_specified"; then
29139             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29140 $as_echo "not found" >&6; }
29141             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29142           fi
29143           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29144 $as_echo "$tool_specified" >&6; }
29145         fi
29146       fi
29147     fi
29148 
29149   fi
29150 
29151 
29152 
29153   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29154 
29155   # Publish this variable in the help.
29156 
29157 
29158   if [ -z "${JARSIGNER+x}" ]; then
29159     # The variable is not set by user, try to locate tool using the code snippet
29160 
29161       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29162 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29163       JARSIGNER=$BOOT_JDK/bin/jarsigner
29164       if test ! -x $JARSIGNER; then
29165         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29166 $as_echo "not found" >&6; }
29167         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29168 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29169         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29170       fi
29171       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29172 $as_echo "ok" >&6; }
29173 
29174 
29175   else
29176     # The variable is set, but is it from the command line or the environment?
29177 
29178     # Try to remove the string !JARSIGNER! from our list.
29179     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29180     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29181       # If it failed, the variable was not from the command line. Ignore it,
29182       # but warn the user (except for BASH, which is always set by the calling BASH).
29183       if test "xJARSIGNER" != xBASH; then
29184         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29185 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29186       fi
29187       # Try to locate tool using the code snippet
29188 
29189       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29190 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29191       JARSIGNER=$BOOT_JDK/bin/jarsigner
29192       if test ! -x $JARSIGNER; then
29193         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29194 $as_echo "not found" >&6; }
29195         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29196 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29197         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29198       fi
29199       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29200 $as_echo "ok" >&6; }
29201 
29202 
29203     else
29204       # If it succeeded, then it was overridden by the user. We will use it
29205       # for the tool.
29206 
29207       # First remove it from the list of overridden variables, so we can test
29208       # for unknown variables in the end.
29209       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29210 
29211       # Check if we try to supply an empty value
29212       if test "x$JARSIGNER" = x; then
29213         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29214 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29215         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29216 $as_echo_n "checking for JARSIGNER... " >&6; }
29217         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29218 $as_echo "disabled" >&6; }
29219       else
29220         # Check if the provided tool contains a complete path.
29221         tool_specified="$JARSIGNER"
29222         tool_basename="${tool_specified##*/}"
29223         if test "x$tool_basename" = "x$tool_specified"; then
29224           # A command without a complete path is provided, search $PATH.
29225           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29226 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29227           # Extract the first word of "$tool_basename", so it can be a program name with args.
29228 set dummy $tool_basename; ac_word=$2
29229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29230 $as_echo_n "checking for $ac_word... " >&6; }
29231 if ${ac_cv_path_JARSIGNER+:} false; then :
29232   $as_echo_n "(cached) " >&6
29233 else
29234   case $JARSIGNER in
29235   [\\/]* | ?:[\\/]*)
29236   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29237   ;;
29238   *)
29239   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29240 for as_dir in $PATH
29241 do
29242   IFS=$as_save_IFS
29243   test -z "$as_dir" && as_dir=.
29244     for ac_exec_ext in '' $ac_executable_extensions; do
29245   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29246     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29247     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29248     break 2
29249   fi
29250 done
29251   done
29252 IFS=$as_save_IFS
29253 
29254   ;;
29255 esac
29256 fi
29257 JARSIGNER=$ac_cv_path_JARSIGNER
29258 if test -n "$JARSIGNER"; then
29259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29260 $as_echo "$JARSIGNER" >&6; }
29261 else
29262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29263 $as_echo "no" >&6; }
29264 fi
29265 
29266 
29267           if test "x$JARSIGNER" = x; then
29268             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29269           fi
29270         else
29271           # Otherwise we believe it is a complete path. Use it as it is.
29272           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29273 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29274           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29275 $as_echo_n "checking for JARSIGNER... " >&6; }
29276           if test ! -x "$tool_specified"; then
29277             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29278 $as_echo "not found" >&6; }
29279             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29280           fi
29281           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29282 $as_echo "$tool_specified" >&6; }
29283         fi
29284       fi
29285     fi
29286 
29287   fi
29288 
29289 
29290 
29291   # Finally, set some other options...
29292 
29293   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29294   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29295 
29296 
29297 
29298   # Check if the boot jdk is 32 or 64 bit
29299   if "$JAVA" -d64 -version > /dev/null 2>&1; then
29300     BOOT_JDK_BITS="64"
29301   else
29302     BOOT_JDK_BITS="32"
29303   fi
29304   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29305 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29307 $as_echo "$BOOT_JDK_BITS" >&6; }
29308 
29309 
29310 
29311 ###############################################################################
29312 #
29313 # Configure the sources to use. We can add or override individual directories.
29314 #
29315 ###############################################################################
29316 
29317 
29318   # Where are the sources.
29319   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29320   CORBA_TOPDIR="$SRC_ROOT/corba"
29321   JAXP_TOPDIR="$SRC_ROOT/jaxp"
29322   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29323   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29324   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29325   JDK_TOPDIR="$SRC_ROOT/jdk"
29326 
29327 
29328 
29329 
29330 
29331 
29332 
29333 
29334 
29335   # This feature is no longer supported.
29336 
29337 
29338 
29339 # Check whether --with-add-source-root was given.
29340 if test "${with_add_source_root+set}" = set; then :
29341   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
29342 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29343 fi
29344 
29345 
29346 
29347 
29348 # Check whether --with-override-source-root was given.
29349 if test "${with_override_source_root+set}" = set; then :
29350   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
29351 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29352 fi
29353 
29354 
29355 
29356 
29357 # Check whether --with-adds-and-overrides was given.
29358 if test "${with_adds_and_overrides+set}" = set; then :
29359   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
29360 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29361 fi
29362 
29363 
29364 
29365 
29366 # Check whether --with-override-langtools was given.
29367 if test "${with_override_langtools+set}" = set; then :
29368   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29369 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29370 fi
29371 
29372 
29373 
29374 
29375 # Check whether --with-override-corba was given.
29376 if test "${with_override_corba+set}" = set; then :
29377   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29378 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29379 fi
29380 
29381 
29382 
29383 
29384 # Check whether --with-override-jaxp was given.
29385 if test "${with_override_jaxp+set}" = set; then :
29386   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29387 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29388 fi
29389 
29390 
29391 
29392 
29393 # Check whether --with-override-jaxws was given.
29394 if test "${with_override_jaxws+set}" = set; then :
29395   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29396 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29397 fi
29398 
29399 
29400 
29401 
29402 # Check whether --with-override-hotspot was given.
29403 if test "${with_override_hotspot+set}" = set; then :
29404   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29405 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29406 fi
29407 
29408 
29409 
29410 
29411 # Check whether --with-override-nashorn was given.
29412 if test "${with_override_nashorn+set}" = set; then :
29413   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29414 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29415 fi
29416 
29417 
29418 
29419 
29420 # Check whether --with-override-jdk was given.
29421 if test "${with_override_jdk+set}" = set; then :
29422   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29423 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29424 fi
29425 
29426 
29427 
29428 
29429   BUILD_OUTPUT="$OUTPUT_ROOT"
29430 
29431 
29432   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29433   BUILD_HOTSPOT=true
29434 
29435 
29436 
29437 # Check whether --with-import-hotspot was given.
29438 if test "${with_import_hotspot+set}" = set; then :
29439   withval=$with_import_hotspot;
29440 fi
29441 
29442   if test "x$with_import_hotspot" != x; then
29443     CURDIR="$PWD"
29444     cd "$with_import_hotspot"
29445     HOTSPOT_DIST="`pwd`"
29446     cd "$CURDIR"
29447     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29448       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29449     fi
29450     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29451 $as_echo_n "checking if hotspot should be imported... " >&6; }
29452     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29453 $as_echo "yes from $HOTSPOT_DIST" >&6; }
29454     BUILD_HOTSPOT=false
29455   fi
29456 
29457   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29458 
29459 
29460 ###############################################################################
29461 #
29462 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
29463 # native code.
29464 #
29465 ###############################################################################
29466 
29467 # See if we are doing a complete static build or not
29468 
29469   # Check whether --enable-static-build was given.
29470 if test "${enable_static_build+set}" = set; then :
29471   enableval=$enable_static_build;
29472 fi
29473 
29474   STATIC_BUILD=false
29475   if test "x$enable_static_build" = "xyes"; then
29476     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29477 $as_echo_n "checking if static build is enabled... " >&6; }
29478     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29479 $as_echo "yes" >&6; }
29480     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29481       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29482     fi
29483     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29484     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29485     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29486     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29487     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29488     STATIC_BUILD=true
29489   elif test "x$enable_static_build" = "xno"; then
29490     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29491 $as_echo_n "checking if static build is enabled... " >&6; }
29492     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29493 $as_echo "no" >&6; }
29494   elif test "x$enable_static_build" != "x"; then
29495     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29496   fi
29497 
29498 
29499 
29500 
29501 # First determine the toolchain type (compiler family)
29502 
29503 
29504 # Check whether --with-toolchain-type was given.
29505 if test "${with_toolchain_type+set}" = set; then :
29506   withval=$with_toolchain_type;
29507 fi
29508 
29509 
29510   # Use indirect variable referencing
29511   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29512   VALID_TOOLCHAINS=${!toolchain_var_name}
29513 
29514   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29515     if test -n "$XCODEBUILD"; then
29516       # On Mac OS X, default toolchain to clang after Xcode 5
29517       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29518       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29519       if test $? -ne 0; then
29520         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29521       fi
29522       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29523           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29524           $CUT -f 1 -d .`
29525       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29526 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29527       if test $XCODE_MAJOR_VERSION -ge 5; then
29528           DEFAULT_TOOLCHAIN="clang"
29529       else
29530           DEFAULT_TOOLCHAIN="gcc"
29531       fi
29532     else
29533       # If Xcode is not installed, but the command line tools are
29534       # then we can't run xcodebuild. On these systems we should
29535       # default to clang
29536       DEFAULT_TOOLCHAIN="clang"
29537     fi
29538   else
29539     # First toolchain type in the list is the default
29540     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29541   fi
29542 
29543   if test "x$with_toolchain_type" = xlist; then
29544     # List all toolchains
29545     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29546 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29547     for toolchain in $VALID_TOOLCHAINS; do
29548       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29549       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29550       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29551     done
29552 
29553     exit 0
29554   elif test "x$with_toolchain_type" != x; then
29555     # User override; check that it is valid
29556     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29557       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29558 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29559       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29560 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29561       as_fn_error $? "Cannot continue." "$LINENO" 5
29562     fi
29563     TOOLCHAIN_TYPE=$with_toolchain_type
29564   else
29565     # No flag given, use default
29566     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29567   fi
29568 
29569 
29570   TOOLCHAIN_CC_BINARY_clang="clang"
29571   TOOLCHAIN_CC_BINARY_gcc="gcc"
29572   TOOLCHAIN_CC_BINARY_microsoft="cl"
29573   TOOLCHAIN_CC_BINARY_solstudio="cc"
29574   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29575 
29576   TOOLCHAIN_CXX_BINARY_clang="clang++"
29577   TOOLCHAIN_CXX_BINARY_gcc="g++"
29578   TOOLCHAIN_CXX_BINARY_microsoft="cl"
29579   TOOLCHAIN_CXX_BINARY_solstudio="CC"
29580   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29581 
29582   # Use indirect variable referencing
29583   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29584   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29585   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29586   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29587   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29588   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29589 
29590 
29591   # Define filename patterns
29592   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29593     LIBRARY_PREFIX=
29594     SHARED_LIBRARY_SUFFIX='.dll'
29595     STATIC_LIBRARY_SUFFIX='.lib'
29596     SHARED_LIBRARY='$1.dll'
29597     STATIC_LIBRARY='$1.lib'
29598     OBJ_SUFFIX='.obj'
29599     EXE_SUFFIX='.exe'
29600   else
29601     LIBRARY_PREFIX=lib
29602     SHARED_LIBRARY_SUFFIX='.so'
29603     STATIC_LIBRARY_SUFFIX='.a'
29604     SHARED_LIBRARY='lib$1.so'
29605     STATIC_LIBRARY='lib$1.a'
29606     OBJ_SUFFIX='.o'
29607     EXE_SUFFIX=''
29608     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29609       # For full static builds, we're overloading the SHARED_LIBRARY
29610       # variables in order to limit the amount of changes required.
29611       # It would be better to remove SHARED and just use LIBRARY and
29612       # LIBRARY_SUFFIX for libraries that can be built either
29613       # shared or static and use STATIC_* for libraries that are
29614       # always built statically.
29615       if test "x$STATIC_BUILD" = xtrue; then
29616         SHARED_LIBRARY='lib$1.a'
29617         SHARED_LIBRARY_SUFFIX='.a'
29618       else
29619         SHARED_LIBRARY='lib$1.dylib'
29620         SHARED_LIBRARY_SUFFIX='.dylib'
29621       fi
29622     fi
29623   fi
29624 
29625 
29626 
29627 
29628 
29629 
29630 
29631 
29632 
29633 
29634   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29635     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29636 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29637   else
29638     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29639 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29640   fi
29641 
29642 
29643 # User supplied flags should be used when configure detects compilers
29644 
29645   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29646     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29647 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29648   fi
29649 
29650   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29651     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29652 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29653   fi
29654 
29655   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29656     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29657 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29658   fi
29659 
29660 
29661 # Check whether --with-extra-cflags was given.
29662 if test "${with_extra_cflags+set}" = set; then :
29663   withval=$with_extra_cflags;
29664 fi
29665 
29666 
29667 
29668 # Check whether --with-extra-cxxflags was given.
29669 if test "${with_extra_cxxflags+set}" = set; then :
29670   withval=$with_extra_cxxflags;
29671 fi
29672 
29673 
29674 
29675 # Check whether --with-extra-ldflags was given.
29676 if test "${with_extra_ldflags+set}" = set; then :
29677   withval=$with_extra_ldflags;
29678 fi
29679 
29680 
29681   EXTRA_CFLAGS="$with_extra_cflags"
29682   EXTRA_CXXFLAGS="$with_extra_cxxflags"
29683   EXTRA_LDFLAGS="$with_extra_ldflags"
29684 
29685   # Hotspot needs these set in their legacy form
29686   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29687   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29688   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29689 
29690 
29691 
29692 
29693 
29694   # The global CFLAGS and LDLAGS variables are used by configure tests and
29695   # should include the extra parameters
29696   CFLAGS="$EXTRA_CFLAGS"
29697   CXXFLAGS="$EXTRA_CXXFLAGS"
29698   LDFLAGS="$EXTRA_LDFLAGS"
29699   CPPFLAGS=""
29700 
29701 # The sysroot cflags are needed for configure to be able to run the compilers
29702 
29703   if test "x$SYSROOT" != "x"; then
29704     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29705       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29706         # Solaris Studio does not have a concept of sysroot. Instead we must
29707         # make sure the default include and lib dirs are appended to each
29708         # compile and link command line.
29709         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29710         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29711             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29712             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29713       fi
29714     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29715       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29716       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29717     elif test "x$TOOLCHAIN_TYPE" = xclang; then
29718       SYSROOT_CFLAGS="-isysroot $SYSROOT"
29719       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29720     fi
29721     # Propagate the sysroot args to hotspot
29722     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29723     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29724     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29725     # The global CFLAGS and LDFLAGS variables need these for configure to function
29726     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29727     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29728     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29729     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29730   fi
29731 
29732   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29733     # We also need -iframework<path>/System/Library/Frameworks
29734     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29735     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29736     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29737     # set this here so it doesn't have to be peppered throughout the forest
29738     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29739     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29740   fi
29741 
29742 
29743 
29744 
29745 
29746 # Then detect the actual binaries needed
29747 
29748   # FIXME: Is this needed?
29749   ac_ext=cpp
29750 ac_cpp='$CXXCPP $CPPFLAGS'
29751 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29752 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29753 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29754 
29755 
29756   # Store the CFLAGS etc passed to the configure script.
29757   ORG_CFLAGS="$CFLAGS"
29758   ORG_CXXFLAGS="$CXXFLAGS"
29759 
29760   # autoconf magic only relies on PATH, so update it if tools dir is specified
29761   OLD_PATH="$PATH"
29762 
29763   # On Windows, we need to detect the visual studio installation first.
29764   # This will change the PATH, but we need to keep that new PATH even
29765   # after toolchain detection is done, since the compiler (on x86) uses
29766   # it for DLL resolution in runtime.
29767   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29768       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29769 
29770   # Store path to cygwin link.exe to help excluding it when searching for
29771   # VS linker. This must be done before changing the PATH when looking for VS.
29772   # Extract the first word of "link", so it can be a program name with args.
29773 set dummy link; ac_word=$2
29774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29775 $as_echo_n "checking for $ac_word... " >&6; }
29776 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29777   $as_echo_n "(cached) " >&6
29778 else
29779   case $CYGWIN_LINK in
29780   [\\/]* | ?:[\\/]*)
29781   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29782   ;;
29783   *)
29784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29785 for as_dir in $PATH
29786 do
29787   IFS=$as_save_IFS
29788   test -z "$as_dir" && as_dir=.
29789     for ac_exec_ext in '' $ac_executable_extensions; do
29790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29791     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29793     break 2
29794   fi
29795 done
29796   done
29797 IFS=$as_save_IFS
29798 
29799   ;;
29800 esac
29801 fi
29802 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29803 if test -n "$CYGWIN_LINK"; then
29804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29805 $as_echo "$CYGWIN_LINK" >&6; }
29806 else
29807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29808 $as_echo "no" >&6; }
29809 fi
29810 
29811 
29812   if test "x$CYGWIN_LINK" != x; then
29813     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29814 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29815     "$CYGWIN_LINK" --version > /dev/null
29816     if test $? -eq 0 ; then
29817       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29818 $as_echo "yes" >&6; }
29819     else
29820       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29821 $as_echo "no" >&6; }
29822       # This might be the VS linker. Don't exclude it later on.
29823       CYGWIN_LINK=""
29824     fi
29825   fi
29826 
29827   # First-hand choice is to locate and run the vsvars bat file.
29828 
29829 
29830 # Check whether --with-toolchain-version was given.
29831 if test "${with_toolchain_version+set}" = set; then :
29832   withval=$with_toolchain_version;
29833 fi
29834 
29835 
29836   if test "x$with_toolchain_version" = xlist; then
29837     # List all toolchains
29838     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29839 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29840     for version in $VALID_VS_VERSIONS; do
29841       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29842       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29843     done
29844 
29845     exit 0
29846   elif test "x$DEVKIT_VS_VERSION" != x; then
29847     VS_VERSION=$DEVKIT_VS_VERSION
29848     TOOLCHAIN_VERSION=$VS_VERSION
29849     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29850     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29851     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29852     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29853     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29854     VS_PATH="$TOOLCHAIN_PATH:$PATH"
29855 
29856     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29857     # can still be exported as INCLUDE for compiler invocations without
29858     # SYSROOT_CFLAGS
29859     OLDIFS="$IFS"
29860     IFS=";"
29861     for i in $DEVKIT_VS_INCLUDE; do
29862       ipath=$i
29863 
29864   unix_path="$ipath"
29865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29866     windows_path=`$CYGPATH -m "$unix_path"`
29867     ipath="$windows_path"
29868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29869     windows_path=`cmd //c echo $unix_path`
29870     ipath="$windows_path"
29871   fi
29872 
29873       VS_INCLUDE="$VS_INCLUDE;$ipath"
29874     done
29875     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29876     # as LIB for compiler invocations without SYSROOT_LDFLAGS
29877     for i in $DEVKIT_VS_LIB; do
29878       libpath=$i
29879 
29880   unix_path="$libpath"
29881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29882     windows_path=`$CYGPATH -m "$unix_path"`
29883     libpath="$windows_path"
29884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29885     windows_path=`cmd //c echo $unix_path`
29886     libpath="$windows_path"
29887   fi
29888 
29889       VS_LIB="$VS_LIB;$libpath"
29890     done
29891     IFS="$OLDIFS"
29892 
29893     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29894 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29895 
29896   elif test "x$with_toolchain_version" != x; then
29897     # User override; check that it is valid
29898     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29899       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29900 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29901       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29902 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29903       as_fn_error $? "Cannot continue." "$LINENO" 5
29904     fi
29905     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29906   else
29907     # No flag given, use default
29908     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29909   fi
29910 
29911   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29912 
29913   VS_VERSION="$VS_VERSION"
29914   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29915   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29916   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29917   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29918 
29919   # When using --with-tools-dir, assume it points to the correct and default
29920   # version of Visual Studio or that --with-toolchain-version was also set.
29921   if test "x$with_tools_dir" != x; then
29922 
29923   if test "x$VS_ENV_CMD" = x; then
29924     VS_VERSION="${VS_VERSION}"
29925     VS_BASE="$with_tools_dir/../.."
29926     METHOD="--with-tools-dir"
29927 
29928     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29929       VCVARSFILE="vc/bin/vcvars32.bat"
29930     else
29931       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29932     fi
29933 
29934 
29935   windows_path="$VS_BASE"
29936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29937     unix_path=`$CYGPATH -u "$windows_path"`
29938     VS_BASE="$unix_path"
29939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29941     VS_BASE="$unix_path"
29942   fi
29943 
29944     if test -d "$VS_BASE"; then
29945       if test -f "$VS_BASE/$VCVARSFILE"; then
29946         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29947 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29948         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29949         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29950         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29951         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29952       else
29953         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29954 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29955         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29956 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29957       fi
29958     fi
29959   fi
29960 
29961 
29962   if test "x$VS_ENV_CMD" = x; then
29963     VS_VERSION="${VS_VERSION}"
29964     VS_BASE="$with_tools_dir/../../.."
29965     METHOD="--with-tools-dir"
29966 
29967     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29968       VCVARSFILE="vc/bin/vcvars32.bat"
29969     else
29970       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29971     fi
29972 
29973 
29974   windows_path="$VS_BASE"
29975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29976     unix_path=`$CYGPATH -u "$windows_path"`
29977     VS_BASE="$unix_path"
29978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29980     VS_BASE="$unix_path"
29981   fi
29982 
29983     if test -d "$VS_BASE"; then
29984       if test -f "$VS_BASE/$VCVARSFILE"; then
29985         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29986 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29987         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29988         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29989         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29990         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29991       else
29992         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29993 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29994         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29995 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29996       fi
29997     fi
29998   fi
29999 
30000     if test "x$VS_ENV_CMD" = x; then
30001       # Having specified an argument which is incorrect will produce an instant failure;
30002       # we should not go on looking
30003       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30004 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30005       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30006 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30007       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30008 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30009       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30010     fi
30011   fi
30012 
30013   VS_ENV_CMD=""
30014   VS_ENV_ARGS=""
30015 
30016   if test "x$VS_COMNTOOLS" != x; then
30017 
30018   if test "x$VS_ENV_CMD" = x; then
30019     VS_VERSION="${VS_VERSION}"
30020     VS_BASE="$VS_COMNTOOLS/../.."
30021     METHOD="$VS_COMNTOOLS_VAR variable"
30022 
30023     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30024       VCVARSFILE="vc/bin/vcvars32.bat"
30025     else
30026       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30027     fi
30028 
30029 
30030   windows_path="$VS_BASE"
30031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30032     unix_path=`$CYGPATH -u "$windows_path"`
30033     VS_BASE="$unix_path"
30034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30036     VS_BASE="$unix_path"
30037   fi
30038 
30039     if test -d "$VS_BASE"; then
30040       if test -f "$VS_BASE/$VCVARSFILE"; then
30041         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30042 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30043         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30044         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30045         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30046         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30047       else
30048         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30049 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30050         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30051 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30052       fi
30053     fi
30054   fi
30055 
30056   fi
30057   if test "x$PROGRAMFILES" != x; then
30058 
30059   if test "x$VS_ENV_CMD" = x; then
30060     VS_VERSION="${VS_VERSION}"
30061     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30062     METHOD="well-known name"
30063 
30064     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30065       VCVARSFILE="vc/bin/vcvars32.bat"
30066     else
30067       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30068     fi
30069 
30070 
30071   windows_path="$VS_BASE"
30072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30073     unix_path=`$CYGPATH -u "$windows_path"`
30074     VS_BASE="$unix_path"
30075   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30076     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30077     VS_BASE="$unix_path"
30078   fi
30079 
30080     if test -d "$VS_BASE"; then
30081       if test -f "$VS_BASE/$VCVARSFILE"; then
30082         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30083 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30084         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30085         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30086         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30087         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30088       else
30089         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30090 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30091         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30092 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30093       fi
30094     fi
30095   fi
30096 
30097   fi
30098   # Work around the insanely named ProgramFiles(x86) env variable
30099   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30100   if test "x$PROGRAMFILES_X86" != x; then
30101 
30102   if test "x$VS_ENV_CMD" = x; then
30103     VS_VERSION="${VS_VERSION}"
30104     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30105     METHOD="well-known name"
30106 
30107     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30108       VCVARSFILE="vc/bin/vcvars32.bat"
30109     else
30110       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30111     fi
30112 
30113 
30114   windows_path="$VS_BASE"
30115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30116     unix_path=`$CYGPATH -u "$windows_path"`
30117     VS_BASE="$unix_path"
30118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30120     VS_BASE="$unix_path"
30121   fi
30122 
30123     if test -d "$VS_BASE"; then
30124       if test -f "$VS_BASE/$VCVARSFILE"; then
30125         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30126 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30127         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30128         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30129         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30130         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30131       else
30132         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30133 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30134         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30135 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30136       fi
30137     fi
30138   fi
30139 
30140   fi
30141 
30142   if test "x$VS_ENV_CMD" = x; then
30143     VS_VERSION="${VS_VERSION}"
30144     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30145     METHOD="well-known name"
30146 
30147     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30148       VCVARSFILE="vc/bin/vcvars32.bat"
30149     else
30150       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30151     fi
30152 
30153 
30154   windows_path="$VS_BASE"
30155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30156     unix_path=`$CYGPATH -u "$windows_path"`
30157     VS_BASE="$unix_path"
30158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30160     VS_BASE="$unix_path"
30161   fi
30162 
30163     if test -d "$VS_BASE"; then
30164       if test -f "$VS_BASE/$VCVARSFILE"; then
30165         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30166 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30167         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30168         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30169         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30170         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30171       else
30172         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30173 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30174         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30175 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30176       fi
30177     fi
30178   fi
30179 
30180 
30181   if test "x$VS_ENV_CMD" = x; then
30182     VS_VERSION="${VS_VERSION}"
30183     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30184     METHOD="well-known name"
30185 
30186     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30187       VCVARSFILE="vc/bin/vcvars32.bat"
30188     else
30189       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30190     fi
30191 
30192 
30193   windows_path="$VS_BASE"
30194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30195     unix_path=`$CYGPATH -u "$windows_path"`
30196     VS_BASE="$unix_path"
30197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30199     VS_BASE="$unix_path"
30200   fi
30201 
30202     if test -d "$VS_BASE"; then
30203       if test -f "$VS_BASE/$VCVARSFILE"; then
30204         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30205 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30206         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30207         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30208         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30209         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30210       else
30211         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30212 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30213         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30214 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30215       fi
30216     fi
30217   fi
30218 
30219 
30220   if test "x$SDK_INSTALL_DIR" != x; then
30221     if test "x$ProgramW6432" != x; then
30222 
30223   if test "x$VS_ENV_CMD" = x; then
30224     VS_VERSION="${VS_VERSION}"
30225     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30226     METHOD="well-known name"
30227 
30228   windows_path="$WIN_SDK_BASE"
30229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30230     unix_path=`$CYGPATH -u "$windows_path"`
30231     WIN_SDK_BASE="$unix_path"
30232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30234     WIN_SDK_BASE="$unix_path"
30235   fi
30236 
30237     if test -d "$WIN_SDK_BASE"; then
30238       # There have been cases of partial or broken SDK installations. A missing
30239       # lib dir is not going to work.
30240       if test ! -d "$WIN_SDK_BASE/lib"; then
30241         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30242 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30243         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30244 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30245       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30246         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30247 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30248         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30249         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30250           VS_ENV_ARGS="/x86"
30251         else
30252           VS_ENV_ARGS="/x64"
30253         fi
30254         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30255         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30256         # TODO: improve detection for other versions of SDK
30257         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30258       else
30259         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30260 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30261         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30262 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30263       fi
30264     fi
30265   fi
30266 
30267     fi
30268     if test "x$PROGRAMW6432" != x; then
30269 
30270   if test "x$VS_ENV_CMD" = x; then
30271     VS_VERSION="${VS_VERSION}"
30272     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30273     METHOD="well-known name"
30274 
30275   windows_path="$WIN_SDK_BASE"
30276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30277     unix_path=`$CYGPATH -u "$windows_path"`
30278     WIN_SDK_BASE="$unix_path"
30279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30281     WIN_SDK_BASE="$unix_path"
30282   fi
30283 
30284     if test -d "$WIN_SDK_BASE"; then
30285       # There have been cases of partial or broken SDK installations. A missing
30286       # lib dir is not going to work.
30287       if test ! -d "$WIN_SDK_BASE/lib"; then
30288         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30289 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30290         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30291 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30292       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30293         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30294 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30295         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30296         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30297           VS_ENV_ARGS="/x86"
30298         else
30299           VS_ENV_ARGS="/x64"
30300         fi
30301         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30302         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30303         # TODO: improve detection for other versions of SDK
30304         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30305       else
30306         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30307 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30308         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30309 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30310       fi
30311     fi
30312   fi
30313 
30314     fi
30315     if test "x$PROGRAMFILES" != x; then
30316 
30317   if test "x$VS_ENV_CMD" = x; then
30318     VS_VERSION="${VS_VERSION}"
30319     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30320     METHOD="well-known name"
30321 
30322   windows_path="$WIN_SDK_BASE"
30323   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30324     unix_path=`$CYGPATH -u "$windows_path"`
30325     WIN_SDK_BASE="$unix_path"
30326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30327     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30328     WIN_SDK_BASE="$unix_path"
30329   fi
30330 
30331     if test -d "$WIN_SDK_BASE"; then
30332       # There have been cases of partial or broken SDK installations. A missing
30333       # lib dir is not going to work.
30334       if test ! -d "$WIN_SDK_BASE/lib"; then
30335         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30336 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30337         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30338 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30339       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30340         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30341 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30342         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30343         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30344           VS_ENV_ARGS="/x86"
30345         else
30346           VS_ENV_ARGS="/x64"
30347         fi
30348         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30349         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30350         # TODO: improve detection for other versions of SDK
30351         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30352       else
30353         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30354 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30355         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30356 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30357       fi
30358     fi
30359   fi
30360 
30361     fi
30362 
30363   if test "x$VS_ENV_CMD" = x; then
30364     VS_VERSION="${VS_VERSION}"
30365     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30366     METHOD="well-known name"
30367 
30368   windows_path="$WIN_SDK_BASE"
30369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30370     unix_path=`$CYGPATH -u "$windows_path"`
30371     WIN_SDK_BASE="$unix_path"
30372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30374     WIN_SDK_BASE="$unix_path"
30375   fi
30376 
30377     if test -d "$WIN_SDK_BASE"; then
30378       # There have been cases of partial or broken SDK installations. A missing
30379       # lib dir is not going to work.
30380       if test ! -d "$WIN_SDK_BASE/lib"; then
30381         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30382 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30383         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30384 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30385       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30386         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30387 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30388         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30389         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30390           VS_ENV_ARGS="/x86"
30391         else
30392           VS_ENV_ARGS="/x64"
30393         fi
30394         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30395         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30396         # TODO: improve detection for other versions of SDK
30397         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30398       else
30399         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30400 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30401         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30402 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30403       fi
30404     fi
30405   fi
30406 
30407 
30408   if test "x$VS_ENV_CMD" = x; then
30409     VS_VERSION="${VS_VERSION}"
30410     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30411     METHOD="well-known name"
30412 
30413   windows_path="$WIN_SDK_BASE"
30414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30415     unix_path=`$CYGPATH -u "$windows_path"`
30416     WIN_SDK_BASE="$unix_path"
30417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30418     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30419     WIN_SDK_BASE="$unix_path"
30420   fi
30421 
30422     if test -d "$WIN_SDK_BASE"; then
30423       # There have been cases of partial or broken SDK installations. A missing
30424       # lib dir is not going to work.
30425       if test ! -d "$WIN_SDK_BASE/lib"; then
30426         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30427 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30428         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30429 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30430       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30431         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30432 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30433         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30434         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30435           VS_ENV_ARGS="/x86"
30436         else
30437           VS_ENV_ARGS="/x64"
30438         fi
30439         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30440         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30441         # TODO: improve detection for other versions of SDK
30442         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30443       else
30444         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30445 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30446         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30447 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30448       fi
30449     fi
30450   fi
30451 
30452   fi
30453 
30454     if test "x$VS_ENV_CMD" != x; then
30455       TOOLCHAIN_VERSION=$VS_VERSION
30456       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30457       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30458       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30459       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30460       # The rest of the variables are already evaled while probing
30461       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30462 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30463       break
30464     fi
30465   done
30466 
30467 
30468   # If we have a devkit, skip all of the below.
30469   if test "x$DEVKIT_VS_VERSION" = x; then
30470     if test "x$VS_ENV_CMD" != x; then
30471       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30472 
30473   # Only process if variable expands to non-empty
30474 
30475   if test "x$VS_ENV_CMD" != x; then
30476     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30477 
30478   # First separate the path from the arguments. This will split at the first
30479   # space.
30480   complete="$VS_ENV_CMD"
30481   path="${complete%% *}"
30482   tmp="$complete EOL"
30483   arguments="${tmp#* }"
30484 
30485   # Input might be given as Windows format, start by converting to
30486   # unix format.
30487   new_path=`$CYGPATH -u "$path"`
30488 
30489   # Now try to locate executable using which
30490   new_path=`$WHICH "$new_path" 2> /dev/null`
30491   # bat and cmd files are not always considered executable in cygwin causing which
30492   # to not find them
30493   if test "x$new_path" = x \
30494       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30495       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30496     new_path=`$CYGPATH -u "$path"`
30497   fi
30498   if test "x$new_path" = x; then
30499     # Oops. Which didn't find the executable.
30500     # The splitting of arguments from the executable at a space might have been incorrect,
30501     # since paths with space are more likely in Windows. Give it another try with the whole
30502     # argument.
30503     path="$complete"
30504     arguments="EOL"
30505     new_path=`$CYGPATH -u "$path"`
30506     new_path=`$WHICH "$new_path" 2> /dev/null`
30507     # bat and cmd files are not always considered executable in cygwin causing which
30508     # to not find them
30509     if test "x$new_path" = x \
30510         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30511         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30512       new_path=`$CYGPATH -u "$path"`
30513     fi
30514     if test "x$new_path" = x; then
30515       # It's still not found. Now this is an unrecoverable error.
30516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30517 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30518       has_space=`$ECHO "$complete" | $GREP " "`
30519       if test "x$has_space" != x; then
30520         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30521 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30522       fi
30523       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30524     fi
30525   fi
30526 
30527   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30528   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30529   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30530   # "foo.exe" is OK but "foo" is an error.
30531   #
30532   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30533   # It is also a way to make sure we got the proper file name for the real test later on.
30534   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30535   if test "x$test_shortpath" = x; then
30536     # Short path failed, file does not exist as specified.
30537     # Try adding .exe or .cmd
30538     if test -f "${new_path}.exe"; then
30539       input_to_shortpath="${new_path}.exe"
30540     elif test -f "${new_path}.cmd"; then
30541       input_to_shortpath="${new_path}.cmd"
30542     else
30543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30544 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30545       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30546 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30547       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30548     fi
30549   else
30550     input_to_shortpath="$new_path"
30551   fi
30552 
30553   # Call helper function which possibly converts this using DOS-style short mode.
30554   # If so, the updated path is stored in $new_path.
30555   new_path="$input_to_shortpath"
30556 
30557   input_path="$input_to_shortpath"
30558   # Check if we need to convert this using DOS-style short mode. If the path
30559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30560   # take no chances and rewrite it.
30561   # Note: m4 eats our [], so we need to use [ and ] instead.
30562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30563   if test "x$has_forbidden_chars" != x; then
30564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30565     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30566     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30567     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30568       # Going to short mode and back again did indeed matter. Since short mode is
30569       # case insensitive, let's make it lowercase to improve readability.
30570       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30571       # Now convert it back to Unix-style (cygpath)
30572       input_path=`$CYGPATH -u "$shortmode_path"`
30573       new_path="$input_path"
30574     fi
30575   fi
30576 
30577   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30578   if test "x$test_cygdrive_prefix" = x; then
30579     # As a simple fix, exclude /usr/bin since it's not a real path.
30580     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30581       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30582       # a path prefixed by /cygdrive for fixpath to work.
30583       new_path="$CYGWIN_ROOT_PATH$input_path"
30584     fi
30585   fi
30586 
30587   # remove trailing .exe if any
30588   new_path="${new_path/%.exe/}"
30589 
30590     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30591 
30592   # First separate the path from the arguments. This will split at the first
30593   # space.
30594   complete="$VS_ENV_CMD"
30595   path="${complete%% *}"
30596   tmp="$complete EOL"
30597   arguments="${tmp#* }"
30598 
30599   # Input might be given as Windows format, start by converting to
30600   # unix format.
30601   new_path="$path"
30602 
30603   windows_path="$new_path"
30604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30605     unix_path=`$CYGPATH -u "$windows_path"`
30606     new_path="$unix_path"
30607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30609     new_path="$unix_path"
30610   fi
30611 
30612 
30613   # Now try to locate executable using which
30614   new_path=`$WHICH "$new_path" 2> /dev/null`
30615 
30616   if test "x$new_path" = x; then
30617     # Oops. Which didn't find the executable.
30618     # The splitting of arguments from the executable at a space might have been incorrect,
30619     # since paths with space are more likely in Windows. Give it another try with the whole
30620     # argument.
30621     path="$complete"
30622     arguments="EOL"
30623     new_path="$path"
30624 
30625   windows_path="$new_path"
30626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30627     unix_path=`$CYGPATH -u "$windows_path"`
30628     new_path="$unix_path"
30629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30630     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30631     new_path="$unix_path"
30632   fi
30633 
30634 
30635     new_path=`$WHICH "$new_path" 2> /dev/null`
30636     # bat and cmd files are not always considered executable in MSYS causing which
30637     # to not find them
30638     if test "x$new_path" = x \
30639         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30640         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30641       new_path="$path"
30642 
30643   windows_path="$new_path"
30644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30645     unix_path=`$CYGPATH -u "$windows_path"`
30646     new_path="$unix_path"
30647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30648     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30649     new_path="$unix_path"
30650   fi
30651 
30652     fi
30653 
30654     if test "x$new_path" = x; then
30655       # It's still not found. Now this is an unrecoverable error.
30656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30657 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30658       has_space=`$ECHO "$complete" | $GREP " "`
30659       if test "x$has_space" != x; then
30660         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30661 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30662       fi
30663       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30664     fi
30665   fi
30666 
30667   # Now new_path has a complete unix path to the binary
30668   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30669     # Keep paths in /bin as-is, but remove trailing .exe if any
30670     new_path="${new_path/%.exe/}"
30671     # Do not save /bin paths to all_fixpath_prefixes!
30672   else
30673     # Not in mixed or Windows style, start by that.
30674     new_path=`cmd //c echo $new_path`
30675 
30676   input_path="$new_path"
30677   # Check if we need to convert this using DOS-style short mode. If the path
30678   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30679   # take no chances and rewrite it.
30680   # Note: m4 eats our [], so we need to use [ and ] instead.
30681   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30682   if test "x$has_forbidden_chars" != x; then
30683     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30684     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30685   fi
30686 
30687     # Output is in $new_path
30688 
30689   windows_path="$new_path"
30690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30691     unix_path=`$CYGPATH -u "$windows_path"`
30692     new_path="$unix_path"
30693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30695     new_path="$unix_path"
30696   fi
30697 
30698     # remove trailing .exe if any
30699     new_path="${new_path/%.exe/}"
30700 
30701     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30702     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30703   fi
30704 
30705     else
30706       # We're on a unix platform. Hooray! :)
30707       # First separate the path from the arguments. This will split at the first
30708       # space.
30709       complete="$VS_ENV_CMD"
30710       path="${complete%% *}"
30711       tmp="$complete EOL"
30712       arguments="${tmp#* }"
30713 
30714       # Cannot rely on the command "which" here since it doesn't always work.
30715       is_absolute_path=`$ECHO "$path" | $GREP ^/`
30716       if test -z "$is_absolute_path"; then
30717         # Path to executable is not absolute. Find it.
30718         IFS_save="$IFS"
30719         IFS=:
30720         for p in $PATH; do
30721           if test -f "$p/$path" && test -x "$p/$path"; then
30722             new_path="$p/$path"
30723             break
30724           fi
30725         done
30726         IFS="$IFS_save"
30727       else
30728         # This is an absolute path, we can use it without further modifications.
30729         new_path="$path"
30730       fi
30731 
30732       if test "x$new_path" = x; then
30733         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30734 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30735         has_space=`$ECHO "$complete" | $GREP " "`
30736         if test "x$has_space" != x; then
30737           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30738 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30739         fi
30740         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30741       fi
30742     fi
30743 
30744     # Now join together the path and the arguments once again
30745     if test "x$arguments" != xEOL; then
30746       new_complete="$new_path ${arguments% *}"
30747     else
30748       new_complete="$new_path"
30749     fi
30750 
30751     if test "x$complete" != "x$new_complete"; then
30752       VS_ENV_CMD="$new_complete"
30753       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30754 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30755     fi
30756   fi
30757 
30758 
30759       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30760       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30761 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30762 
30763       # We need to create a couple of temporary files.
30764       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30765       $MKDIR -p $VS_ENV_TMP_DIR
30766 
30767       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30768       # Instead create a shell script which will set the relevant variables when run.
30769       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30770 
30771   unix_path="$WINPATH_VS_ENV_CMD"
30772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30773     windows_path=`$CYGPATH -m "$unix_path"`
30774     WINPATH_VS_ENV_CMD="$windows_path"
30775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30776     windows_path=`cmd //c echo $unix_path`
30777     WINPATH_VS_ENV_CMD="$windows_path"
30778   fi
30779 
30780       WINPATH_BASH="$BASH"
30781 
30782   unix_path="$WINPATH_BASH"
30783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30784     windows_path=`$CYGPATH -m "$unix_path"`
30785     WINPATH_BASH="$windows_path"
30786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30787     windows_path=`cmd //c echo $unix_path`
30788     WINPATH_BASH="$windows_path"
30789   fi
30790 
30791 
30792       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30793       # script (executable by bash) that will setup the important variables.
30794       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30795       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30796       # This will end up something like:
30797       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30798       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30799       # These will end up something like:
30800       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30801       # The trailing space for everyone except PATH is no typo, but is needed due
30802       # to trailing \ in the Windows paths. These will be stripped later.
30803       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30804           >> $EXTRACT_VC_ENV_BAT_FILE
30805       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30806           >> $EXTRACT_VC_ENV_BAT_FILE
30807       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30808           >> $EXTRACT_VC_ENV_BAT_FILE
30809       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30810           >> $EXTRACT_VC_ENV_BAT_FILE
30811       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30812           >> $EXTRACT_VC_ENV_BAT_FILE
30813       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30814           >> $EXTRACT_VC_ENV_BAT_FILE
30815 
30816       # Now execute the newly created bat file.
30817       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30818       # Change directory so we don't need to mess with Windows paths in redirects.
30819       cd $VS_ENV_TMP_DIR
30820       cmd /c extract-vs-env.bat | $CAT
30821       cd $CURDIR
30822 
30823       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30824         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30825 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30826         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30827 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30828         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30829 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30830         as_fn_error $? "Cannot continue" "$LINENO" 5
30831       fi
30832 
30833       # Now set all paths and other env variables. This will allow the rest of
30834       # the configure script to find and run the compiler in the proper way.
30835       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30836 $as_echo "$as_me: Setting extracted environment variables" >&6;}
30837       . $VS_ENV_TMP_DIR/set-vs-env.sh
30838       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30839       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30840     else
30841       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30842       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30843 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30844     fi
30845   fi
30846 
30847   # At this point, we should have correct variables in the environment, or we can't continue.
30848   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30849 $as_echo_n "checking for Visual Studio variables... " >&6; }
30850 
30851   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30852       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30853     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30854       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30855 $as_echo "present but broken" >&6; }
30856       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30857     else
30858       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30859 $as_echo "ok" >&6; }
30860       # Remove any trailing "\" ";" and " " from the variables.
30861       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30862       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30863       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30864       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30865       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30866       # Remove any paths containing # (typically F#) as that messes up make. This
30867       # is needed if visual studio was installed with F# support.
30868       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30869 
30870 
30871 
30872 
30873 
30874       # Convert VS_INCLUDE into SYSROOT_CFLAGS
30875       OLDIFS="$IFS"
30876       IFS=";"
30877       for i in $VS_INCLUDE; do
30878         ipath=$i
30879         # Only process non-empty elements
30880         if test "x$ipath" != x; then
30881           IFS="$OLDIFS"
30882           # Check that directory exists before calling fixup_path
30883           testpath=$ipath
30884 
30885   windows_path="$testpath"
30886   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30887     unix_path=`$CYGPATH -u "$windows_path"`
30888     testpath="$unix_path"
30889   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30890     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30891     testpath="$unix_path"
30892   fi
30893 
30894           if test -d "$testpath"; then
30895 
30896   # Only process if variable expands to non-empty
30897 
30898   if test "x$ipath" != x; then
30899     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30900 
30901   # Input might be given as Windows format, start by converting to
30902   # unix format.
30903   path="$ipath"
30904   new_path=`$CYGPATH -u "$path"`
30905 
30906   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30907   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30908   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30909   # "foo.exe" is OK but "foo" is an error.
30910   #
30911   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30912   # It is also a way to make sure we got the proper file name for the real test later on.
30913   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30914   if test "x$test_shortpath" = x; then
30915     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30916 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30917     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30918   fi
30919 
30920   # Call helper function which possibly converts this using DOS-style short mode.
30921   # If so, the updated path is stored in $new_path.
30922 
30923   input_path="$new_path"
30924   # Check if we need to convert this using DOS-style short mode. If the path
30925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30926   # take no chances and rewrite it.
30927   # Note: m4 eats our [], so we need to use [ and ] instead.
30928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30929   if test "x$has_forbidden_chars" != x; then
30930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30934       # Going to short mode and back again did indeed matter. Since short mode is
30935       # case insensitive, let's make it lowercase to improve readability.
30936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30937       # Now convert it back to Unix-style (cygpath)
30938       input_path=`$CYGPATH -u "$shortmode_path"`
30939       new_path="$input_path"
30940     fi
30941   fi
30942 
30943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30944   if test "x$test_cygdrive_prefix" = x; then
30945     # As a simple fix, exclude /usr/bin since it's not a real path.
30946     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30948       # a path prefixed by /cygdrive for fixpath to work.
30949       new_path="$CYGWIN_ROOT_PATH$input_path"
30950     fi
30951   fi
30952 
30953 
30954   if test "x$path" != "x$new_path"; then
30955     ipath="$new_path"
30956     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30957 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30958   fi
30959 
30960     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30961 
30962   path="$ipath"
30963   has_colon=`$ECHO $path | $GREP ^.:`
30964   new_path="$path"
30965   if test "x$has_colon" = x; then
30966     # Not in mixed or Windows style, start by that.
30967     new_path=`cmd //c echo $path`
30968   fi
30969 
30970 
30971   input_path="$new_path"
30972   # Check if we need to convert this using DOS-style short mode. If the path
30973   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30974   # take no chances and rewrite it.
30975   # Note: m4 eats our [], so we need to use [ and ] instead.
30976   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30977   if test "x$has_forbidden_chars" != x; then
30978     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30979     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30980   fi
30981 
30982 
30983   windows_path="$new_path"
30984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30985     unix_path=`$CYGPATH -u "$windows_path"`
30986     new_path="$unix_path"
30987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30989     new_path="$unix_path"
30990   fi
30991 
30992   if test "x$path" != "x$new_path"; then
30993     ipath="$new_path"
30994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30995 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30996   fi
30997 
30998   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30999   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31000 
31001     else
31002       # We're on a unix platform. Hooray! :)
31003       path="$ipath"
31004       has_space=`$ECHO "$path" | $GREP " "`
31005       if test "x$has_space" != x; then
31006         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31007 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31008         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31009       fi
31010 
31011       # Use eval to expand a potential ~
31012       eval path="$path"
31013       if test ! -f "$path" && test ! -d "$path"; then
31014         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31015       fi
31016 
31017       ipath="`cd "$path"; $THEPWDCMD -L`"
31018     fi
31019   fi
31020 
31021             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31022           fi
31023           IFS=";"
31024         fi
31025       done
31026       # Convert VS_LIB into SYSROOT_LDFLAGS
31027       for i in $VS_LIB; do
31028         libpath=$i
31029         # Only process non-empty elements
31030         if test "x$libpath" != x; then
31031           IFS="$OLDIFS"
31032           # Check that directory exists before calling fixup_path
31033           testpath=$libpath
31034 
31035   windows_path="$testpath"
31036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31037     unix_path=`$CYGPATH -u "$windows_path"`
31038     testpath="$unix_path"
31039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31040     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31041     testpath="$unix_path"
31042   fi
31043 
31044           if test -d "$testpath"; then
31045 
31046   # Only process if variable expands to non-empty
31047 
31048   if test "x$libpath" != x; then
31049     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31050 
31051   # Input might be given as Windows format, start by converting to
31052   # unix format.
31053   path="$libpath"
31054   new_path=`$CYGPATH -u "$path"`
31055 
31056   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31057   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31058   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31059   # "foo.exe" is OK but "foo" is an error.
31060   #
31061   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31062   # It is also a way to make sure we got the proper file name for the real test later on.
31063   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31064   if test "x$test_shortpath" = x; then
31065     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31066 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31067     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31068   fi
31069 
31070   # Call helper function which possibly converts this using DOS-style short mode.
31071   # If so, the updated path is stored in $new_path.
31072 
31073   input_path="$new_path"
31074   # Check if we need to convert this using DOS-style short mode. If the path
31075   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31076   # take no chances and rewrite it.
31077   # Note: m4 eats our [], so we need to use [ and ] instead.
31078   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31079   if test "x$has_forbidden_chars" != x; then
31080     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31081     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31082     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31083     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31084       # Going to short mode and back again did indeed matter. Since short mode is
31085       # case insensitive, let's make it lowercase to improve readability.
31086       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31087       # Now convert it back to Unix-style (cygpath)
31088       input_path=`$CYGPATH -u "$shortmode_path"`
31089       new_path="$input_path"
31090     fi
31091   fi
31092 
31093   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31094   if test "x$test_cygdrive_prefix" = x; then
31095     # As a simple fix, exclude /usr/bin since it's not a real path.
31096     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31097       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31098       # a path prefixed by /cygdrive for fixpath to work.
31099       new_path="$CYGWIN_ROOT_PATH$input_path"
31100     fi
31101   fi
31102 
31103 
31104   if test "x$path" != "x$new_path"; then
31105     libpath="$new_path"
31106     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31107 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31108   fi
31109 
31110     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31111 
31112   path="$libpath"
31113   has_colon=`$ECHO $path | $GREP ^.:`
31114   new_path="$path"
31115   if test "x$has_colon" = x; then
31116     # Not in mixed or Windows style, start by that.
31117     new_path=`cmd //c echo $path`
31118   fi
31119 
31120 
31121   input_path="$new_path"
31122   # Check if we need to convert this using DOS-style short mode. If the path
31123   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31124   # take no chances and rewrite it.
31125   # Note: m4 eats our [], so we need to use [ and ] instead.
31126   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31127   if test "x$has_forbidden_chars" != x; then
31128     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31129     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31130   fi
31131 
31132 
31133   windows_path="$new_path"
31134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31135     unix_path=`$CYGPATH -u "$windows_path"`
31136     new_path="$unix_path"
31137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31138     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31139     new_path="$unix_path"
31140   fi
31141 
31142   if test "x$path" != "x$new_path"; then
31143     libpath="$new_path"
31144     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31145 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31146   fi
31147 
31148   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31149   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31150 
31151     else
31152       # We're on a unix platform. Hooray! :)
31153       path="$libpath"
31154       has_space=`$ECHO "$path" | $GREP " "`
31155       if test "x$has_space" != x; then
31156         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31157 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31158         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31159       fi
31160 
31161       # Use eval to expand a potential ~
31162       eval path="$path"
31163       if test ! -f "$path" && test ! -d "$path"; then
31164         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31165       fi
31166 
31167       libpath="`cd "$path"; $THEPWDCMD -L`"
31168     fi
31169   fi
31170 
31171             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31172           fi
31173           IFS=";"
31174         fi
31175       done
31176       IFS="$OLDIFS"
31177     fi
31178   else
31179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31180 $as_echo "not found" >&6; }
31181 
31182     if test "x$VS_ENV_CMD" = x; then
31183       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31184 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31185       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31186 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31187     else
31188       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31189 $as_echo "$as_me: Running the extraction script failed." >&6;}
31190     fi
31191     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31192 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31193     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31194 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31195     as_fn_error $? "Cannot continue" "$LINENO" 5
31196   fi
31197 
31198     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31199     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31200     PATH="$VS_PATH"
31201     # The microsoft toolchain also requires INCLUDE and LIB to be set.
31202     export INCLUDE="$VS_INCLUDE"
31203     export LIB="$VS_LIB"
31204   fi
31205 
31206   # For solaris we really need solaris tools, and not the GNU equivalent.
31207   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31208   # so add that to path before starting to probe.
31209   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31210   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31211     PATH="/usr/ccs/bin:$PATH"
31212   fi
31213 
31214   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31215   # override all other locations.
31216   if test "x$TOOLCHAIN_PATH" != x; then
31217     PATH=$TOOLCHAIN_PATH:$PATH
31218   fi
31219 
31220 
31221   #
31222   # Setup the compilers (CC and CXX)
31223   #
31224 
31225   COMPILER_NAME=C
31226   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31227 
31228   if test "x$CC" != x; then
31229     # User has supplied compiler name already, always let that override.
31230     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31231 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31232     if test "x`basename $CC`" = "x$CC"; then
31233       # A command without a complete path is provided, search $PATH.
31234 
31235       for ac_prog in $CC
31236 do
31237   # Extract the first word of "$ac_prog", so it can be a program name with args.
31238 set dummy $ac_prog; ac_word=$2
31239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31240 $as_echo_n "checking for $ac_word... " >&6; }
31241 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31242   $as_echo_n "(cached) " >&6
31243 else
31244   case $POTENTIAL_CC in
31245   [\\/]* | ?:[\\/]*)
31246   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31247   ;;
31248   *)
31249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31250 for as_dir in $PATH
31251 do
31252   IFS=$as_save_IFS
31253   test -z "$as_dir" && as_dir=.
31254     for ac_exec_ext in '' $ac_executable_extensions; do
31255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31256     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31258     break 2
31259   fi
31260 done
31261   done
31262 IFS=$as_save_IFS
31263 
31264   ;;
31265 esac
31266 fi
31267 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31268 if test -n "$POTENTIAL_CC"; then
31269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31270 $as_echo "$POTENTIAL_CC" >&6; }
31271 else
31272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31273 $as_echo "no" >&6; }
31274 fi
31275 
31276 
31277   test -n "$POTENTIAL_CC" && break
31278 done
31279 
31280       if test "x$POTENTIAL_CC" != x; then
31281         CC=$POTENTIAL_CC
31282       else
31283         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31284       fi
31285     else
31286       # Otherwise it might already be a complete path
31287       if test ! -x "$CC"; then
31288         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31289       fi
31290     fi
31291   else
31292     # No user supplied value. Locate compiler ourselves.
31293 
31294     # If we are cross compiling, assume cross compilation tools follows the
31295     # cross compilation standard where they are prefixed with the autoconf
31296     # standard name for the target. For example the binary
31297     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31298     # If we are not cross compiling, then the default compiler name will be
31299     # used.
31300 
31301     CC=
31302     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31303     # before checking the rest of the PATH.
31304     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31305     # step, this should not be necessary.
31306     if test -n "$TOOLCHAIN_PATH"; then
31307       PATH_save="$PATH"
31308       PATH="$TOOLCHAIN_PATH"
31309       for ac_prog in $SEARCH_LIST
31310 do
31311   # Extract the first word of "$ac_prog", so it can be a program name with args.
31312 set dummy $ac_prog; ac_word=$2
31313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31314 $as_echo_n "checking for $ac_word... " >&6; }
31315 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31316   $as_echo_n "(cached) " >&6
31317 else
31318   case $TOOLCHAIN_PATH_CC in
31319   [\\/]* | ?:[\\/]*)
31320   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31321   ;;
31322   *)
31323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31324 for as_dir in $PATH
31325 do
31326   IFS=$as_save_IFS
31327   test -z "$as_dir" && as_dir=.
31328     for ac_exec_ext in '' $ac_executable_extensions; do
31329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31330     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31332     break 2
31333   fi
31334 done
31335   done
31336 IFS=$as_save_IFS
31337 
31338   ;;
31339 esac
31340 fi
31341 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31342 if test -n "$TOOLCHAIN_PATH_CC"; then
31343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31344 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31345 else
31346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31347 $as_echo "no" >&6; }
31348 fi
31349 
31350 
31351   test -n "$TOOLCHAIN_PATH_CC" && break
31352 done
31353 
31354       CC=$TOOLCHAIN_PATH_CC
31355       PATH="$PATH_save"
31356     fi
31357 
31358     # AC_PATH_PROGS can't be run multiple times with the same variable,
31359     # so create a new name for this run.
31360     if test "x$CC" = x; then
31361       for ac_prog in $SEARCH_LIST
31362 do
31363   # Extract the first word of "$ac_prog", so it can be a program name with args.
31364 set dummy $ac_prog; ac_word=$2
31365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31366 $as_echo_n "checking for $ac_word... " >&6; }
31367 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31368   $as_echo_n "(cached) " >&6
31369 else
31370   case $POTENTIAL_CC in
31371   [\\/]* | ?:[\\/]*)
31372   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31373   ;;
31374   *)
31375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31376 for as_dir in $PATH
31377 do
31378   IFS=$as_save_IFS
31379   test -z "$as_dir" && as_dir=.
31380     for ac_exec_ext in '' $ac_executable_extensions; do
31381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31382     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31384     break 2
31385   fi
31386 done
31387   done
31388 IFS=$as_save_IFS
31389 
31390   ;;
31391 esac
31392 fi
31393 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31394 if test -n "$POTENTIAL_CC"; then
31395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31396 $as_echo "$POTENTIAL_CC" >&6; }
31397 else
31398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31399 $as_echo "no" >&6; }
31400 fi
31401 
31402 
31403   test -n "$POTENTIAL_CC" && break
31404 done
31405 
31406       CC=$POTENTIAL_CC
31407     fi
31408 
31409     if test "x$CC" = x; then
31410 
31411   # Print a helpful message on how to acquire the necessary build dependency.
31412   # devkit is the help tag: freetype, cups, alsa etc
31413   MISSING_DEPENDENCY=devkit
31414 
31415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31416     cygwin_help $MISSING_DEPENDENCY
31417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31418     msys_help $MISSING_DEPENDENCY
31419   else
31420     PKGHANDLER_COMMAND=
31421 
31422     case $PKGHANDLER in
31423       apt-get)
31424         apt_help     $MISSING_DEPENDENCY ;;
31425       yum)
31426         yum_help     $MISSING_DEPENDENCY ;;
31427       port)
31428         port_help    $MISSING_DEPENDENCY ;;
31429       pkgutil)
31430         pkgutil_help $MISSING_DEPENDENCY ;;
31431       pkgadd)
31432         pkgadd_help  $MISSING_DEPENDENCY ;;
31433     esac
31434 
31435     if test "x$PKGHANDLER_COMMAND" != x; then
31436       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31437     fi
31438   fi
31439 
31440       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31441     fi
31442   fi
31443 
31444   # Now we have a compiler binary in CC. Make sure it's okay.
31445 
31446   # Only process if variable expands to non-empty
31447 
31448   if test "x$CC" != x; then
31449     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31450 
31451   # First separate the path from the arguments. This will split at the first
31452   # space.
31453   complete="$CC"
31454   path="${complete%% *}"
31455   tmp="$complete EOL"
31456   arguments="${tmp#* }"
31457 
31458   # Input might be given as Windows format, start by converting to
31459   # unix format.
31460   new_path=`$CYGPATH -u "$path"`
31461 
31462   # Now try to locate executable using which
31463   new_path=`$WHICH "$new_path" 2> /dev/null`
31464   # bat and cmd files are not always considered executable in cygwin causing which
31465   # to not find them
31466   if test "x$new_path" = x \
31467       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31468       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31469     new_path=`$CYGPATH -u "$path"`
31470   fi
31471   if test "x$new_path" = x; then
31472     # Oops. Which didn't find the executable.
31473     # The splitting of arguments from the executable at a space might have been incorrect,
31474     # since paths with space are more likely in Windows. Give it another try with the whole
31475     # argument.
31476     path="$complete"
31477     arguments="EOL"
31478     new_path=`$CYGPATH -u "$path"`
31479     new_path=`$WHICH "$new_path" 2> /dev/null`
31480     # bat and cmd files are not always considered executable in cygwin causing which
31481     # to not find them
31482     if test "x$new_path" = x \
31483         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31484         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31485       new_path=`$CYGPATH -u "$path"`
31486     fi
31487     if test "x$new_path" = x; then
31488       # It's still not found. Now this is an unrecoverable error.
31489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31490 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31491       has_space=`$ECHO "$complete" | $GREP " "`
31492       if test "x$has_space" != x; then
31493         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31494 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31495       fi
31496       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31497     fi
31498   fi
31499 
31500   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31501   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31502   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31503   # "foo.exe" is OK but "foo" is an error.
31504   #
31505   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31506   # It is also a way to make sure we got the proper file name for the real test later on.
31507   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31508   if test "x$test_shortpath" = x; then
31509     # Short path failed, file does not exist as specified.
31510     # Try adding .exe or .cmd
31511     if test -f "${new_path}.exe"; then
31512       input_to_shortpath="${new_path}.exe"
31513     elif test -f "${new_path}.cmd"; then
31514       input_to_shortpath="${new_path}.cmd"
31515     else
31516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31517 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31518       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31519 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31520       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31521     fi
31522   else
31523     input_to_shortpath="$new_path"
31524   fi
31525 
31526   # Call helper function which possibly converts this using DOS-style short mode.
31527   # If so, the updated path is stored in $new_path.
31528   new_path="$input_to_shortpath"
31529 
31530   input_path="$input_to_shortpath"
31531   # Check if we need to convert this using DOS-style short mode. If the path
31532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31533   # take no chances and rewrite it.
31534   # Note: m4 eats our [], so we need to use [ and ] instead.
31535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31536   if test "x$has_forbidden_chars" != x; then
31537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31538     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31539     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31540     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31541       # Going to short mode and back again did indeed matter. Since short mode is
31542       # case insensitive, let's make it lowercase to improve readability.
31543       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31544       # Now convert it back to Unix-style (cygpath)
31545       input_path=`$CYGPATH -u "$shortmode_path"`
31546       new_path="$input_path"
31547     fi
31548   fi
31549 
31550   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31551   if test "x$test_cygdrive_prefix" = x; then
31552     # As a simple fix, exclude /usr/bin since it's not a real path.
31553     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31554       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31555       # a path prefixed by /cygdrive for fixpath to work.
31556       new_path="$CYGWIN_ROOT_PATH$input_path"
31557     fi
31558   fi
31559 
31560   # remove trailing .exe if any
31561   new_path="${new_path/%.exe/}"
31562 
31563     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31564 
31565   # First separate the path from the arguments. This will split at the first
31566   # space.
31567   complete="$CC"
31568   path="${complete%% *}"
31569   tmp="$complete EOL"
31570   arguments="${tmp#* }"
31571 
31572   # Input might be given as Windows format, start by converting to
31573   # unix format.
31574   new_path="$path"
31575 
31576   windows_path="$new_path"
31577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31578     unix_path=`$CYGPATH -u "$windows_path"`
31579     new_path="$unix_path"
31580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31582     new_path="$unix_path"
31583   fi
31584 
31585 
31586   # Now try to locate executable using which
31587   new_path=`$WHICH "$new_path" 2> /dev/null`
31588 
31589   if test "x$new_path" = x; then
31590     # Oops. Which didn't find the executable.
31591     # The splitting of arguments from the executable at a space might have been incorrect,
31592     # since paths with space are more likely in Windows. Give it another try with the whole
31593     # argument.
31594     path="$complete"
31595     arguments="EOL"
31596     new_path="$path"
31597 
31598   windows_path="$new_path"
31599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31600     unix_path=`$CYGPATH -u "$windows_path"`
31601     new_path="$unix_path"
31602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31604     new_path="$unix_path"
31605   fi
31606 
31607 
31608     new_path=`$WHICH "$new_path" 2> /dev/null`
31609     # bat and cmd files are not always considered executable in MSYS causing which
31610     # to not find them
31611     if test "x$new_path" = x \
31612         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31613         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31614       new_path="$path"
31615 
31616   windows_path="$new_path"
31617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31618     unix_path=`$CYGPATH -u "$windows_path"`
31619     new_path="$unix_path"
31620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31622     new_path="$unix_path"
31623   fi
31624 
31625     fi
31626 
31627     if test "x$new_path" = x; then
31628       # It's still not found. Now this is an unrecoverable error.
31629       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31630 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31631       has_space=`$ECHO "$complete" | $GREP " "`
31632       if test "x$has_space" != x; then
31633         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31634 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31635       fi
31636       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31637     fi
31638   fi
31639 
31640   # Now new_path has a complete unix path to the binary
31641   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31642     # Keep paths in /bin as-is, but remove trailing .exe if any
31643     new_path="${new_path/%.exe/}"
31644     # Do not save /bin paths to all_fixpath_prefixes!
31645   else
31646     # Not in mixed or Windows style, start by that.
31647     new_path=`cmd //c echo $new_path`
31648 
31649   input_path="$new_path"
31650   # Check if we need to convert this using DOS-style short mode. If the path
31651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31652   # take no chances and rewrite it.
31653   # Note: m4 eats our [], so we need to use [ and ] instead.
31654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31655   if test "x$has_forbidden_chars" != x; then
31656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31657     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31658   fi
31659 
31660     # Output is in $new_path
31661 
31662   windows_path="$new_path"
31663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31664     unix_path=`$CYGPATH -u "$windows_path"`
31665     new_path="$unix_path"
31666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31668     new_path="$unix_path"
31669   fi
31670 
31671     # remove trailing .exe if any
31672     new_path="${new_path/%.exe/}"
31673 
31674     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31675     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31676   fi
31677 
31678     else
31679       # We're on a unix platform. Hooray! :)
31680       # First separate the path from the arguments. This will split at the first
31681       # space.
31682       complete="$CC"
31683       path="${complete%% *}"
31684       tmp="$complete EOL"
31685       arguments="${tmp#* }"
31686 
31687       # Cannot rely on the command "which" here since it doesn't always work.
31688       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31689       if test -z "$is_absolute_path"; then
31690         # Path to executable is not absolute. Find it.
31691         IFS_save="$IFS"
31692         IFS=:
31693         for p in $PATH; do
31694           if test -f "$p/$path" && test -x "$p/$path"; then
31695             new_path="$p/$path"
31696             break
31697           fi
31698         done
31699         IFS="$IFS_save"
31700       else
31701         # This is an absolute path, we can use it without further modifications.
31702         new_path="$path"
31703       fi
31704 
31705       if test "x$new_path" = x; then
31706         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31707 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31708         has_space=`$ECHO "$complete" | $GREP " "`
31709         if test "x$has_space" != x; then
31710           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31711 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31712         fi
31713         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31714       fi
31715     fi
31716 
31717     # Now join together the path and the arguments once again
31718     if test "x$arguments" != xEOL; then
31719       new_complete="$new_path ${arguments% *}"
31720     else
31721       new_complete="$new_path"
31722     fi
31723 
31724     if test "x$complete" != "x$new_complete"; then
31725       CC="$new_complete"
31726       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31727 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31728     fi
31729   fi
31730 
31731   TEST_COMPILER="$CC"
31732   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31733   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31734   if test "x$OPENJDK_BUILD_OS" != xaix; then
31735     # FIXME: This test should not be needed anymore; we don't do that for any platform.
31736     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31737 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
31738 
31739   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31740     # Follow a chain of symbolic links. Use readlink
31741     # where it exists, else fall back to horribly
31742     # complicated shell code.
31743     if test "x$READLINK_TESTED" != yes; then
31744       # On MacOSX there is a readlink tool with a different
31745       # purpose than the GNU readlink tool. Check the found readlink.
31746       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31747       if test "x$ISGNU" = x; then
31748         # A readlink that we do not know how to use.
31749         # Are there other non-GNU readlinks out there?
31750         READLINK_TESTED=yes
31751         READLINK=
31752       fi
31753     fi
31754 
31755     if test "x$READLINK" != x; then
31756       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31757     else
31758       # Save the current directory for restoring afterwards
31759       STARTDIR=$PWD
31760       COUNTER=0
31761       sym_link_dir=`$DIRNAME $TEST_COMPILER`
31762       sym_link_file=`$BASENAME $TEST_COMPILER`
31763       cd $sym_link_dir
31764       # Use -P flag to resolve symlinks in directories.
31765       cd `$THEPWDCMD -P`
31766       sym_link_dir=`$THEPWDCMD -P`
31767       # Resolve file symlinks
31768       while test $COUNTER -lt 20; do
31769         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31770         if test "x$ISLINK" == x; then
31771           # This is not a symbolic link! We are done!
31772           break
31773         fi
31774         # Again resolve directory symlinks since the target of the just found
31775         # link could be in a different directory
31776         cd `$DIRNAME $ISLINK`
31777         sym_link_dir=`$THEPWDCMD -P`
31778         sym_link_file=`$BASENAME $ISLINK`
31779         let COUNTER=COUNTER+1
31780       done
31781       cd $STARTDIR
31782       TEST_COMPILER=$sym_link_dir/$sym_link_file
31783     fi
31784   fi
31785 
31786     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31787 $as_echo "$TEST_COMPILER" >&6; }
31788   fi
31789   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31790 $as_echo_n "checking if CC is disguised ccache... " >&6; }
31791 
31792   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31793   if test "x$COMPILER_BASENAME" = "xccache"; then
31794     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31795 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31796     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31797     # We want to control ccache invocation ourselves, so ignore this cc and try
31798     # searching again.
31799 
31800     # Remove the path to the fake ccache cc from the PATH
31801     RETRY_COMPILER_SAVED_PATH="$PATH"
31802     COMPILER_DIRNAME=`$DIRNAME $CC`
31803     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31804 
31805     # Try again looking for our compiler
31806     if test -n "$ac_tool_prefix"; then
31807   for ac_prog in $TOOLCHAIN_CC_BINARY
31808   do
31809     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31810 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31812 $as_echo_n "checking for $ac_word... " >&6; }
31813 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31814   $as_echo_n "(cached) " >&6
31815 else
31816   if test -n "$PROPER_COMPILER_CC"; then
31817   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31818 else
31819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31820 for as_dir in $PATH
31821 do
31822   IFS=$as_save_IFS
31823   test -z "$as_dir" && as_dir=.
31824     for ac_exec_ext in '' $ac_executable_extensions; do
31825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31826     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31828     break 2
31829   fi
31830 done
31831   done
31832 IFS=$as_save_IFS
31833 
31834 fi
31835 fi
31836 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31837 if test -n "$PROPER_COMPILER_CC"; then
31838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31839 $as_echo "$PROPER_COMPILER_CC" >&6; }
31840 else
31841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31842 $as_echo "no" >&6; }
31843 fi
31844 
31845 
31846     test -n "$PROPER_COMPILER_CC" && break
31847   done
31848 fi
31849 if test -z "$PROPER_COMPILER_CC"; then
31850   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31851   for ac_prog in $TOOLCHAIN_CC_BINARY
31852 do
31853   # Extract the first word of "$ac_prog", so it can be a program name with args.
31854 set dummy $ac_prog; ac_word=$2
31855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31856 $as_echo_n "checking for $ac_word... " >&6; }
31857 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31858   $as_echo_n "(cached) " >&6
31859 else
31860   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31861   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31862 else
31863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31864 for as_dir in $PATH
31865 do
31866   IFS=$as_save_IFS
31867   test -z "$as_dir" && as_dir=.
31868     for ac_exec_ext in '' $ac_executable_extensions; do
31869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31870     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31872     break 2
31873   fi
31874 done
31875   done
31876 IFS=$as_save_IFS
31877 
31878 fi
31879 fi
31880 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31881 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31883 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31884 else
31885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31886 $as_echo "no" >&6; }
31887 fi
31888 
31889 
31890   test -n "$ac_ct_PROPER_COMPILER_CC" && break
31891 done
31892 
31893   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31894     PROPER_COMPILER_CC=""
31895   else
31896     case $cross_compiling:$ac_tool_warned in
31897 yes:)
31898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31899 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31900 ac_tool_warned=yes ;;
31901 esac
31902     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31903   fi
31904 fi
31905 
31906 
31907   # Only process if variable expands to non-empty
31908 
31909   if test "x$PROPER_COMPILER_CC" != x; then
31910     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31911 
31912   # First separate the path from the arguments. This will split at the first
31913   # space.
31914   complete="$PROPER_COMPILER_CC"
31915   path="${complete%% *}"
31916   tmp="$complete EOL"
31917   arguments="${tmp#* }"
31918 
31919   # Input might be given as Windows format, start by converting to
31920   # unix format.
31921   new_path=`$CYGPATH -u "$path"`
31922 
31923   # Now try to locate executable using which
31924   new_path=`$WHICH "$new_path" 2> /dev/null`
31925   # bat and cmd files are not always considered executable in cygwin causing which
31926   # to not find them
31927   if test "x$new_path" = x \
31928       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31929       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31930     new_path=`$CYGPATH -u "$path"`
31931   fi
31932   if test "x$new_path" = x; then
31933     # Oops. Which didn't find the executable.
31934     # The splitting of arguments from the executable at a space might have been incorrect,
31935     # since paths with space are more likely in Windows. Give it another try with the whole
31936     # argument.
31937     path="$complete"
31938     arguments="EOL"
31939     new_path=`$CYGPATH -u "$path"`
31940     new_path=`$WHICH "$new_path" 2> /dev/null`
31941     # bat and cmd files are not always considered executable in cygwin causing which
31942     # to not find them
31943     if test "x$new_path" = x \
31944         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31945         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31946       new_path=`$CYGPATH -u "$path"`
31947     fi
31948     if test "x$new_path" = x; then
31949       # It's still not found. Now this is an unrecoverable error.
31950       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31951 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31952       has_space=`$ECHO "$complete" | $GREP " "`
31953       if test "x$has_space" != x; then
31954         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31955 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31956       fi
31957       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31958     fi
31959   fi
31960 
31961   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31962   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31963   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31964   # "foo.exe" is OK but "foo" is an error.
31965   #
31966   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31967   # It is also a way to make sure we got the proper file name for the real test later on.
31968   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31969   if test "x$test_shortpath" = x; then
31970     # Short path failed, file does not exist as specified.
31971     # Try adding .exe or .cmd
31972     if test -f "${new_path}.exe"; then
31973       input_to_shortpath="${new_path}.exe"
31974     elif test -f "${new_path}.cmd"; then
31975       input_to_shortpath="${new_path}.cmd"
31976     else
31977       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31978 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31979       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31980 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31981       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31982     fi
31983   else
31984     input_to_shortpath="$new_path"
31985   fi
31986 
31987   # Call helper function which possibly converts this using DOS-style short mode.
31988   # If so, the updated path is stored in $new_path.
31989   new_path="$input_to_shortpath"
31990 
31991   input_path="$input_to_shortpath"
31992   # Check if we need to convert this using DOS-style short mode. If the path
31993   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31994   # take no chances and rewrite it.
31995   # Note: m4 eats our [], so we need to use [ and ] instead.
31996   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31997   if test "x$has_forbidden_chars" != x; then
31998     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31999     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32000     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32001     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32002       # Going to short mode and back again did indeed matter. Since short mode is
32003       # case insensitive, let's make it lowercase to improve readability.
32004       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32005       # Now convert it back to Unix-style (cygpath)
32006       input_path=`$CYGPATH -u "$shortmode_path"`
32007       new_path="$input_path"
32008     fi
32009   fi
32010 
32011   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32012   if test "x$test_cygdrive_prefix" = x; then
32013     # As a simple fix, exclude /usr/bin since it's not a real path.
32014     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32015       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32016       # a path prefixed by /cygdrive for fixpath to work.
32017       new_path="$CYGWIN_ROOT_PATH$input_path"
32018     fi
32019   fi
32020 
32021   # remove trailing .exe if any
32022   new_path="${new_path/%.exe/}"
32023 
32024     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32025 
32026   # First separate the path from the arguments. This will split at the first
32027   # space.
32028   complete="$PROPER_COMPILER_CC"
32029   path="${complete%% *}"
32030   tmp="$complete EOL"
32031   arguments="${tmp#* }"
32032 
32033   # Input might be given as Windows format, start by converting to
32034   # unix format.
32035   new_path="$path"
32036 
32037   windows_path="$new_path"
32038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32039     unix_path=`$CYGPATH -u "$windows_path"`
32040     new_path="$unix_path"
32041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32042     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32043     new_path="$unix_path"
32044   fi
32045 
32046 
32047   # Now try to locate executable using which
32048   new_path=`$WHICH "$new_path" 2> /dev/null`
32049 
32050   if test "x$new_path" = x; then
32051     # Oops. Which didn't find the executable.
32052     # The splitting of arguments from the executable at a space might have been incorrect,
32053     # since paths with space are more likely in Windows. Give it another try with the whole
32054     # argument.
32055     path="$complete"
32056     arguments="EOL"
32057     new_path="$path"
32058 
32059   windows_path="$new_path"
32060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32061     unix_path=`$CYGPATH -u "$windows_path"`
32062     new_path="$unix_path"
32063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32064     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32065     new_path="$unix_path"
32066   fi
32067 
32068 
32069     new_path=`$WHICH "$new_path" 2> /dev/null`
32070     # bat and cmd files are not always considered executable in MSYS causing which
32071     # to not find them
32072     if test "x$new_path" = x \
32073         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32074         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32075       new_path="$path"
32076 
32077   windows_path="$new_path"
32078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32079     unix_path=`$CYGPATH -u "$windows_path"`
32080     new_path="$unix_path"
32081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32083     new_path="$unix_path"
32084   fi
32085 
32086     fi
32087 
32088     if test "x$new_path" = x; then
32089       # It's still not found. Now this is an unrecoverable error.
32090       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32091 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32092       has_space=`$ECHO "$complete" | $GREP " "`
32093       if test "x$has_space" != x; then
32094         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32095 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32096       fi
32097       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32098     fi
32099   fi
32100 
32101   # Now new_path has a complete unix path to the binary
32102   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32103     # Keep paths in /bin as-is, but remove trailing .exe if any
32104     new_path="${new_path/%.exe/}"
32105     # Do not save /bin paths to all_fixpath_prefixes!
32106   else
32107     # Not in mixed or Windows style, start by that.
32108     new_path=`cmd //c echo $new_path`
32109 
32110   input_path="$new_path"
32111   # Check if we need to convert this using DOS-style short mode. If the path
32112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32113   # take no chances and rewrite it.
32114   # Note: m4 eats our [], so we need to use [ and ] instead.
32115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32116   if test "x$has_forbidden_chars" != x; then
32117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32118     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32119   fi
32120 
32121     # Output is in $new_path
32122 
32123   windows_path="$new_path"
32124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32125     unix_path=`$CYGPATH -u "$windows_path"`
32126     new_path="$unix_path"
32127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32128     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32129     new_path="$unix_path"
32130   fi
32131 
32132     # remove trailing .exe if any
32133     new_path="${new_path/%.exe/}"
32134 
32135     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32136     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32137   fi
32138 
32139     else
32140       # We're on a unix platform. Hooray! :)
32141       # First separate the path from the arguments. This will split at the first
32142       # space.
32143       complete="$PROPER_COMPILER_CC"
32144       path="${complete%% *}"
32145       tmp="$complete EOL"
32146       arguments="${tmp#* }"
32147 
32148       # Cannot rely on the command "which" here since it doesn't always work.
32149       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32150       if test -z "$is_absolute_path"; then
32151         # Path to executable is not absolute. Find it.
32152         IFS_save="$IFS"
32153         IFS=:
32154         for p in $PATH; do
32155           if test -f "$p/$path" && test -x "$p/$path"; then
32156             new_path="$p/$path"
32157             break
32158           fi
32159         done
32160         IFS="$IFS_save"
32161       else
32162         # This is an absolute path, we can use it without further modifications.
32163         new_path="$path"
32164       fi
32165 
32166       if test "x$new_path" = x; then
32167         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32168 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32169         has_space=`$ECHO "$complete" | $GREP " "`
32170         if test "x$has_space" != x; then
32171           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32172 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32173         fi
32174         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32175       fi
32176     fi
32177 
32178     # Now join together the path and the arguments once again
32179     if test "x$arguments" != xEOL; then
32180       new_complete="$new_path ${arguments% *}"
32181     else
32182       new_complete="$new_path"
32183     fi
32184 
32185     if test "x$complete" != "x$new_complete"; then
32186       PROPER_COMPILER_CC="$new_complete"
32187       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32188 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32189     fi
32190   fi
32191 
32192     PATH="$RETRY_COMPILER_SAVED_PATH"
32193 
32194     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32195 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32196 
32197   if test "x$OPENJDK_BUILD_OS" != xwindows; then
32198     # Follow a chain of symbolic links. Use readlink
32199     # where it exists, else fall back to horribly
32200     # complicated shell code.
32201     if test "x$READLINK_TESTED" != yes; then
32202       # On MacOSX there is a readlink tool with a different
32203       # purpose than the GNU readlink tool. Check the found readlink.
32204       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32205       if test "x$ISGNU" = x; then
32206         # A readlink that we do not know how to use.
32207         # Are there other non-GNU readlinks out there?
32208         READLINK_TESTED=yes
32209         READLINK=
32210       fi
32211     fi
32212 
32213     if test "x$READLINK" != x; then
32214       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32215     else
32216       # Save the current directory for restoring afterwards
32217       STARTDIR=$PWD
32218       COUNTER=0
32219       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32220       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32221       cd $sym_link_dir
32222       # Use -P flag to resolve symlinks in directories.
32223       cd `$THEPWDCMD -P`
32224       sym_link_dir=`$THEPWDCMD -P`
32225       # Resolve file symlinks
32226       while test $COUNTER -lt 20; do
32227         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32228         if test "x$ISLINK" == x; then
32229           # This is not a symbolic link! We are done!
32230           break
32231         fi
32232         # Again resolve directory symlinks since the target of the just found
32233         # link could be in a different directory
32234         cd `$DIRNAME $ISLINK`
32235         sym_link_dir=`$THEPWDCMD -P`
32236         sym_link_file=`$BASENAME $ISLINK`
32237         let COUNTER=COUNTER+1
32238       done
32239       cd $STARTDIR
32240       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32241     fi
32242   fi
32243 
32244     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32245 $as_echo "$PROPER_COMPILER_CC" >&6; }
32246     CC="$PROPER_COMPILER_CC"
32247   else
32248     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32249 $as_echo "no, keeping CC" >&6; }
32250   fi
32251 
32252 
32253   COMPILER=$CC
32254   COMPILER_NAME=$COMPILER_NAME
32255 
32256   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32257     # cc -V output typically looks like
32258     #     cc: Sun C 5.12 Linux_i386 2011/11/16
32259     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32260     # Check that this is likely to be the Solaris Studio cc.
32261     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32262     if test $? -ne 0; then
32263       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32264       { $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
32265 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32266       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32267 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32268       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32269 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32270       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32271     fi
32272     # Remove usage instructions (if present), and
32273     # collapse compiler output into a single line
32274     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32275         $SED -e 's/ *[Uu]sage:.*//'`
32276     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32277         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32278   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32279     # xlc -qversion output typically looks like
32280     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32281     #     Version: 11.01.0000.0015
32282     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32283     # Check that this is likely to be the IBM XL C compiler.
32284     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32285     if test $? -ne 0; then
32286       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32287       { $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
32288 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32289       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32290 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32291       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32292 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32293       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32294     fi
32295     # Collapse compiler output into a single line
32296     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32297     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32298         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32299   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32300     # There is no specific version flag, but all output starts with a version string.
32301     # First line typically looks something like:
32302     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32303     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32304     # Check that this is likely to be Microsoft CL.EXE.
32305     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32306     if test $? -ne 0; then
32307       { $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
32308 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32309       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32310 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32311       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32312     fi
32313     # Collapse compiler output into a single line
32314     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32315     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32316         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32317   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32318     # gcc --version output typically looks like
32319     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32320     #     Copyright (C) 2013 Free Software Foundation, Inc.
32321     #     This is free software; see the source for copying conditions.  There is NO
32322     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32323     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32324     # Check that this is likely to be GCC.
32325     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32326     if test $? -ne 0; then
32327       { $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
32328 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32329       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32330 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32331       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32332     fi
32333     # Remove Copyright and legalese from version string, and
32334     # collapse into a single line
32335     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32336         $SED -e 's/ *Copyright .*//'`
32337     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32338         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32339   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32340     # clang --version output typically looks like
32341     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32342     #    clang version 3.3 (tags/RELEASE_33/final)
32343     # or
32344     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32345     #    Target: x86_64-pc-linux-gnu
32346     #    Thread model: posix
32347     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32348     # Check that this is likely to be clang
32349     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32350     if test $? -ne 0; then
32351       { $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
32352 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32353       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32354 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32355       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32356     fi
32357     # Collapse compiler output into a single line
32358     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32359     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32360         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32361   else
32362       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32363   fi
32364   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32365   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32366   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32367   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32368 
32369   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32370 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32371 
32372 
32373   # Now that we have resolved CC ourself, let autoconf have its go at it
32374   ac_ext=c
32375 ac_cpp='$CPP $CPPFLAGS'
32376 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32377 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32378 ac_compiler_gnu=$ac_cv_c_compiler_gnu
32379 if test -n "$ac_tool_prefix"; then
32380   for ac_prog in $CC
32381   do
32382     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32383 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32385 $as_echo_n "checking for $ac_word... " >&6; }
32386 if ${ac_cv_prog_CC+:} false; then :
32387   $as_echo_n "(cached) " >&6
32388 else
32389   if test -n "$CC"; then
32390   ac_cv_prog_CC="$CC" # Let the user override the test.
32391 else
32392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32393 for as_dir in $PATH
32394 do
32395   IFS=$as_save_IFS
32396   test -z "$as_dir" && as_dir=.
32397     for ac_exec_ext in '' $ac_executable_extensions; do
32398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32399     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32401     break 2
32402   fi
32403 done
32404   done
32405 IFS=$as_save_IFS
32406 
32407 fi
32408 fi
32409 CC=$ac_cv_prog_CC
32410 if test -n "$CC"; then
32411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32412 $as_echo "$CC" >&6; }
32413 else
32414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32415 $as_echo "no" >&6; }
32416 fi
32417 
32418 
32419     test -n "$CC" && break
32420   done
32421 fi
32422 if test -z "$CC"; then
32423   ac_ct_CC=$CC
32424   for ac_prog in $CC
32425 do
32426   # Extract the first word of "$ac_prog", so it can be a program name with args.
32427 set dummy $ac_prog; ac_word=$2
32428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32429 $as_echo_n "checking for $ac_word... " >&6; }
32430 if ${ac_cv_prog_ac_ct_CC+:} false; then :
32431   $as_echo_n "(cached) " >&6
32432 else
32433   if test -n "$ac_ct_CC"; then
32434   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32435 else
32436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32437 for as_dir in $PATH
32438 do
32439   IFS=$as_save_IFS
32440   test -z "$as_dir" && as_dir=.
32441     for ac_exec_ext in '' $ac_executable_extensions; do
32442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32443     ac_cv_prog_ac_ct_CC="$ac_prog"
32444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32445     break 2
32446   fi
32447 done
32448   done
32449 IFS=$as_save_IFS
32450 
32451 fi
32452 fi
32453 ac_ct_CC=$ac_cv_prog_ac_ct_CC
32454 if test -n "$ac_ct_CC"; then
32455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32456 $as_echo "$ac_ct_CC" >&6; }
32457 else
32458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32459 $as_echo "no" >&6; }
32460 fi
32461 
32462 
32463   test -n "$ac_ct_CC" && break
32464 done
32465 
32466   if test "x$ac_ct_CC" = x; then
32467     CC=""
32468   else
32469     case $cross_compiling:$ac_tool_warned in
32470 yes:)
32471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32472 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32473 ac_tool_warned=yes ;;
32474 esac
32475     CC=$ac_ct_CC
32476   fi
32477 fi
32478 
32479 
32480 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32481 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32482 as_fn_error $? "no acceptable C compiler found in \$PATH
32483 See \`config.log' for more details" "$LINENO" 5; }
32484 
32485 # Provide some information about the compiler.
32486 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32487 set X $ac_compile
32488 ac_compiler=$2
32489 for ac_option in --version -v -V -qversion; do
32490   { { ac_try="$ac_compiler $ac_option >&5"
32491 case "(($ac_try" in
32492   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32493   *) ac_try_echo=$ac_try;;
32494 esac
32495 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32496 $as_echo "$ac_try_echo"; } >&5
32497   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32498   ac_status=$?
32499   if test -s conftest.err; then
32500     sed '10a\
32501 ... rest of stderr output deleted ...
32502          10q' conftest.err >conftest.er1
32503     cat conftest.er1 >&5
32504   fi
32505   rm -f conftest.er1 conftest.err
32506   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32507   test $ac_status = 0; }
32508 done
32509 
32510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32511 /* end confdefs.h.  */
32512 
32513 int
32514 main ()
32515 {
32516 
32517   ;
32518   return 0;
32519 }
32520 _ACEOF
32521 ac_clean_files_save=$ac_clean_files
32522 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32523 # Try to create an executable without -o first, disregard a.out.
32524 # It will help us diagnose broken compilers, and finding out an intuition
32525 # of exeext.
32526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32527 $as_echo_n "checking whether the C compiler works... " >&6; }
32528 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32529 
32530 # The possible output files:
32531 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32532 
32533 ac_rmfiles=
32534 for ac_file in $ac_files
32535 do
32536   case $ac_file in
32537     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32538     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32539   esac
32540 done
32541 rm -f $ac_rmfiles
32542 
32543 if { { ac_try="$ac_link_default"
32544 case "(($ac_try" in
32545   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32546   *) ac_try_echo=$ac_try;;
32547 esac
32548 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32549 $as_echo "$ac_try_echo"; } >&5
32550   (eval "$ac_link_default") 2>&5
32551   ac_status=$?
32552   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32553   test $ac_status = 0; }; then :
32554   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32555 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32556 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
32557 # so that the user can short-circuit this test for compilers unknown to
32558 # Autoconf.
32559 for ac_file in $ac_files ''
32560 do
32561   test -f "$ac_file" || continue
32562   case $ac_file in
32563     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32564         ;;
32565     [ab].out )
32566         # We found the default executable, but exeext='' is most
32567         # certainly right.
32568         break;;
32569     *.* )
32570         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32571         then :; else
32572            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32573         fi
32574         # We set ac_cv_exeext here because the later test for it is not
32575         # safe: cross compilers may not add the suffix if given an `-o'
32576         # argument, so we may need to know it at that point already.
32577         # Even if this section looks crufty: it has the advantage of
32578         # actually working.
32579         break;;
32580     * )
32581         break;;
32582   esac
32583 done
32584 test "$ac_cv_exeext" = no && ac_cv_exeext=
32585 
32586 else
32587   ac_file=''
32588 fi
32589 if test -z "$ac_file"; then :
32590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32591 $as_echo "no" >&6; }
32592 $as_echo "$as_me: failed program was:" >&5
32593 sed 's/^/| /' conftest.$ac_ext >&5
32594 
32595 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32596 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32597 as_fn_error 77 "C compiler cannot create executables
32598 See \`config.log' for more details" "$LINENO" 5; }
32599 else
32600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32601 $as_echo "yes" >&6; }
32602 fi
32603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32604 $as_echo_n "checking for C compiler default output file name... " >&6; }
32605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32606 $as_echo "$ac_file" >&6; }
32607 ac_exeext=$ac_cv_exeext
32608 
32609 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32610 ac_clean_files=$ac_clean_files_save
32611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32612 $as_echo_n "checking for suffix of executables... " >&6; }
32613 if { { ac_try="$ac_link"
32614 case "(($ac_try" in
32615   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32616   *) ac_try_echo=$ac_try;;
32617 esac
32618 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32619 $as_echo "$ac_try_echo"; } >&5
32620   (eval "$ac_link") 2>&5
32621   ac_status=$?
32622   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32623   test $ac_status = 0; }; then :
32624   # If both `conftest.exe' and `conftest' are `present' (well, observable)
32625 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32626 # work properly (i.e., refer to `conftest.exe'), while it won't with
32627 # `rm'.
32628 for ac_file in conftest.exe conftest conftest.*; do
32629   test -f "$ac_file" || continue
32630   case $ac_file in
32631     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32632     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32633           break;;
32634     * ) break;;
32635   esac
32636 done
32637 else
32638   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32639 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32640 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32641 See \`config.log' for more details" "$LINENO" 5; }
32642 fi
32643 rm -f conftest conftest$ac_cv_exeext
32644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32645 $as_echo "$ac_cv_exeext" >&6; }
32646 
32647 rm -f conftest.$ac_ext
32648 EXEEXT=$ac_cv_exeext
32649 ac_exeext=$EXEEXT
32650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32651 /* end confdefs.h.  */
32652 #include <stdio.h>
32653 int
32654 main ()
32655 {
32656 FILE *f = fopen ("conftest.out", "w");
32657  return ferror (f) || fclose (f) != 0;
32658 
32659   ;
32660   return 0;
32661 }
32662 _ACEOF
32663 ac_clean_files="$ac_clean_files conftest.out"
32664 # Check that the compiler produces executables we can run.  If not, either
32665 # the compiler is broken, or we cross compile.
32666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32667 $as_echo_n "checking whether we are cross compiling... " >&6; }
32668 if test "$cross_compiling" != yes; then
32669   { { ac_try="$ac_link"
32670 case "(($ac_try" in
32671   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32672   *) ac_try_echo=$ac_try;;
32673 esac
32674 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32675 $as_echo "$ac_try_echo"; } >&5
32676   (eval "$ac_link") 2>&5
32677   ac_status=$?
32678   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32679   test $ac_status = 0; }
32680   if { ac_try='./conftest$ac_cv_exeext'
32681   { { case "(($ac_try" in
32682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32683   *) ac_try_echo=$ac_try;;
32684 esac
32685 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32686 $as_echo "$ac_try_echo"; } >&5
32687   (eval "$ac_try") 2>&5
32688   ac_status=$?
32689   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32690   test $ac_status = 0; }; }; then
32691     cross_compiling=no
32692   else
32693     if test "$cross_compiling" = maybe; then
32694         cross_compiling=yes
32695     else
32696         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32697 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32698 as_fn_error $? "cannot run C compiled programs.
32699 If you meant to cross compile, use \`--host'.
32700 See \`config.log' for more details" "$LINENO" 5; }
32701     fi
32702   fi
32703 fi
32704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32705 $as_echo "$cross_compiling" >&6; }
32706 
32707 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32708 ac_clean_files=$ac_clean_files_save
32709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32710 $as_echo_n "checking for suffix of object files... " >&6; }
32711 if ${ac_cv_objext+:} false; then :
32712   $as_echo_n "(cached) " >&6
32713 else
32714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32715 /* end confdefs.h.  */
32716 
32717 int
32718 main ()
32719 {
32720 
32721   ;
32722   return 0;
32723 }
32724 _ACEOF
32725 rm -f conftest.o conftest.obj
32726 if { { ac_try="$ac_compile"
32727 case "(($ac_try" in
32728   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32729   *) ac_try_echo=$ac_try;;
32730 esac
32731 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32732 $as_echo "$ac_try_echo"; } >&5
32733   (eval "$ac_compile") 2>&5
32734   ac_status=$?
32735   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32736   test $ac_status = 0; }; then :
32737   for ac_file in conftest.o conftest.obj conftest.*; do
32738   test -f "$ac_file" || continue;
32739   case $ac_file in
32740     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32741     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32742        break;;
32743   esac
32744 done
32745 else
32746   $as_echo "$as_me: failed program was:" >&5
32747 sed 's/^/| /' conftest.$ac_ext >&5
32748 
32749 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32750 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32751 as_fn_error $? "cannot compute suffix of object files: cannot compile
32752 See \`config.log' for more details" "$LINENO" 5; }
32753 fi
32754 rm -f conftest.$ac_cv_objext conftest.$ac_ext
32755 fi
32756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32757 $as_echo "$ac_cv_objext" >&6; }
32758 OBJEXT=$ac_cv_objext
32759 ac_objext=$OBJEXT
32760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32761 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32762 if ${ac_cv_c_compiler_gnu+:} false; then :
32763   $as_echo_n "(cached) " >&6
32764 else
32765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32766 /* end confdefs.h.  */
32767 
32768 int
32769 main ()
32770 {
32771 #ifndef __GNUC__
32772        choke me
32773 #endif
32774 
32775   ;
32776   return 0;
32777 }
32778 _ACEOF
32779 if ac_fn_c_try_compile "$LINENO"; then :
32780   ac_compiler_gnu=yes
32781 else
32782   ac_compiler_gnu=no
32783 fi
32784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32785 ac_cv_c_compiler_gnu=$ac_compiler_gnu
32786 
32787 fi
32788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32789 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
32790 if test $ac_compiler_gnu = yes; then
32791   GCC=yes
32792 else
32793   GCC=
32794 fi
32795 ac_test_CFLAGS=${CFLAGS+set}
32796 ac_save_CFLAGS=$CFLAGS
32797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32798 $as_echo_n "checking whether $CC accepts -g... " >&6; }
32799 if ${ac_cv_prog_cc_g+:} false; then :
32800   $as_echo_n "(cached) " >&6
32801 else
32802   ac_save_c_werror_flag=$ac_c_werror_flag
32803    ac_c_werror_flag=yes
32804    ac_cv_prog_cc_g=no
32805    CFLAGS="-g"
32806    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32807 /* end confdefs.h.  */
32808 
32809 int
32810 main ()
32811 {
32812 
32813   ;
32814   return 0;
32815 }
32816 _ACEOF
32817 if ac_fn_c_try_compile "$LINENO"; then :
32818   ac_cv_prog_cc_g=yes
32819 else
32820   CFLAGS=""
32821       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32822 /* end confdefs.h.  */
32823 
32824 int
32825 main ()
32826 {
32827 
32828   ;
32829   return 0;
32830 }
32831 _ACEOF
32832 if ac_fn_c_try_compile "$LINENO"; then :
32833 
32834 else
32835   ac_c_werror_flag=$ac_save_c_werror_flag
32836          CFLAGS="-g"
32837          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32838 /* end confdefs.h.  */
32839 
32840 int
32841 main ()
32842 {
32843 
32844   ;
32845   return 0;
32846 }
32847 _ACEOF
32848 if ac_fn_c_try_compile "$LINENO"; then :
32849   ac_cv_prog_cc_g=yes
32850 fi
32851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32852 fi
32853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32854 fi
32855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32856    ac_c_werror_flag=$ac_save_c_werror_flag
32857 fi
32858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32859 $as_echo "$ac_cv_prog_cc_g" >&6; }
32860 if test "$ac_test_CFLAGS" = set; then
32861   CFLAGS=$ac_save_CFLAGS
32862 elif test $ac_cv_prog_cc_g = yes; then
32863   if test "$GCC" = yes; then
32864     CFLAGS="-g -O2"
32865   else
32866     CFLAGS="-g"
32867   fi
32868 else
32869   if test "$GCC" = yes; then
32870     CFLAGS="-O2"
32871   else
32872     CFLAGS=
32873   fi
32874 fi
32875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32876 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32877 if ${ac_cv_prog_cc_c89+:} false; then :
32878   $as_echo_n "(cached) " >&6
32879 else
32880   ac_cv_prog_cc_c89=no
32881 ac_save_CC=$CC
32882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32883 /* end confdefs.h.  */
32884 #include <stdarg.h>
32885 #include <stdio.h>
32886 struct stat;
32887 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32888 struct buf { int x; };
32889 FILE * (*rcsopen) (struct buf *, struct stat *, int);
32890 static char *e (p, i)
32891      char **p;
32892      int i;
32893 {
32894   return p[i];
32895 }
32896 static char *f (char * (*g) (char **, int), char **p, ...)
32897 {
32898   char *s;
32899   va_list v;
32900   va_start (v,p);
32901   s = g (p, va_arg (v,int));
32902   va_end (v);
32903   return s;
32904 }
32905 
32906 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32907    function prototypes and stuff, but not '\xHH' hex character constants.
32908    These don't provoke an error unfortunately, instead are silently treated
32909    as 'x'.  The following induces an error, until -std is added to get
32910    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32911    array size at least.  It's necessary to write '\x00'==0 to get something
32912    that's true only with -std.  */
32913 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32914 
32915 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32916    inside strings and character constants.  */
32917 #define FOO(x) 'x'
32918 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32919 
32920 int test (int i, double x);
32921 struct s1 {int (*f) (int a);};
32922 struct s2 {int (*f) (double a);};
32923 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32924 int argc;
32925 char **argv;
32926 int
32927 main ()
32928 {
32929 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32930   ;
32931   return 0;
32932 }
32933 _ACEOF
32934 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32935         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32936 do
32937   CC="$ac_save_CC $ac_arg"
32938   if ac_fn_c_try_compile "$LINENO"; then :
32939   ac_cv_prog_cc_c89=$ac_arg
32940 fi
32941 rm -f core conftest.err conftest.$ac_objext
32942   test "x$ac_cv_prog_cc_c89" != "xno" && break
32943 done
32944 rm -f conftest.$ac_ext
32945 CC=$ac_save_CC
32946 
32947 fi
32948 # AC_CACHE_VAL
32949 case "x$ac_cv_prog_cc_c89" in
32950   x)
32951     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32952 $as_echo "none needed" >&6; } ;;
32953   xno)
32954     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32955 $as_echo "unsupported" >&6; } ;;
32956   *)
32957     CC="$CC $ac_cv_prog_cc_c89"
32958     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32959 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32960 esac
32961 if test "x$ac_cv_prog_cc_c89" != xno; then :
32962 
32963 fi
32964 
32965 ac_ext=cpp
32966 ac_cpp='$CXXCPP $CPPFLAGS'
32967 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32968 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32969 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32970 
32971 
32972 
32973   COMPILER_NAME=C++
32974   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32975 
32976   if test "x$CXX" != x; then
32977     # User has supplied compiler name already, always let that override.
32978     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32979 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32980     if test "x`basename $CXX`" = "x$CXX"; then
32981       # A command without a complete path is provided, search $PATH.
32982 
32983       for ac_prog in $CXX
32984 do
32985   # Extract the first word of "$ac_prog", so it can be a program name with args.
32986 set dummy $ac_prog; ac_word=$2
32987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32988 $as_echo_n "checking for $ac_word... " >&6; }
32989 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32990   $as_echo_n "(cached) " >&6
32991 else
32992   case $POTENTIAL_CXX in
32993   [\\/]* | ?:[\\/]*)
32994   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32995   ;;
32996   *)
32997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32998 for as_dir in $PATH
32999 do
33000   IFS=$as_save_IFS
33001   test -z "$as_dir" && as_dir=.
33002     for ac_exec_ext in '' $ac_executable_extensions; do
33003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33004     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33006     break 2
33007   fi
33008 done
33009   done
33010 IFS=$as_save_IFS
33011 
33012   ;;
33013 esac
33014 fi
33015 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33016 if test -n "$POTENTIAL_CXX"; then
33017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33018 $as_echo "$POTENTIAL_CXX" >&6; }
33019 else
33020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33021 $as_echo "no" >&6; }
33022 fi
33023 
33024 
33025   test -n "$POTENTIAL_CXX" && break
33026 done
33027 
33028       if test "x$POTENTIAL_CXX" != x; then
33029         CXX=$POTENTIAL_CXX
33030       else
33031         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33032       fi
33033     else
33034       # Otherwise it might already be a complete path
33035       if test ! -x "$CXX"; then
33036         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33037       fi
33038     fi
33039   else
33040     # No user supplied value. Locate compiler ourselves.
33041 
33042     # If we are cross compiling, assume cross compilation tools follows the
33043     # cross compilation standard where they are prefixed with the autoconf
33044     # standard name for the target. For example the binary
33045     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33046     # If we are not cross compiling, then the default compiler name will be
33047     # used.
33048 
33049     CXX=
33050     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33051     # before checking the rest of the PATH.
33052     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33053     # step, this should not be necessary.
33054     if test -n "$TOOLCHAIN_PATH"; then
33055       PATH_save="$PATH"
33056       PATH="$TOOLCHAIN_PATH"
33057       for ac_prog in $SEARCH_LIST
33058 do
33059   # Extract the first word of "$ac_prog", so it can be a program name with args.
33060 set dummy $ac_prog; ac_word=$2
33061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33062 $as_echo_n "checking for $ac_word... " >&6; }
33063 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33064   $as_echo_n "(cached) " >&6
33065 else
33066   case $TOOLCHAIN_PATH_CXX in
33067   [\\/]* | ?:[\\/]*)
33068   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33069   ;;
33070   *)
33071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33072 for as_dir in $PATH
33073 do
33074   IFS=$as_save_IFS
33075   test -z "$as_dir" && as_dir=.
33076     for ac_exec_ext in '' $ac_executable_extensions; do
33077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33078     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33080     break 2
33081   fi
33082 done
33083   done
33084 IFS=$as_save_IFS
33085 
33086   ;;
33087 esac
33088 fi
33089 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33090 if test -n "$TOOLCHAIN_PATH_CXX"; then
33091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33092 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33093 else
33094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33095 $as_echo "no" >&6; }
33096 fi
33097 
33098 
33099   test -n "$TOOLCHAIN_PATH_CXX" && break
33100 done
33101 
33102       CXX=$TOOLCHAIN_PATH_CXX
33103       PATH="$PATH_save"
33104     fi
33105 
33106     # AC_PATH_PROGS can't be run multiple times with the same variable,
33107     # so create a new name for this run.
33108     if test "x$CXX" = x; then
33109       for ac_prog in $SEARCH_LIST
33110 do
33111   # Extract the first word of "$ac_prog", so it can be a program name with args.
33112 set dummy $ac_prog; ac_word=$2
33113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33114 $as_echo_n "checking for $ac_word... " >&6; }
33115 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33116   $as_echo_n "(cached) " >&6
33117 else
33118   case $POTENTIAL_CXX in
33119   [\\/]* | ?:[\\/]*)
33120   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33121   ;;
33122   *)
33123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33124 for as_dir in $PATH
33125 do
33126   IFS=$as_save_IFS
33127   test -z "$as_dir" && as_dir=.
33128     for ac_exec_ext in '' $ac_executable_extensions; do
33129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33130     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33132     break 2
33133   fi
33134 done
33135   done
33136 IFS=$as_save_IFS
33137 
33138   ;;
33139 esac
33140 fi
33141 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33142 if test -n "$POTENTIAL_CXX"; then
33143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33144 $as_echo "$POTENTIAL_CXX" >&6; }
33145 else
33146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33147 $as_echo "no" >&6; }
33148 fi
33149 
33150 
33151   test -n "$POTENTIAL_CXX" && break
33152 done
33153 
33154       CXX=$POTENTIAL_CXX
33155     fi
33156 
33157     if test "x$CXX" = x; then
33158 
33159   # Print a helpful message on how to acquire the necessary build dependency.
33160   # devkit is the help tag: freetype, cups, alsa etc
33161   MISSING_DEPENDENCY=devkit
33162 
33163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33164     cygwin_help $MISSING_DEPENDENCY
33165   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33166     msys_help $MISSING_DEPENDENCY
33167   else
33168     PKGHANDLER_COMMAND=
33169 
33170     case $PKGHANDLER in
33171       apt-get)
33172         apt_help     $MISSING_DEPENDENCY ;;
33173       yum)
33174         yum_help     $MISSING_DEPENDENCY ;;
33175       port)
33176         port_help    $MISSING_DEPENDENCY ;;
33177       pkgutil)
33178         pkgutil_help $MISSING_DEPENDENCY ;;
33179       pkgadd)
33180         pkgadd_help  $MISSING_DEPENDENCY ;;
33181     esac
33182 
33183     if test "x$PKGHANDLER_COMMAND" != x; then
33184       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33185     fi
33186   fi
33187 
33188       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33189     fi
33190   fi
33191 
33192   # Now we have a compiler binary in CXX. Make sure it's okay.
33193 
33194   # Only process if variable expands to non-empty
33195 
33196   if test "x$CXX" != x; then
33197     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33198 
33199   # First separate the path from the arguments. This will split at the first
33200   # space.
33201   complete="$CXX"
33202   path="${complete%% *}"
33203   tmp="$complete EOL"
33204   arguments="${tmp#* }"
33205 
33206   # Input might be given as Windows format, start by converting to
33207   # unix format.
33208   new_path=`$CYGPATH -u "$path"`
33209 
33210   # Now try to locate executable using which
33211   new_path=`$WHICH "$new_path" 2> /dev/null`
33212   # bat and cmd files are not always considered executable in cygwin causing which
33213   # to not find them
33214   if test "x$new_path" = x \
33215       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33216       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33217     new_path=`$CYGPATH -u "$path"`
33218   fi
33219   if test "x$new_path" = x; then
33220     # Oops. Which didn't find the executable.
33221     # The splitting of arguments from the executable at a space might have been incorrect,
33222     # since paths with space are more likely in Windows. Give it another try with the whole
33223     # argument.
33224     path="$complete"
33225     arguments="EOL"
33226     new_path=`$CYGPATH -u "$path"`
33227     new_path=`$WHICH "$new_path" 2> /dev/null`
33228     # bat and cmd files are not always considered executable in cygwin causing which
33229     # to not find them
33230     if test "x$new_path" = x \
33231         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33232         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33233       new_path=`$CYGPATH -u "$path"`
33234     fi
33235     if test "x$new_path" = x; then
33236       # It's still not found. Now this is an unrecoverable error.
33237       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33238 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33239       has_space=`$ECHO "$complete" | $GREP " "`
33240       if test "x$has_space" != x; then
33241         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33242 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33243       fi
33244       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33245     fi
33246   fi
33247 
33248   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33249   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33250   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33251   # "foo.exe" is OK but "foo" is an error.
33252   #
33253   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33254   # It is also a way to make sure we got the proper file name for the real test later on.
33255   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33256   if test "x$test_shortpath" = x; then
33257     # Short path failed, file does not exist as specified.
33258     # Try adding .exe or .cmd
33259     if test -f "${new_path}.exe"; then
33260       input_to_shortpath="${new_path}.exe"
33261     elif test -f "${new_path}.cmd"; then
33262       input_to_shortpath="${new_path}.cmd"
33263     else
33264       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33265 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33266       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33267 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33268       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33269     fi
33270   else
33271     input_to_shortpath="$new_path"
33272   fi
33273 
33274   # Call helper function which possibly converts this using DOS-style short mode.
33275   # If so, the updated path is stored in $new_path.
33276   new_path="$input_to_shortpath"
33277 
33278   input_path="$input_to_shortpath"
33279   # Check if we need to convert this using DOS-style short mode. If the path
33280   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33281   # take no chances and rewrite it.
33282   # Note: m4 eats our [], so we need to use [ and ] instead.
33283   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33284   if test "x$has_forbidden_chars" != x; then
33285     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33286     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33287     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33288     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33289       # Going to short mode and back again did indeed matter. Since short mode is
33290       # case insensitive, let's make it lowercase to improve readability.
33291       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33292       # Now convert it back to Unix-style (cygpath)
33293       input_path=`$CYGPATH -u "$shortmode_path"`
33294       new_path="$input_path"
33295     fi
33296   fi
33297 
33298   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33299   if test "x$test_cygdrive_prefix" = x; then
33300     # As a simple fix, exclude /usr/bin since it's not a real path.
33301     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33302       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33303       # a path prefixed by /cygdrive for fixpath to work.
33304       new_path="$CYGWIN_ROOT_PATH$input_path"
33305     fi
33306   fi
33307 
33308   # remove trailing .exe if any
33309   new_path="${new_path/%.exe/}"
33310 
33311     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33312 
33313   # First separate the path from the arguments. This will split at the first
33314   # space.
33315   complete="$CXX"
33316   path="${complete%% *}"
33317   tmp="$complete EOL"
33318   arguments="${tmp#* }"
33319 
33320   # Input might be given as Windows format, start by converting to
33321   # unix format.
33322   new_path="$path"
33323 
33324   windows_path="$new_path"
33325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33326     unix_path=`$CYGPATH -u "$windows_path"`
33327     new_path="$unix_path"
33328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33330     new_path="$unix_path"
33331   fi
33332 
33333 
33334   # Now try to locate executable using which
33335   new_path=`$WHICH "$new_path" 2> /dev/null`
33336 
33337   if test "x$new_path" = x; then
33338     # Oops. Which didn't find the executable.
33339     # The splitting of arguments from the executable at a space might have been incorrect,
33340     # since paths with space are more likely in Windows. Give it another try with the whole
33341     # argument.
33342     path="$complete"
33343     arguments="EOL"
33344     new_path="$path"
33345 
33346   windows_path="$new_path"
33347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33348     unix_path=`$CYGPATH -u "$windows_path"`
33349     new_path="$unix_path"
33350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33352     new_path="$unix_path"
33353   fi
33354 
33355 
33356     new_path=`$WHICH "$new_path" 2> /dev/null`
33357     # bat and cmd files are not always considered executable in MSYS causing which
33358     # to not find them
33359     if test "x$new_path" = x \
33360         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33361         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33362       new_path="$path"
33363 
33364   windows_path="$new_path"
33365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33366     unix_path=`$CYGPATH -u "$windows_path"`
33367     new_path="$unix_path"
33368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33370     new_path="$unix_path"
33371   fi
33372 
33373     fi
33374 
33375     if test "x$new_path" = x; then
33376       # It's still not found. Now this is an unrecoverable error.
33377       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33378 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33379       has_space=`$ECHO "$complete" | $GREP " "`
33380       if test "x$has_space" != x; then
33381         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33382 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33383       fi
33384       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33385     fi
33386   fi
33387 
33388   # Now new_path has a complete unix path to the binary
33389   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33390     # Keep paths in /bin as-is, but remove trailing .exe if any
33391     new_path="${new_path/%.exe/}"
33392     # Do not save /bin paths to all_fixpath_prefixes!
33393   else
33394     # Not in mixed or Windows style, start by that.
33395     new_path=`cmd //c echo $new_path`
33396 
33397   input_path="$new_path"
33398   # Check if we need to convert this using DOS-style short mode. If the path
33399   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33400   # take no chances and rewrite it.
33401   # Note: m4 eats our [], so we need to use [ and ] instead.
33402   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33403   if test "x$has_forbidden_chars" != x; then
33404     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33405     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33406   fi
33407 
33408     # Output is in $new_path
33409 
33410   windows_path="$new_path"
33411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33412     unix_path=`$CYGPATH -u "$windows_path"`
33413     new_path="$unix_path"
33414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33416     new_path="$unix_path"
33417   fi
33418 
33419     # remove trailing .exe if any
33420     new_path="${new_path/%.exe/}"
33421 
33422     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33423     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33424   fi
33425 
33426     else
33427       # We're on a unix platform. Hooray! :)
33428       # First separate the path from the arguments. This will split at the first
33429       # space.
33430       complete="$CXX"
33431       path="${complete%% *}"
33432       tmp="$complete EOL"
33433       arguments="${tmp#* }"
33434 
33435       # Cannot rely on the command "which" here since it doesn't always work.
33436       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33437       if test -z "$is_absolute_path"; then
33438         # Path to executable is not absolute. Find it.
33439         IFS_save="$IFS"
33440         IFS=:
33441         for p in $PATH; do
33442           if test -f "$p/$path" && test -x "$p/$path"; then
33443             new_path="$p/$path"
33444             break
33445           fi
33446         done
33447         IFS="$IFS_save"
33448       else
33449         # This is an absolute path, we can use it without further modifications.
33450         new_path="$path"
33451       fi
33452 
33453       if test "x$new_path" = x; then
33454         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33455 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33456         has_space=`$ECHO "$complete" | $GREP " "`
33457         if test "x$has_space" != x; then
33458           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33459 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33460         fi
33461         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33462       fi
33463     fi
33464 
33465     # Now join together the path and the arguments once again
33466     if test "x$arguments" != xEOL; then
33467       new_complete="$new_path ${arguments% *}"
33468     else
33469       new_complete="$new_path"
33470     fi
33471 
33472     if test "x$complete" != "x$new_complete"; then
33473       CXX="$new_complete"
33474       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33475 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33476     fi
33477   fi
33478 
33479   TEST_COMPILER="$CXX"
33480   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33481   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33482   if test "x$OPENJDK_BUILD_OS" != xaix; then
33483     # FIXME: This test should not be needed anymore; we don't do that for any platform.
33484     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33485 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33486 
33487   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33488     # Follow a chain of symbolic links. Use readlink
33489     # where it exists, else fall back to horribly
33490     # complicated shell code.
33491     if test "x$READLINK_TESTED" != yes; then
33492       # On MacOSX there is a readlink tool with a different
33493       # purpose than the GNU readlink tool. Check the found readlink.
33494       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33495       if test "x$ISGNU" = x; then
33496         # A readlink that we do not know how to use.
33497         # Are there other non-GNU readlinks out there?
33498         READLINK_TESTED=yes
33499         READLINK=
33500       fi
33501     fi
33502 
33503     if test "x$READLINK" != x; then
33504       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33505     else
33506       # Save the current directory for restoring afterwards
33507       STARTDIR=$PWD
33508       COUNTER=0
33509       sym_link_dir=`$DIRNAME $TEST_COMPILER`
33510       sym_link_file=`$BASENAME $TEST_COMPILER`
33511       cd $sym_link_dir
33512       # Use -P flag to resolve symlinks in directories.
33513       cd `$THEPWDCMD -P`
33514       sym_link_dir=`$THEPWDCMD -P`
33515       # Resolve file symlinks
33516       while test $COUNTER -lt 20; do
33517         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33518         if test "x$ISLINK" == x; then
33519           # This is not a symbolic link! We are done!
33520           break
33521         fi
33522         # Again resolve directory symlinks since the target of the just found
33523         # link could be in a different directory
33524         cd `$DIRNAME $ISLINK`
33525         sym_link_dir=`$THEPWDCMD -P`
33526         sym_link_file=`$BASENAME $ISLINK`
33527         let COUNTER=COUNTER+1
33528       done
33529       cd $STARTDIR
33530       TEST_COMPILER=$sym_link_dir/$sym_link_file
33531     fi
33532   fi
33533 
33534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33535 $as_echo "$TEST_COMPILER" >&6; }
33536   fi
33537   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33538 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
33539 
33540   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33541   if test "x$COMPILER_BASENAME" = "xccache"; then
33542     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33543 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33544     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33545     # We want to control ccache invocation ourselves, so ignore this cc and try
33546     # searching again.
33547 
33548     # Remove the path to the fake ccache cc from the PATH
33549     RETRY_COMPILER_SAVED_PATH="$PATH"
33550     COMPILER_DIRNAME=`$DIRNAME $CXX`
33551     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33552 
33553     # Try again looking for our compiler
33554     if test -n "$ac_tool_prefix"; then
33555   for ac_prog in $TOOLCHAIN_CXX_BINARY
33556   do
33557     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33558 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33560 $as_echo_n "checking for $ac_word... " >&6; }
33561 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33562   $as_echo_n "(cached) " >&6
33563 else
33564   if test -n "$PROPER_COMPILER_CXX"; then
33565   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33566 else
33567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33568 for as_dir in $PATH
33569 do
33570   IFS=$as_save_IFS
33571   test -z "$as_dir" && as_dir=.
33572     for ac_exec_ext in '' $ac_executable_extensions; do
33573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33574     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33576     break 2
33577   fi
33578 done
33579   done
33580 IFS=$as_save_IFS
33581 
33582 fi
33583 fi
33584 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33585 if test -n "$PROPER_COMPILER_CXX"; then
33586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33587 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33588 else
33589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33590 $as_echo "no" >&6; }
33591 fi
33592 
33593 
33594     test -n "$PROPER_COMPILER_CXX" && break
33595   done
33596 fi
33597 if test -z "$PROPER_COMPILER_CXX"; then
33598   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33599   for ac_prog in $TOOLCHAIN_CXX_BINARY
33600 do
33601   # Extract the first word of "$ac_prog", so it can be a program name with args.
33602 set dummy $ac_prog; ac_word=$2
33603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33604 $as_echo_n "checking for $ac_word... " >&6; }
33605 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33606   $as_echo_n "(cached) " >&6
33607 else
33608   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33609   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33610 else
33611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33612 for as_dir in $PATH
33613 do
33614   IFS=$as_save_IFS
33615   test -z "$as_dir" && as_dir=.
33616     for ac_exec_ext in '' $ac_executable_extensions; do
33617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33618     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33620     break 2
33621   fi
33622 done
33623   done
33624 IFS=$as_save_IFS
33625 
33626 fi
33627 fi
33628 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33629 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33631 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33632 else
33633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33634 $as_echo "no" >&6; }
33635 fi
33636 
33637 
33638   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33639 done
33640 
33641   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33642     PROPER_COMPILER_CXX=""
33643   else
33644     case $cross_compiling:$ac_tool_warned in
33645 yes:)
33646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33647 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33648 ac_tool_warned=yes ;;
33649 esac
33650     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33651   fi
33652 fi
33653 
33654 
33655   # Only process if variable expands to non-empty
33656 
33657   if test "x$PROPER_COMPILER_CXX" != x; then
33658     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33659 
33660   # First separate the path from the arguments. This will split at the first
33661   # space.
33662   complete="$PROPER_COMPILER_CXX"
33663   path="${complete%% *}"
33664   tmp="$complete EOL"
33665   arguments="${tmp#* }"
33666 
33667   # Input might be given as Windows format, start by converting to
33668   # unix format.
33669   new_path=`$CYGPATH -u "$path"`
33670 
33671   # Now try to locate executable using which
33672   new_path=`$WHICH "$new_path" 2> /dev/null`
33673   # bat and cmd files are not always considered executable in cygwin causing which
33674   # to not find them
33675   if test "x$new_path" = x \
33676       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33677       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33678     new_path=`$CYGPATH -u "$path"`
33679   fi
33680   if test "x$new_path" = x; then
33681     # Oops. Which didn't find the executable.
33682     # The splitting of arguments from the executable at a space might have been incorrect,
33683     # since paths with space are more likely in Windows. Give it another try with the whole
33684     # argument.
33685     path="$complete"
33686     arguments="EOL"
33687     new_path=`$CYGPATH -u "$path"`
33688     new_path=`$WHICH "$new_path" 2> /dev/null`
33689     # bat and cmd files are not always considered executable in cygwin causing which
33690     # to not find them
33691     if test "x$new_path" = x \
33692         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33693         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33694       new_path=`$CYGPATH -u "$path"`
33695     fi
33696     if test "x$new_path" = x; then
33697       # It's still not found. Now this is an unrecoverable error.
33698       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33699 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33700       has_space=`$ECHO "$complete" | $GREP " "`
33701       if test "x$has_space" != x; then
33702         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33703 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33704       fi
33705       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33706     fi
33707   fi
33708 
33709   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33710   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33711   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33712   # "foo.exe" is OK but "foo" is an error.
33713   #
33714   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33715   # It is also a way to make sure we got the proper file name for the real test later on.
33716   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33717   if test "x$test_shortpath" = x; then
33718     # Short path failed, file does not exist as specified.
33719     # Try adding .exe or .cmd
33720     if test -f "${new_path}.exe"; then
33721       input_to_shortpath="${new_path}.exe"
33722     elif test -f "${new_path}.cmd"; then
33723       input_to_shortpath="${new_path}.cmd"
33724     else
33725       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33726 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33727       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33728 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33729       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33730     fi
33731   else
33732     input_to_shortpath="$new_path"
33733   fi
33734 
33735   # Call helper function which possibly converts this using DOS-style short mode.
33736   # If so, the updated path is stored in $new_path.
33737   new_path="$input_to_shortpath"
33738 
33739   input_path="$input_to_shortpath"
33740   # Check if we need to convert this using DOS-style short mode. If the path
33741   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33742   # take no chances and rewrite it.
33743   # Note: m4 eats our [], so we need to use [ and ] instead.
33744   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33745   if test "x$has_forbidden_chars" != x; then
33746     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33747     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33748     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33749     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33750       # Going to short mode and back again did indeed matter. Since short mode is
33751       # case insensitive, let's make it lowercase to improve readability.
33752       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33753       # Now convert it back to Unix-style (cygpath)
33754       input_path=`$CYGPATH -u "$shortmode_path"`
33755       new_path="$input_path"
33756     fi
33757   fi
33758 
33759   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33760   if test "x$test_cygdrive_prefix" = x; then
33761     # As a simple fix, exclude /usr/bin since it's not a real path.
33762     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33763       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33764       # a path prefixed by /cygdrive for fixpath to work.
33765       new_path="$CYGWIN_ROOT_PATH$input_path"
33766     fi
33767   fi
33768 
33769   # remove trailing .exe if any
33770   new_path="${new_path/%.exe/}"
33771 
33772     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33773 
33774   # First separate the path from the arguments. This will split at the first
33775   # space.
33776   complete="$PROPER_COMPILER_CXX"
33777   path="${complete%% *}"
33778   tmp="$complete EOL"
33779   arguments="${tmp#* }"
33780 
33781   # Input might be given as Windows format, start by converting to
33782   # unix format.
33783   new_path="$path"
33784 
33785   windows_path="$new_path"
33786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33787     unix_path=`$CYGPATH -u "$windows_path"`
33788     new_path="$unix_path"
33789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33791     new_path="$unix_path"
33792   fi
33793 
33794 
33795   # Now try to locate executable using which
33796   new_path=`$WHICH "$new_path" 2> /dev/null`
33797 
33798   if test "x$new_path" = x; then
33799     # Oops. Which didn't find the executable.
33800     # The splitting of arguments from the executable at a space might have been incorrect,
33801     # since paths with space are more likely in Windows. Give it another try with the whole
33802     # argument.
33803     path="$complete"
33804     arguments="EOL"
33805     new_path="$path"
33806 
33807   windows_path="$new_path"
33808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33809     unix_path=`$CYGPATH -u "$windows_path"`
33810     new_path="$unix_path"
33811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33813     new_path="$unix_path"
33814   fi
33815 
33816 
33817     new_path=`$WHICH "$new_path" 2> /dev/null`
33818     # bat and cmd files are not always considered executable in MSYS causing which
33819     # to not find them
33820     if test "x$new_path" = x \
33821         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33822         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33823       new_path="$path"
33824 
33825   windows_path="$new_path"
33826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33827     unix_path=`$CYGPATH -u "$windows_path"`
33828     new_path="$unix_path"
33829   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33830     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33831     new_path="$unix_path"
33832   fi
33833 
33834     fi
33835 
33836     if test "x$new_path" = x; then
33837       # It's still not found. Now this is an unrecoverable error.
33838       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33839 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33840       has_space=`$ECHO "$complete" | $GREP " "`
33841       if test "x$has_space" != x; then
33842         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33843 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33844       fi
33845       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33846     fi
33847   fi
33848 
33849   # Now new_path has a complete unix path to the binary
33850   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33851     # Keep paths in /bin as-is, but remove trailing .exe if any
33852     new_path="${new_path/%.exe/}"
33853     # Do not save /bin paths to all_fixpath_prefixes!
33854   else
33855     # Not in mixed or Windows style, start by that.
33856     new_path=`cmd //c echo $new_path`
33857 
33858   input_path="$new_path"
33859   # Check if we need to convert this using DOS-style short mode. If the path
33860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33861   # take no chances and rewrite it.
33862   # Note: m4 eats our [], so we need to use [ and ] instead.
33863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33864   if test "x$has_forbidden_chars" != x; then
33865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33866     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33867   fi
33868 
33869     # Output is in $new_path
33870 
33871   windows_path="$new_path"
33872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33873     unix_path=`$CYGPATH -u "$windows_path"`
33874     new_path="$unix_path"
33875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33876     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33877     new_path="$unix_path"
33878   fi
33879 
33880     # remove trailing .exe if any
33881     new_path="${new_path/%.exe/}"
33882 
33883     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33884     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33885   fi
33886 
33887     else
33888       # We're on a unix platform. Hooray! :)
33889       # First separate the path from the arguments. This will split at the first
33890       # space.
33891       complete="$PROPER_COMPILER_CXX"
33892       path="${complete%% *}"
33893       tmp="$complete EOL"
33894       arguments="${tmp#* }"
33895 
33896       # Cannot rely on the command "which" here since it doesn't always work.
33897       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33898       if test -z "$is_absolute_path"; then
33899         # Path to executable is not absolute. Find it.
33900         IFS_save="$IFS"
33901         IFS=:
33902         for p in $PATH; do
33903           if test -f "$p/$path" && test -x "$p/$path"; then
33904             new_path="$p/$path"
33905             break
33906           fi
33907         done
33908         IFS="$IFS_save"
33909       else
33910         # This is an absolute path, we can use it without further modifications.
33911         new_path="$path"
33912       fi
33913 
33914       if test "x$new_path" = x; then
33915         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33916 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33917         has_space=`$ECHO "$complete" | $GREP " "`
33918         if test "x$has_space" != x; then
33919           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33920 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33921         fi
33922         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33923       fi
33924     fi
33925 
33926     # Now join together the path and the arguments once again
33927     if test "x$arguments" != xEOL; then
33928       new_complete="$new_path ${arguments% *}"
33929     else
33930       new_complete="$new_path"
33931     fi
33932 
33933     if test "x$complete" != "x$new_complete"; then
33934       PROPER_COMPILER_CXX="$new_complete"
33935       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33936 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33937     fi
33938   fi
33939 
33940     PATH="$RETRY_COMPILER_SAVED_PATH"
33941 
33942     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33943 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33944 
33945   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33946     # Follow a chain of symbolic links. Use readlink
33947     # where it exists, else fall back to horribly
33948     # complicated shell code.
33949     if test "x$READLINK_TESTED" != yes; then
33950       # On MacOSX there is a readlink tool with a different
33951       # purpose than the GNU readlink tool. Check the found readlink.
33952       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33953       if test "x$ISGNU" = x; then
33954         # A readlink that we do not know how to use.
33955         # Are there other non-GNU readlinks out there?
33956         READLINK_TESTED=yes
33957         READLINK=
33958       fi
33959     fi
33960 
33961     if test "x$READLINK" != x; then
33962       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33963     else
33964       # Save the current directory for restoring afterwards
33965       STARTDIR=$PWD
33966       COUNTER=0
33967       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33968       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33969       cd $sym_link_dir
33970       # Use -P flag to resolve symlinks in directories.
33971       cd `$THEPWDCMD -P`
33972       sym_link_dir=`$THEPWDCMD -P`
33973       # Resolve file symlinks
33974       while test $COUNTER -lt 20; do
33975         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33976         if test "x$ISLINK" == x; then
33977           # This is not a symbolic link! We are done!
33978           break
33979         fi
33980         # Again resolve directory symlinks since the target of the just found
33981         # link could be in a different directory
33982         cd `$DIRNAME $ISLINK`
33983         sym_link_dir=`$THEPWDCMD -P`
33984         sym_link_file=`$BASENAME $ISLINK`
33985         let COUNTER=COUNTER+1
33986       done
33987       cd $STARTDIR
33988       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33989     fi
33990   fi
33991 
33992     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33993 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33994     CXX="$PROPER_COMPILER_CXX"
33995   else
33996     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33997 $as_echo "no, keeping CXX" >&6; }
33998   fi
33999 
34000 
34001   COMPILER=$CXX
34002   COMPILER_NAME=$COMPILER_NAME
34003 
34004   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34005     # cc -V output typically looks like
34006     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34007     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34008     # Check that this is likely to be the Solaris Studio cc.
34009     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34010     if test $? -ne 0; then
34011       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34012       { $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
34013 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34014       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34015 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34016       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34017 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34018       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34019     fi
34020     # Remove usage instructions (if present), and
34021     # collapse compiler output into a single line
34022     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34023         $SED -e 's/ *[Uu]sage:.*//'`
34024     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34025         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34026   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34027     # xlc -qversion output typically looks like
34028     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34029     #     Version: 11.01.0000.0015
34030     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34031     # Check that this is likely to be the IBM XL C compiler.
34032     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34033     if test $? -ne 0; then
34034       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34035       { $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
34036 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34037       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34038 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34039       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34040 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34041       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34042     fi
34043     # Collapse compiler output into a single line
34044     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34045     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34046         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34047   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34048     # There is no specific version flag, but all output starts with a version string.
34049     # First line typically looks something like:
34050     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34051     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34052     # Check that this is likely to be Microsoft CL.EXE.
34053     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34054     if test $? -ne 0; then
34055       { $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
34056 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34057       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34058 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34059       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34060     fi
34061     # Collapse compiler output into a single line
34062     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34063     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34064         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34065   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34066     # gcc --version output typically looks like
34067     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34068     #     Copyright (C) 2013 Free Software Foundation, Inc.
34069     #     This is free software; see the source for copying conditions.  There is NO
34070     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34071     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34072     # Check that this is likely to be GCC.
34073     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34074     if test $? -ne 0; then
34075       { $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
34076 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34077       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34078 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34079       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34080     fi
34081     # Remove Copyright and legalese from version string, and
34082     # collapse into a single line
34083     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34084         $SED -e 's/ *Copyright .*//'`
34085     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34086         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34087   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34088     # clang --version output typically looks like
34089     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34090     #    clang version 3.3 (tags/RELEASE_33/final)
34091     # or
34092     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34093     #    Target: x86_64-pc-linux-gnu
34094     #    Thread model: posix
34095     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34096     # Check that this is likely to be clang
34097     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34098     if test $? -ne 0; then
34099       { $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
34100 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34101       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34102 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34103       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34104     fi
34105     # Collapse compiler output into a single line
34106     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34107     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34108         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34109   else
34110       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34111   fi
34112   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34113   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34114   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34115   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34116 
34117   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34118 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34119 
34120 
34121   # Now that we have resolved CXX ourself, let autoconf have its go at it
34122   ac_ext=cpp
34123 ac_cpp='$CXXCPP $CPPFLAGS'
34124 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34125 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34126 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34127 if test -z "$CXX"; then
34128   if test -n "$CCC"; then
34129     CXX=$CCC
34130   else
34131     if test -n "$ac_tool_prefix"; then
34132   for ac_prog in $CXX
34133   do
34134     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34135 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34137 $as_echo_n "checking for $ac_word... " >&6; }
34138 if ${ac_cv_prog_CXX+:} false; then :
34139   $as_echo_n "(cached) " >&6
34140 else
34141   if test -n "$CXX"; then
34142   ac_cv_prog_CXX="$CXX" # Let the user override the test.
34143 else
34144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34145 for as_dir in $PATH
34146 do
34147   IFS=$as_save_IFS
34148   test -z "$as_dir" && as_dir=.
34149     for ac_exec_ext in '' $ac_executable_extensions; do
34150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34151     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34153     break 2
34154   fi
34155 done
34156   done
34157 IFS=$as_save_IFS
34158 
34159 fi
34160 fi
34161 CXX=$ac_cv_prog_CXX
34162 if test -n "$CXX"; then
34163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34164 $as_echo "$CXX" >&6; }
34165 else
34166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34167 $as_echo "no" >&6; }
34168 fi
34169 
34170 
34171     test -n "$CXX" && break
34172   done
34173 fi
34174 if test -z "$CXX"; then
34175   ac_ct_CXX=$CXX
34176   for ac_prog in $CXX
34177 do
34178   # Extract the first word of "$ac_prog", so it can be a program name with args.
34179 set dummy $ac_prog; ac_word=$2
34180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34181 $as_echo_n "checking for $ac_word... " >&6; }
34182 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34183   $as_echo_n "(cached) " >&6
34184 else
34185   if test -n "$ac_ct_CXX"; then
34186   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34187 else
34188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34189 for as_dir in $PATH
34190 do
34191   IFS=$as_save_IFS
34192   test -z "$as_dir" && as_dir=.
34193     for ac_exec_ext in '' $ac_executable_extensions; do
34194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34195     ac_cv_prog_ac_ct_CXX="$ac_prog"
34196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34197     break 2
34198   fi
34199 done
34200   done
34201 IFS=$as_save_IFS
34202 
34203 fi
34204 fi
34205 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34206 if test -n "$ac_ct_CXX"; then
34207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34208 $as_echo "$ac_ct_CXX" >&6; }
34209 else
34210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34211 $as_echo "no" >&6; }
34212 fi
34213 
34214 
34215   test -n "$ac_ct_CXX" && break
34216 done
34217 
34218   if test "x$ac_ct_CXX" = x; then
34219     CXX="g++"
34220   else
34221     case $cross_compiling:$ac_tool_warned in
34222 yes:)
34223 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34224 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34225 ac_tool_warned=yes ;;
34226 esac
34227     CXX=$ac_ct_CXX
34228   fi
34229 fi
34230 
34231   fi
34232 fi
34233 # Provide some information about the compiler.
34234 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34235 set X $ac_compile
34236 ac_compiler=$2
34237 for ac_option in --version -v -V -qversion; do
34238   { { ac_try="$ac_compiler $ac_option >&5"
34239 case "(($ac_try" in
34240   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34241   *) ac_try_echo=$ac_try;;
34242 esac
34243 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34244 $as_echo "$ac_try_echo"; } >&5
34245   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34246   ac_status=$?
34247   if test -s conftest.err; then
34248     sed '10a\
34249 ... rest of stderr output deleted ...
34250          10q' conftest.err >conftest.er1
34251     cat conftest.er1 >&5
34252   fi
34253   rm -f conftest.er1 conftest.err
34254   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34255   test $ac_status = 0; }
34256 done
34257 
34258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34259 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34260 if ${ac_cv_cxx_compiler_gnu+:} false; then :
34261   $as_echo_n "(cached) " >&6
34262 else
34263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34264 /* end confdefs.h.  */
34265 
34266 int
34267 main ()
34268 {
34269 #ifndef __GNUC__
34270        choke me
34271 #endif
34272 
34273   ;
34274   return 0;
34275 }
34276 _ACEOF
34277 if ac_fn_cxx_try_compile "$LINENO"; then :
34278   ac_compiler_gnu=yes
34279 else
34280   ac_compiler_gnu=no
34281 fi
34282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34283 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34284 
34285 fi
34286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34287 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34288 if test $ac_compiler_gnu = yes; then
34289   GXX=yes
34290 else
34291   GXX=
34292 fi
34293 ac_test_CXXFLAGS=${CXXFLAGS+set}
34294 ac_save_CXXFLAGS=$CXXFLAGS
34295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34296 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
34297 if ${ac_cv_prog_cxx_g+:} false; then :
34298   $as_echo_n "(cached) " >&6
34299 else
34300   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34301    ac_cxx_werror_flag=yes
34302    ac_cv_prog_cxx_g=no
34303    CXXFLAGS="-g"
34304    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34305 /* end confdefs.h.  */
34306 
34307 int
34308 main ()
34309 {
34310 
34311   ;
34312   return 0;
34313 }
34314 _ACEOF
34315 if ac_fn_cxx_try_compile "$LINENO"; then :
34316   ac_cv_prog_cxx_g=yes
34317 else
34318   CXXFLAGS=""
34319       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34320 /* end confdefs.h.  */
34321 
34322 int
34323 main ()
34324 {
34325 
34326   ;
34327   return 0;
34328 }
34329 _ACEOF
34330 if ac_fn_cxx_try_compile "$LINENO"; then :
34331 
34332 else
34333   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34334          CXXFLAGS="-g"
34335          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34336 /* end confdefs.h.  */
34337 
34338 int
34339 main ()
34340 {
34341 
34342   ;
34343   return 0;
34344 }
34345 _ACEOF
34346 if ac_fn_cxx_try_compile "$LINENO"; then :
34347   ac_cv_prog_cxx_g=yes
34348 fi
34349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34350 fi
34351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34352 fi
34353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34354    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34355 fi
34356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34357 $as_echo "$ac_cv_prog_cxx_g" >&6; }
34358 if test "$ac_test_CXXFLAGS" = set; then
34359   CXXFLAGS=$ac_save_CXXFLAGS
34360 elif test $ac_cv_prog_cxx_g = yes; then
34361   if test "$GXX" = yes; then
34362     CXXFLAGS="-g -O2"
34363   else
34364     CXXFLAGS="-g"
34365   fi
34366 else
34367   if test "$GXX" = yes; then
34368     CXXFLAGS="-O2"
34369   else
34370     CXXFLAGS=
34371   fi
34372 fi
34373 ac_ext=cpp
34374 ac_cpp='$CXXCPP $CPPFLAGS'
34375 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34376 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34377 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34378 
34379 
34380   #
34381   # Setup the preprocessor (CPP and CXXCPP)
34382   #
34383   ac_ext=c
34384 ac_cpp='$CPP $CPPFLAGS'
34385 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34386 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34387 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34389 $as_echo_n "checking how to run the C preprocessor... " >&6; }
34390 # On Suns, sometimes $CPP names a directory.
34391 if test -n "$CPP" && test -d "$CPP"; then
34392   CPP=
34393 fi
34394 if test -z "$CPP"; then
34395   if ${ac_cv_prog_CPP+:} false; then :
34396   $as_echo_n "(cached) " >&6
34397 else
34398       # Double quotes because CPP needs to be expanded
34399     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34400     do
34401       ac_preproc_ok=false
34402 for ac_c_preproc_warn_flag in '' yes
34403 do
34404   # Use a header file that comes with gcc, so configuring glibc
34405   # with a fresh cross-compiler works.
34406   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34407   # <limits.h> exists even on freestanding compilers.
34408   # On the NeXT, cc -E runs the code through the compiler's parser,
34409   # not just through cpp. "Syntax error" is here to catch this case.
34410   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34411 /* end confdefs.h.  */
34412 #ifdef __STDC__
34413 # include <limits.h>
34414 #else
34415 # include <assert.h>
34416 #endif
34417                      Syntax error
34418 _ACEOF
34419 if ac_fn_c_try_cpp "$LINENO"; then :
34420 
34421 else
34422   # Broken: fails on valid input.
34423 continue
34424 fi
34425 rm -f conftest.err conftest.i conftest.$ac_ext
34426 
34427   # OK, works on sane cases.  Now check whether nonexistent headers
34428   # can be detected and how.
34429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34430 /* end confdefs.h.  */
34431 #include <ac_nonexistent.h>
34432 _ACEOF
34433 if ac_fn_c_try_cpp "$LINENO"; then :
34434   # Broken: success on invalid input.
34435 continue
34436 else
34437   # Passes both tests.
34438 ac_preproc_ok=:
34439 break
34440 fi
34441 rm -f conftest.err conftest.i conftest.$ac_ext
34442 
34443 done
34444 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34445 rm -f conftest.i conftest.err conftest.$ac_ext
34446 if $ac_preproc_ok; then :
34447   break
34448 fi
34449 
34450     done
34451     ac_cv_prog_CPP=$CPP
34452 
34453 fi
34454   CPP=$ac_cv_prog_CPP
34455 else
34456   ac_cv_prog_CPP=$CPP
34457 fi
34458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34459 $as_echo "$CPP" >&6; }
34460 ac_preproc_ok=false
34461 for ac_c_preproc_warn_flag in '' yes
34462 do
34463   # Use a header file that comes with gcc, so configuring glibc
34464   # with a fresh cross-compiler works.
34465   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34466   # <limits.h> exists even on freestanding compilers.
34467   # On the NeXT, cc -E runs the code through the compiler's parser,
34468   # not just through cpp. "Syntax error" is here to catch this case.
34469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34470 /* end confdefs.h.  */
34471 #ifdef __STDC__
34472 # include <limits.h>
34473 #else
34474 # include <assert.h>
34475 #endif
34476                      Syntax error
34477 _ACEOF
34478 if ac_fn_c_try_cpp "$LINENO"; then :
34479 
34480 else
34481   # Broken: fails on valid input.
34482 continue
34483 fi
34484 rm -f conftest.err conftest.i conftest.$ac_ext
34485 
34486   # OK, works on sane cases.  Now check whether nonexistent headers
34487   # can be detected and how.
34488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34489 /* end confdefs.h.  */
34490 #include <ac_nonexistent.h>
34491 _ACEOF
34492 if ac_fn_c_try_cpp "$LINENO"; then :
34493   # Broken: success on invalid input.
34494 continue
34495 else
34496   # Passes both tests.
34497 ac_preproc_ok=:
34498 break
34499 fi
34500 rm -f conftest.err conftest.i conftest.$ac_ext
34501 
34502 done
34503 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34504 rm -f conftest.i conftest.err conftest.$ac_ext
34505 if $ac_preproc_ok; then :
34506 
34507 else
34508   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34509 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34510 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34511 See \`config.log' for more details" "$LINENO" 5; }
34512 fi
34513 
34514 ac_ext=cpp
34515 ac_cpp='$CXXCPP $CPPFLAGS'
34516 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34517 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34518 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34519 
34520 
34521   # Only process if variable expands to non-empty
34522 
34523   if test "x$CPP" != x; then
34524     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34525 
34526   # First separate the path from the arguments. This will split at the first
34527   # space.
34528   complete="$CPP"
34529   path="${complete%% *}"
34530   tmp="$complete EOL"
34531   arguments="${tmp#* }"
34532 
34533   # Input might be given as Windows format, start by converting to
34534   # unix format.
34535   new_path=`$CYGPATH -u "$path"`
34536 
34537   # Now try to locate executable using which
34538   new_path=`$WHICH "$new_path" 2> /dev/null`
34539   # bat and cmd files are not always considered executable in cygwin causing which
34540   # to not find them
34541   if test "x$new_path" = x \
34542       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34543       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34544     new_path=`$CYGPATH -u "$path"`
34545   fi
34546   if test "x$new_path" = x; then
34547     # Oops. Which didn't find the executable.
34548     # The splitting of arguments from the executable at a space might have been incorrect,
34549     # since paths with space are more likely in Windows. Give it another try with the whole
34550     # argument.
34551     path="$complete"
34552     arguments="EOL"
34553     new_path=`$CYGPATH -u "$path"`
34554     new_path=`$WHICH "$new_path" 2> /dev/null`
34555     # bat and cmd files are not always considered executable in cygwin causing which
34556     # to not find them
34557     if test "x$new_path" = x \
34558         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34559         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34560       new_path=`$CYGPATH -u "$path"`
34561     fi
34562     if test "x$new_path" = x; then
34563       # It's still not found. Now this is an unrecoverable error.
34564       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34565 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34566       has_space=`$ECHO "$complete" | $GREP " "`
34567       if test "x$has_space" != x; then
34568         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34569 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34570       fi
34571       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34572     fi
34573   fi
34574 
34575   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34576   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34577   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34578   # "foo.exe" is OK but "foo" is an error.
34579   #
34580   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34581   # It is also a way to make sure we got the proper file name for the real test later on.
34582   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34583   if test "x$test_shortpath" = x; then
34584     # Short path failed, file does not exist as specified.
34585     # Try adding .exe or .cmd
34586     if test -f "${new_path}.exe"; then
34587       input_to_shortpath="${new_path}.exe"
34588     elif test -f "${new_path}.cmd"; then
34589       input_to_shortpath="${new_path}.cmd"
34590     else
34591       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34592 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34593       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34594 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34595       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34596     fi
34597   else
34598     input_to_shortpath="$new_path"
34599   fi
34600 
34601   # Call helper function which possibly converts this using DOS-style short mode.
34602   # If so, the updated path is stored in $new_path.
34603   new_path="$input_to_shortpath"
34604 
34605   input_path="$input_to_shortpath"
34606   # Check if we need to convert this using DOS-style short mode. If the path
34607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34608   # take no chances and rewrite it.
34609   # Note: m4 eats our [], so we need to use [ and ] instead.
34610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34611   if test "x$has_forbidden_chars" != x; then
34612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34613     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34614     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34615     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34616       # Going to short mode and back again did indeed matter. Since short mode is
34617       # case insensitive, let's make it lowercase to improve readability.
34618       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34619       # Now convert it back to Unix-style (cygpath)
34620       input_path=`$CYGPATH -u "$shortmode_path"`
34621       new_path="$input_path"
34622     fi
34623   fi
34624 
34625   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34626   if test "x$test_cygdrive_prefix" = x; then
34627     # As a simple fix, exclude /usr/bin since it's not a real path.
34628     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34629       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34630       # a path prefixed by /cygdrive for fixpath to work.
34631       new_path="$CYGWIN_ROOT_PATH$input_path"
34632     fi
34633   fi
34634 
34635   # remove trailing .exe if any
34636   new_path="${new_path/%.exe/}"
34637 
34638     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34639 
34640   # First separate the path from the arguments. This will split at the first
34641   # space.
34642   complete="$CPP"
34643   path="${complete%% *}"
34644   tmp="$complete EOL"
34645   arguments="${tmp#* }"
34646 
34647   # Input might be given as Windows format, start by converting to
34648   # unix format.
34649   new_path="$path"
34650 
34651   windows_path="$new_path"
34652   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34653     unix_path=`$CYGPATH -u "$windows_path"`
34654     new_path="$unix_path"
34655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34656     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34657     new_path="$unix_path"
34658   fi
34659 
34660 
34661   # Now try to locate executable using which
34662   new_path=`$WHICH "$new_path" 2> /dev/null`
34663 
34664   if test "x$new_path" = x; then
34665     # Oops. Which didn't find the executable.
34666     # The splitting of arguments from the executable at a space might have been incorrect,
34667     # since paths with space are more likely in Windows. Give it another try with the whole
34668     # argument.
34669     path="$complete"
34670     arguments="EOL"
34671     new_path="$path"
34672 
34673   windows_path="$new_path"
34674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34675     unix_path=`$CYGPATH -u "$windows_path"`
34676     new_path="$unix_path"
34677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34679     new_path="$unix_path"
34680   fi
34681 
34682 
34683     new_path=`$WHICH "$new_path" 2> /dev/null`
34684     # bat and cmd files are not always considered executable in MSYS causing which
34685     # to not find them
34686     if test "x$new_path" = x \
34687         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34688         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34689       new_path="$path"
34690 
34691   windows_path="$new_path"
34692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34693     unix_path=`$CYGPATH -u "$windows_path"`
34694     new_path="$unix_path"
34695   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34696     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34697     new_path="$unix_path"
34698   fi
34699 
34700     fi
34701 
34702     if test "x$new_path" = x; then
34703       # It's still not found. Now this is an unrecoverable error.
34704       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34705 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34706       has_space=`$ECHO "$complete" | $GREP " "`
34707       if test "x$has_space" != x; then
34708         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34709 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34710       fi
34711       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34712     fi
34713   fi
34714 
34715   # Now new_path has a complete unix path to the binary
34716   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34717     # Keep paths in /bin as-is, but remove trailing .exe if any
34718     new_path="${new_path/%.exe/}"
34719     # Do not save /bin paths to all_fixpath_prefixes!
34720   else
34721     # Not in mixed or Windows style, start by that.
34722     new_path=`cmd //c echo $new_path`
34723 
34724   input_path="$new_path"
34725   # Check if we need to convert this using DOS-style short mode. If the path
34726   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34727   # take no chances and rewrite it.
34728   # Note: m4 eats our [], so we need to use [ and ] instead.
34729   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34730   if test "x$has_forbidden_chars" != x; then
34731     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34732     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34733   fi
34734 
34735     # Output is in $new_path
34736 
34737   windows_path="$new_path"
34738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34739     unix_path=`$CYGPATH -u "$windows_path"`
34740     new_path="$unix_path"
34741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34742     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34743     new_path="$unix_path"
34744   fi
34745 
34746     # remove trailing .exe if any
34747     new_path="${new_path/%.exe/}"
34748 
34749     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34750     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34751   fi
34752 
34753     else
34754       # We're on a unix platform. Hooray! :)
34755       # First separate the path from the arguments. This will split at the first
34756       # space.
34757       complete="$CPP"
34758       path="${complete%% *}"
34759       tmp="$complete EOL"
34760       arguments="${tmp#* }"
34761 
34762       # Cannot rely on the command "which" here since it doesn't always work.
34763       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34764       if test -z "$is_absolute_path"; then
34765         # Path to executable is not absolute. Find it.
34766         IFS_save="$IFS"
34767         IFS=:
34768         for p in $PATH; do
34769           if test -f "$p/$path" && test -x "$p/$path"; then
34770             new_path="$p/$path"
34771             break
34772           fi
34773         done
34774         IFS="$IFS_save"
34775       else
34776         # This is an absolute path, we can use it without further modifications.
34777         new_path="$path"
34778       fi
34779 
34780       if test "x$new_path" = x; then
34781         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34782 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34783         has_space=`$ECHO "$complete" | $GREP " "`
34784         if test "x$has_space" != x; then
34785           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34786 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34787         fi
34788         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34789       fi
34790     fi
34791 
34792     # Now join together the path and the arguments once again
34793     if test "x$arguments" != xEOL; then
34794       new_complete="$new_path ${arguments% *}"
34795     else
34796       new_complete="$new_path"
34797     fi
34798 
34799     if test "x$complete" != "x$new_complete"; then
34800       CPP="$new_complete"
34801       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34802 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34803     fi
34804   fi
34805 
34806   ac_ext=cpp
34807 ac_cpp='$CXXCPP $CPPFLAGS'
34808 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34809 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34810 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34812 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34813 if test -z "$CXXCPP"; then
34814   if ${ac_cv_prog_CXXCPP+:} false; then :
34815   $as_echo_n "(cached) " >&6
34816 else
34817       # Double quotes because CXXCPP needs to be expanded
34818     for CXXCPP in "$CXX -E" "/lib/cpp"
34819     do
34820       ac_preproc_ok=false
34821 for ac_cxx_preproc_warn_flag in '' yes
34822 do
34823   # Use a header file that comes with gcc, so configuring glibc
34824   # with a fresh cross-compiler works.
34825   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34826   # <limits.h> exists even on freestanding compilers.
34827   # On the NeXT, cc -E runs the code through the compiler's parser,
34828   # not just through cpp. "Syntax error" is here to catch this case.
34829   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34830 /* end confdefs.h.  */
34831 #ifdef __STDC__
34832 # include <limits.h>
34833 #else
34834 # include <assert.h>
34835 #endif
34836                      Syntax error
34837 _ACEOF
34838 if ac_fn_cxx_try_cpp "$LINENO"; then :
34839 
34840 else
34841   # Broken: fails on valid input.
34842 continue
34843 fi
34844 rm -f conftest.err conftest.i conftest.$ac_ext
34845 
34846   # OK, works on sane cases.  Now check whether nonexistent headers
34847   # can be detected and how.
34848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34849 /* end confdefs.h.  */
34850 #include <ac_nonexistent.h>
34851 _ACEOF
34852 if ac_fn_cxx_try_cpp "$LINENO"; then :
34853   # Broken: success on invalid input.
34854 continue
34855 else
34856   # Passes both tests.
34857 ac_preproc_ok=:
34858 break
34859 fi
34860 rm -f conftest.err conftest.i conftest.$ac_ext
34861 
34862 done
34863 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34864 rm -f conftest.i conftest.err conftest.$ac_ext
34865 if $ac_preproc_ok; then :
34866   break
34867 fi
34868 
34869     done
34870     ac_cv_prog_CXXCPP=$CXXCPP
34871 
34872 fi
34873   CXXCPP=$ac_cv_prog_CXXCPP
34874 else
34875   ac_cv_prog_CXXCPP=$CXXCPP
34876 fi
34877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34878 $as_echo "$CXXCPP" >&6; }
34879 ac_preproc_ok=false
34880 for ac_cxx_preproc_warn_flag in '' yes
34881 do
34882   # Use a header file that comes with gcc, so configuring glibc
34883   # with a fresh cross-compiler works.
34884   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34885   # <limits.h> exists even on freestanding compilers.
34886   # On the NeXT, cc -E runs the code through the compiler's parser,
34887   # not just through cpp. "Syntax error" is here to catch this case.
34888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34889 /* end confdefs.h.  */
34890 #ifdef __STDC__
34891 # include <limits.h>
34892 #else
34893 # include <assert.h>
34894 #endif
34895                      Syntax error
34896 _ACEOF
34897 if ac_fn_cxx_try_cpp "$LINENO"; then :
34898 
34899 else
34900   # Broken: fails on valid input.
34901 continue
34902 fi
34903 rm -f conftest.err conftest.i conftest.$ac_ext
34904 
34905   # OK, works on sane cases.  Now check whether nonexistent headers
34906   # can be detected and how.
34907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34908 /* end confdefs.h.  */
34909 #include <ac_nonexistent.h>
34910 _ACEOF
34911 if ac_fn_cxx_try_cpp "$LINENO"; then :
34912   # Broken: success on invalid input.
34913 continue
34914 else
34915   # Passes both tests.
34916 ac_preproc_ok=:
34917 break
34918 fi
34919 rm -f conftest.err conftest.i conftest.$ac_ext
34920 
34921 done
34922 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34923 rm -f conftest.i conftest.err conftest.$ac_ext
34924 if $ac_preproc_ok; then :
34925 
34926 else
34927   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34928 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34929 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34930 See \`config.log' for more details" "$LINENO" 5; }
34931 fi
34932 
34933 ac_ext=cpp
34934 ac_cpp='$CXXCPP $CPPFLAGS'
34935 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34936 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34937 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34938 
34939 
34940   # Only process if variable expands to non-empty
34941 
34942   if test "x$CXXCPP" != x; then
34943     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34944 
34945   # First separate the path from the arguments. This will split at the first
34946   # space.
34947   complete="$CXXCPP"
34948   path="${complete%% *}"
34949   tmp="$complete EOL"
34950   arguments="${tmp#* }"
34951 
34952   # Input might be given as Windows format, start by converting to
34953   # unix format.
34954   new_path=`$CYGPATH -u "$path"`
34955 
34956   # Now try to locate executable using which
34957   new_path=`$WHICH "$new_path" 2> /dev/null`
34958   # bat and cmd files are not always considered executable in cygwin causing which
34959   # to not find them
34960   if test "x$new_path" = x \
34961       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34962       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34963     new_path=`$CYGPATH -u "$path"`
34964   fi
34965   if test "x$new_path" = x; then
34966     # Oops. Which didn't find the executable.
34967     # The splitting of arguments from the executable at a space might have been incorrect,
34968     # since paths with space are more likely in Windows. Give it another try with the whole
34969     # argument.
34970     path="$complete"
34971     arguments="EOL"
34972     new_path=`$CYGPATH -u "$path"`
34973     new_path=`$WHICH "$new_path" 2> /dev/null`
34974     # bat and cmd files are not always considered executable in cygwin causing which
34975     # to not find them
34976     if test "x$new_path" = x \
34977         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34978         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34979       new_path=`$CYGPATH -u "$path"`
34980     fi
34981     if test "x$new_path" = x; then
34982       # It's still not found. Now this is an unrecoverable error.
34983       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34984 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34985       has_space=`$ECHO "$complete" | $GREP " "`
34986       if test "x$has_space" != x; then
34987         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34988 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34989       fi
34990       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34991     fi
34992   fi
34993 
34994   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34995   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34996   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34997   # "foo.exe" is OK but "foo" is an error.
34998   #
34999   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35000   # It is also a way to make sure we got the proper file name for the real test later on.
35001   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35002   if test "x$test_shortpath" = x; then
35003     # Short path failed, file does not exist as specified.
35004     # Try adding .exe or .cmd
35005     if test -f "${new_path}.exe"; then
35006       input_to_shortpath="${new_path}.exe"
35007     elif test -f "${new_path}.cmd"; then
35008       input_to_shortpath="${new_path}.cmd"
35009     else
35010       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35011 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35012       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35013 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35014       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35015     fi
35016   else
35017     input_to_shortpath="$new_path"
35018   fi
35019 
35020   # Call helper function which possibly converts this using DOS-style short mode.
35021   # If so, the updated path is stored in $new_path.
35022   new_path="$input_to_shortpath"
35023 
35024   input_path="$input_to_shortpath"
35025   # Check if we need to convert this using DOS-style short mode. If the path
35026   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35027   # take no chances and rewrite it.
35028   # Note: m4 eats our [], so we need to use [ and ] instead.
35029   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35030   if test "x$has_forbidden_chars" != x; then
35031     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35032     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35033     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35034     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35035       # Going to short mode and back again did indeed matter. Since short mode is
35036       # case insensitive, let's make it lowercase to improve readability.
35037       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35038       # Now convert it back to Unix-style (cygpath)
35039       input_path=`$CYGPATH -u "$shortmode_path"`
35040       new_path="$input_path"
35041     fi
35042   fi
35043 
35044   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35045   if test "x$test_cygdrive_prefix" = x; then
35046     # As a simple fix, exclude /usr/bin since it's not a real path.
35047     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35048       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35049       # a path prefixed by /cygdrive for fixpath to work.
35050       new_path="$CYGWIN_ROOT_PATH$input_path"
35051     fi
35052   fi
35053 
35054   # remove trailing .exe if any
35055   new_path="${new_path/%.exe/}"
35056 
35057     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35058 
35059   # First separate the path from the arguments. This will split at the first
35060   # space.
35061   complete="$CXXCPP"
35062   path="${complete%% *}"
35063   tmp="$complete EOL"
35064   arguments="${tmp#* }"
35065 
35066   # Input might be given as Windows format, start by converting to
35067   # unix format.
35068   new_path="$path"
35069 
35070   windows_path="$new_path"
35071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35072     unix_path=`$CYGPATH -u "$windows_path"`
35073     new_path="$unix_path"
35074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35076     new_path="$unix_path"
35077   fi
35078 
35079 
35080   # Now try to locate executable using which
35081   new_path=`$WHICH "$new_path" 2> /dev/null`
35082 
35083   if test "x$new_path" = x; then
35084     # Oops. Which didn't find the executable.
35085     # The splitting of arguments from the executable at a space might have been incorrect,
35086     # since paths with space are more likely in Windows. Give it another try with the whole
35087     # argument.
35088     path="$complete"
35089     arguments="EOL"
35090     new_path="$path"
35091 
35092   windows_path="$new_path"
35093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35094     unix_path=`$CYGPATH -u "$windows_path"`
35095     new_path="$unix_path"
35096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35097     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35098     new_path="$unix_path"
35099   fi
35100 
35101 
35102     new_path=`$WHICH "$new_path" 2> /dev/null`
35103     # bat and cmd files are not always considered executable in MSYS causing which
35104     # to not find them
35105     if test "x$new_path" = x \
35106         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35107         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35108       new_path="$path"
35109 
35110   windows_path="$new_path"
35111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35112     unix_path=`$CYGPATH -u "$windows_path"`
35113     new_path="$unix_path"
35114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35115     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35116     new_path="$unix_path"
35117   fi
35118 
35119     fi
35120 
35121     if test "x$new_path" = x; then
35122       # It's still not found. Now this is an unrecoverable error.
35123       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35124 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35125       has_space=`$ECHO "$complete" | $GREP " "`
35126       if test "x$has_space" != x; then
35127         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35128 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35129       fi
35130       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35131     fi
35132   fi
35133 
35134   # Now new_path has a complete unix path to the binary
35135   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35136     # Keep paths in /bin as-is, but remove trailing .exe if any
35137     new_path="${new_path/%.exe/}"
35138     # Do not save /bin paths to all_fixpath_prefixes!
35139   else
35140     # Not in mixed or Windows style, start by that.
35141     new_path=`cmd //c echo $new_path`
35142 
35143   input_path="$new_path"
35144   # Check if we need to convert this using DOS-style short mode. If the path
35145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35146   # take no chances and rewrite it.
35147   # Note: m4 eats our [], so we need to use [ and ] instead.
35148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35149   if test "x$has_forbidden_chars" != x; then
35150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35151     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35152   fi
35153 
35154     # Output is in $new_path
35155 
35156   windows_path="$new_path"
35157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35158     unix_path=`$CYGPATH -u "$windows_path"`
35159     new_path="$unix_path"
35160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35161     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35162     new_path="$unix_path"
35163   fi
35164 
35165     # remove trailing .exe if any
35166     new_path="${new_path/%.exe/}"
35167 
35168     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35169     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35170   fi
35171 
35172     else
35173       # We're on a unix platform. Hooray! :)
35174       # First separate the path from the arguments. This will split at the first
35175       # space.
35176       complete="$CXXCPP"
35177       path="${complete%% *}"
35178       tmp="$complete EOL"
35179       arguments="${tmp#* }"
35180 
35181       # Cannot rely on the command "which" here since it doesn't always work.
35182       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35183       if test -z "$is_absolute_path"; then
35184         # Path to executable is not absolute. Find it.
35185         IFS_save="$IFS"
35186         IFS=:
35187         for p in $PATH; do
35188           if test -f "$p/$path" && test -x "$p/$path"; then
35189             new_path="$p/$path"
35190             break
35191           fi
35192         done
35193         IFS="$IFS_save"
35194       else
35195         # This is an absolute path, we can use it without further modifications.
35196         new_path="$path"
35197       fi
35198 
35199       if test "x$new_path" = x; then
35200         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35201 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35202         has_space=`$ECHO "$complete" | $GREP " "`
35203         if test "x$has_space" != x; then
35204           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35205 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35206         fi
35207         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35208       fi
35209     fi
35210 
35211     # Now join together the path and the arguments once again
35212     if test "x$arguments" != xEOL; then
35213       new_complete="$new_path ${arguments% *}"
35214     else
35215       new_complete="$new_path"
35216     fi
35217 
35218     if test "x$complete" != "x$new_complete"; then
35219       CXXCPP="$new_complete"
35220       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35221 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35222     fi
35223   fi
35224 
35225 
35226   #
35227   # Setup the linker (LD)
35228   #
35229   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35230     # In the Microsoft toolchain we have a separate LD command "link".
35231     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35232     # a cygwin program for something completely different.
35233     # Extract the first word of "link", so it can be a program name with args.
35234 set dummy link; ac_word=$2
35235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35236 $as_echo_n "checking for $ac_word... " >&6; }
35237 if ${ac_cv_prog_LD+:} false; then :
35238   $as_echo_n "(cached) " >&6
35239 else
35240   if test -n "$LD"; then
35241   ac_cv_prog_LD="$LD" # Let the user override the test.
35242 else
35243   ac_prog_rejected=no
35244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35245 for as_dir in $PATH
35246 do
35247   IFS=$as_save_IFS
35248   test -z "$as_dir" && as_dir=.
35249     for ac_exec_ext in '' $ac_executable_extensions; do
35250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35251     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35252        ac_prog_rejected=yes
35253        continue
35254      fi
35255     ac_cv_prog_LD="link"
35256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35257     break 2
35258   fi
35259 done
35260   done
35261 IFS=$as_save_IFS
35262 
35263 if test $ac_prog_rejected = yes; then
35264   # We found a bogon in the path, so make sure we never use it.
35265   set dummy $ac_cv_prog_LD
35266   shift
35267   if test $# != 0; then
35268     # We chose a different compiler from the bogus one.
35269     # However, it has the same basename, so the bogon will be chosen
35270     # first if we set LD to just the basename; use the full file name.
35271     shift
35272     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35273   fi
35274 fi
35275 fi
35276 fi
35277 LD=$ac_cv_prog_LD
35278 if test -n "$LD"; then
35279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35280 $as_echo "$LD" >&6; }
35281 else
35282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35283 $as_echo "no" >&6; }
35284 fi
35285 
35286 
35287 
35288   # Only process if variable expands to non-empty
35289 
35290   if test "x$LD" != x; then
35291     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35292 
35293   # First separate the path from the arguments. This will split at the first
35294   # space.
35295   complete="$LD"
35296   path="${complete%% *}"
35297   tmp="$complete EOL"
35298   arguments="${tmp#* }"
35299 
35300   # Input might be given as Windows format, start by converting to
35301   # unix format.
35302   new_path=`$CYGPATH -u "$path"`
35303 
35304   # Now try to locate executable using which
35305   new_path=`$WHICH "$new_path" 2> /dev/null`
35306   # bat and cmd files are not always considered executable in cygwin causing which
35307   # to not find them
35308   if test "x$new_path" = x \
35309       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35310       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35311     new_path=`$CYGPATH -u "$path"`
35312   fi
35313   if test "x$new_path" = x; then
35314     # Oops. Which didn't find the executable.
35315     # The splitting of arguments from the executable at a space might have been incorrect,
35316     # since paths with space are more likely in Windows. Give it another try with the whole
35317     # argument.
35318     path="$complete"
35319     arguments="EOL"
35320     new_path=`$CYGPATH -u "$path"`
35321     new_path=`$WHICH "$new_path" 2> /dev/null`
35322     # bat and cmd files are not always considered executable in cygwin causing which
35323     # to not find them
35324     if test "x$new_path" = x \
35325         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35326         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35327       new_path=`$CYGPATH -u "$path"`
35328     fi
35329     if test "x$new_path" = x; then
35330       # It's still not found. Now this is an unrecoverable error.
35331       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35332 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35333       has_space=`$ECHO "$complete" | $GREP " "`
35334       if test "x$has_space" != x; then
35335         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35336 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35337       fi
35338       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35339     fi
35340   fi
35341 
35342   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35343   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35344   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35345   # "foo.exe" is OK but "foo" is an error.
35346   #
35347   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35348   # It is also a way to make sure we got the proper file name for the real test later on.
35349   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35350   if test "x$test_shortpath" = x; then
35351     # Short path failed, file does not exist as specified.
35352     # Try adding .exe or .cmd
35353     if test -f "${new_path}.exe"; then
35354       input_to_shortpath="${new_path}.exe"
35355     elif test -f "${new_path}.cmd"; then
35356       input_to_shortpath="${new_path}.cmd"
35357     else
35358       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35359 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35360       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35361 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35362       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35363     fi
35364   else
35365     input_to_shortpath="$new_path"
35366   fi
35367 
35368   # Call helper function which possibly converts this using DOS-style short mode.
35369   # If so, the updated path is stored in $new_path.
35370   new_path="$input_to_shortpath"
35371 
35372   input_path="$input_to_shortpath"
35373   # Check if we need to convert this using DOS-style short mode. If the path
35374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35375   # take no chances and rewrite it.
35376   # Note: m4 eats our [], so we need to use [ and ] instead.
35377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35378   if test "x$has_forbidden_chars" != x; then
35379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35380     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35381     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35382     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35383       # Going to short mode and back again did indeed matter. Since short mode is
35384       # case insensitive, let's make it lowercase to improve readability.
35385       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35386       # Now convert it back to Unix-style (cygpath)
35387       input_path=`$CYGPATH -u "$shortmode_path"`
35388       new_path="$input_path"
35389     fi
35390   fi
35391 
35392   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35393   if test "x$test_cygdrive_prefix" = x; then
35394     # As a simple fix, exclude /usr/bin since it's not a real path.
35395     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35396       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35397       # a path prefixed by /cygdrive for fixpath to work.
35398       new_path="$CYGWIN_ROOT_PATH$input_path"
35399     fi
35400   fi
35401 
35402   # remove trailing .exe if any
35403   new_path="${new_path/%.exe/}"
35404 
35405     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35406 
35407   # First separate the path from the arguments. This will split at the first
35408   # space.
35409   complete="$LD"
35410   path="${complete%% *}"
35411   tmp="$complete EOL"
35412   arguments="${tmp#* }"
35413 
35414   # Input might be given as Windows format, start by converting to
35415   # unix format.
35416   new_path="$path"
35417 
35418   windows_path="$new_path"
35419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35420     unix_path=`$CYGPATH -u "$windows_path"`
35421     new_path="$unix_path"
35422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35424     new_path="$unix_path"
35425   fi
35426 
35427 
35428   # Now try to locate executable using which
35429   new_path=`$WHICH "$new_path" 2> /dev/null`
35430 
35431   if test "x$new_path" = x; then
35432     # Oops. Which didn't find the executable.
35433     # The splitting of arguments from the executable at a space might have been incorrect,
35434     # since paths with space are more likely in Windows. Give it another try with the whole
35435     # argument.
35436     path="$complete"
35437     arguments="EOL"
35438     new_path="$path"
35439 
35440   windows_path="$new_path"
35441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35442     unix_path=`$CYGPATH -u "$windows_path"`
35443     new_path="$unix_path"
35444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35445     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35446     new_path="$unix_path"
35447   fi
35448 
35449 
35450     new_path=`$WHICH "$new_path" 2> /dev/null`
35451     # bat and cmd files are not always considered executable in MSYS causing which
35452     # to not find them
35453     if test "x$new_path" = x \
35454         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35455         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35456       new_path="$path"
35457 
35458   windows_path="$new_path"
35459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35460     unix_path=`$CYGPATH -u "$windows_path"`
35461     new_path="$unix_path"
35462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35464     new_path="$unix_path"
35465   fi
35466 
35467     fi
35468 
35469     if test "x$new_path" = x; then
35470       # It's still not found. Now this is an unrecoverable error.
35471       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35472 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35473       has_space=`$ECHO "$complete" | $GREP " "`
35474       if test "x$has_space" != x; then
35475         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35476 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35477       fi
35478       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35479     fi
35480   fi
35481 
35482   # Now new_path has a complete unix path to the binary
35483   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35484     # Keep paths in /bin as-is, but remove trailing .exe if any
35485     new_path="${new_path/%.exe/}"
35486     # Do not save /bin paths to all_fixpath_prefixes!
35487   else
35488     # Not in mixed or Windows style, start by that.
35489     new_path=`cmd //c echo $new_path`
35490 
35491   input_path="$new_path"
35492   # Check if we need to convert this using DOS-style short mode. If the path
35493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35494   # take no chances and rewrite it.
35495   # Note: m4 eats our [], so we need to use [ and ] instead.
35496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35497   if test "x$has_forbidden_chars" != x; then
35498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35499     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35500   fi
35501 
35502     # Output is in $new_path
35503 
35504   windows_path="$new_path"
35505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35506     unix_path=`$CYGPATH -u "$windows_path"`
35507     new_path="$unix_path"
35508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35510     new_path="$unix_path"
35511   fi
35512 
35513     # remove trailing .exe if any
35514     new_path="${new_path/%.exe/}"
35515 
35516     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35517     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35518   fi
35519 
35520     else
35521       # We're on a unix platform. Hooray! :)
35522       # First separate the path from the arguments. This will split at the first
35523       # space.
35524       complete="$LD"
35525       path="${complete%% *}"
35526       tmp="$complete EOL"
35527       arguments="${tmp#* }"
35528 
35529       # Cannot rely on the command "which" here since it doesn't always work.
35530       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35531       if test -z "$is_absolute_path"; then
35532         # Path to executable is not absolute. Find it.
35533         IFS_save="$IFS"
35534         IFS=:
35535         for p in $PATH; do
35536           if test -f "$p/$path" && test -x "$p/$path"; then
35537             new_path="$p/$path"
35538             break
35539           fi
35540         done
35541         IFS="$IFS_save"
35542       else
35543         # This is an absolute path, we can use it without further modifications.
35544         new_path="$path"
35545       fi
35546 
35547       if test "x$new_path" = x; then
35548         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35549 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35550         has_space=`$ECHO "$complete" | $GREP " "`
35551         if test "x$has_space" != x; then
35552           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35553 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35554         fi
35555         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35556       fi
35557     fi
35558 
35559     # Now join together the path and the arguments once again
35560     if test "x$arguments" != xEOL; then
35561       new_complete="$new_path ${arguments% *}"
35562     else
35563       new_complete="$new_path"
35564     fi
35565 
35566     if test "x$complete" != "x$new_complete"; then
35567       LD="$new_complete"
35568       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35569 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35570     fi
35571   fi
35572 
35573     # Verify that we indeed succeeded with this trick.
35574     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35575 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35576     "$LD" --version > /dev/null
35577     if test $? -eq 0 ; then
35578       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35579 $as_echo "no" >&6; }
35580       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35581     else
35582       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35583 $as_echo "yes" >&6; }
35584     fi
35585     LDCXX="$LD"
35586   else
35587     # All other toolchains use the compiler to link.
35588     LD="$CC"
35589     LDCXX="$CXX"
35590   fi
35591 
35592   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35593 
35594 
35595   #
35596   # Setup the assembler (AS)
35597   #
35598   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35599     # FIXME: should this really be solaris, or solstudio?
35600 
35601 
35602   # Publish this variable in the help.
35603 
35604 
35605   if [ -z "${AS+x}" ]; then
35606     # The variable is not set by user, try to locate tool using the code snippet
35607     for ac_prog in as
35608 do
35609   # Extract the first word of "$ac_prog", so it can be a program name with args.
35610 set dummy $ac_prog; ac_word=$2
35611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35612 $as_echo_n "checking for $ac_word... " >&6; }
35613 if ${ac_cv_path_AS+:} false; then :
35614   $as_echo_n "(cached) " >&6
35615 else
35616   case $AS in
35617   [\\/]* | ?:[\\/]*)
35618   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35619   ;;
35620   *)
35621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35622 for as_dir in $PATH
35623 do
35624   IFS=$as_save_IFS
35625   test -z "$as_dir" && as_dir=.
35626     for ac_exec_ext in '' $ac_executable_extensions; do
35627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35628     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35630     break 2
35631   fi
35632 done
35633   done
35634 IFS=$as_save_IFS
35635 
35636   ;;
35637 esac
35638 fi
35639 AS=$ac_cv_path_AS
35640 if test -n "$AS"; then
35641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35642 $as_echo "$AS" >&6; }
35643 else
35644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35645 $as_echo "no" >&6; }
35646 fi
35647 
35648 
35649   test -n "$AS" && break
35650 done
35651 
35652   else
35653     # The variable is set, but is it from the command line or the environment?
35654 
35655     # Try to remove the string !AS! from our list.
35656     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35657     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35658       # If it failed, the variable was not from the command line. Ignore it,
35659       # but warn the user (except for BASH, which is always set by the calling BASH).
35660       if test "xAS" != xBASH; then
35661         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35662 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35663       fi
35664       # Try to locate tool using the code snippet
35665       for ac_prog in as
35666 do
35667   # Extract the first word of "$ac_prog", so it can be a program name with args.
35668 set dummy $ac_prog; ac_word=$2
35669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35670 $as_echo_n "checking for $ac_word... " >&6; }
35671 if ${ac_cv_path_AS+:} false; then :
35672   $as_echo_n "(cached) " >&6
35673 else
35674   case $AS in
35675   [\\/]* | ?:[\\/]*)
35676   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35677   ;;
35678   *)
35679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35680 for as_dir in $PATH
35681 do
35682   IFS=$as_save_IFS
35683   test -z "$as_dir" && as_dir=.
35684     for ac_exec_ext in '' $ac_executable_extensions; do
35685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35686     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35688     break 2
35689   fi
35690 done
35691   done
35692 IFS=$as_save_IFS
35693 
35694   ;;
35695 esac
35696 fi
35697 AS=$ac_cv_path_AS
35698 if test -n "$AS"; then
35699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35700 $as_echo "$AS" >&6; }
35701 else
35702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35703 $as_echo "no" >&6; }
35704 fi
35705 
35706 
35707   test -n "$AS" && break
35708 done
35709 
35710     else
35711       # If it succeeded, then it was overridden by the user. We will use it
35712       # for the tool.
35713 
35714       # First remove it from the list of overridden variables, so we can test
35715       # for unknown variables in the end.
35716       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35717 
35718       # Check if we try to supply an empty value
35719       if test "x$AS" = x; then
35720         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35721 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35722         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35723 $as_echo_n "checking for AS... " >&6; }
35724         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35725 $as_echo "disabled" >&6; }
35726       else
35727         # Check if the provided tool contains a complete path.
35728         tool_specified="$AS"
35729         tool_basename="${tool_specified##*/}"
35730         if test "x$tool_basename" = "x$tool_specified"; then
35731           # A command without a complete path is provided, search $PATH.
35732           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35733 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35734           # Extract the first word of "$tool_basename", so it can be a program name with args.
35735 set dummy $tool_basename; ac_word=$2
35736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35737 $as_echo_n "checking for $ac_word... " >&6; }
35738 if ${ac_cv_path_AS+:} false; then :
35739   $as_echo_n "(cached) " >&6
35740 else
35741   case $AS in
35742   [\\/]* | ?:[\\/]*)
35743   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35744   ;;
35745   *)
35746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35747 for as_dir in $PATH
35748 do
35749   IFS=$as_save_IFS
35750   test -z "$as_dir" && as_dir=.
35751     for ac_exec_ext in '' $ac_executable_extensions; do
35752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35753     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35755     break 2
35756   fi
35757 done
35758   done
35759 IFS=$as_save_IFS
35760 
35761   ;;
35762 esac
35763 fi
35764 AS=$ac_cv_path_AS
35765 if test -n "$AS"; then
35766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35767 $as_echo "$AS" >&6; }
35768 else
35769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35770 $as_echo "no" >&6; }
35771 fi
35772 
35773 
35774           if test "x$AS" = x; then
35775             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35776           fi
35777         else
35778           # Otherwise we believe it is a complete path. Use it as it is.
35779           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35780 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35781           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35782 $as_echo_n "checking for AS... " >&6; }
35783           if test ! -x "$tool_specified"; then
35784             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35785 $as_echo "not found" >&6; }
35786             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35787           fi
35788           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35789 $as_echo "$tool_specified" >&6; }
35790         fi
35791       fi
35792     fi
35793 
35794   fi
35795 
35796 
35797 
35798   # Only process if variable expands to non-empty
35799 
35800   if test "x$AS" != x; then
35801     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35802 
35803   # First separate the path from the arguments. This will split at the first
35804   # space.
35805   complete="$AS"
35806   path="${complete%% *}"
35807   tmp="$complete EOL"
35808   arguments="${tmp#* }"
35809 
35810   # Input might be given as Windows format, start by converting to
35811   # unix format.
35812   new_path=`$CYGPATH -u "$path"`
35813 
35814   # Now try to locate executable using which
35815   new_path=`$WHICH "$new_path" 2> /dev/null`
35816   # bat and cmd files are not always considered executable in cygwin causing which
35817   # to not find them
35818   if test "x$new_path" = x \
35819       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35820       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35821     new_path=`$CYGPATH -u "$path"`
35822   fi
35823   if test "x$new_path" = x; then
35824     # Oops. Which didn't find the executable.
35825     # The splitting of arguments from the executable at a space might have been incorrect,
35826     # since paths with space are more likely in Windows. Give it another try with the whole
35827     # argument.
35828     path="$complete"
35829     arguments="EOL"
35830     new_path=`$CYGPATH -u "$path"`
35831     new_path=`$WHICH "$new_path" 2> /dev/null`
35832     # bat and cmd files are not always considered executable in cygwin causing which
35833     # to not find them
35834     if test "x$new_path" = x \
35835         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35836         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35837       new_path=`$CYGPATH -u "$path"`
35838     fi
35839     if test "x$new_path" = x; then
35840       # It's still not found. Now this is an unrecoverable error.
35841       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35842 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35843       has_space=`$ECHO "$complete" | $GREP " "`
35844       if test "x$has_space" != x; then
35845         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35846 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35847       fi
35848       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35849     fi
35850   fi
35851 
35852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35855   # "foo.exe" is OK but "foo" is an error.
35856   #
35857   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35858   # It is also a way to make sure we got the proper file name for the real test later on.
35859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35860   if test "x$test_shortpath" = x; then
35861     # Short path failed, file does not exist as specified.
35862     # Try adding .exe or .cmd
35863     if test -f "${new_path}.exe"; then
35864       input_to_shortpath="${new_path}.exe"
35865     elif test -f "${new_path}.cmd"; then
35866       input_to_shortpath="${new_path}.cmd"
35867     else
35868       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35869 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35870       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35871 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35872       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35873     fi
35874   else
35875     input_to_shortpath="$new_path"
35876   fi
35877 
35878   # Call helper function which possibly converts this using DOS-style short mode.
35879   # If so, the updated path is stored in $new_path.
35880   new_path="$input_to_shortpath"
35881 
35882   input_path="$input_to_shortpath"
35883   # Check if we need to convert this using DOS-style short mode. If the path
35884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35885   # take no chances and rewrite it.
35886   # Note: m4 eats our [], so we need to use [ and ] instead.
35887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35888   if test "x$has_forbidden_chars" != x; then
35889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35890     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35891     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35892     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35893       # Going to short mode and back again did indeed matter. Since short mode is
35894       # case insensitive, let's make it lowercase to improve readability.
35895       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35896       # Now convert it back to Unix-style (cygpath)
35897       input_path=`$CYGPATH -u "$shortmode_path"`
35898       new_path="$input_path"
35899     fi
35900   fi
35901 
35902   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35903   if test "x$test_cygdrive_prefix" = x; then
35904     # As a simple fix, exclude /usr/bin since it's not a real path.
35905     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35906       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35907       # a path prefixed by /cygdrive for fixpath to work.
35908       new_path="$CYGWIN_ROOT_PATH$input_path"
35909     fi
35910   fi
35911 
35912   # remove trailing .exe if any
35913   new_path="${new_path/%.exe/}"
35914 
35915     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35916 
35917   # First separate the path from the arguments. This will split at the first
35918   # space.
35919   complete="$AS"
35920   path="${complete%% *}"
35921   tmp="$complete EOL"
35922   arguments="${tmp#* }"
35923 
35924   # Input might be given as Windows format, start by converting to
35925   # unix format.
35926   new_path="$path"
35927 
35928   windows_path="$new_path"
35929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35930     unix_path=`$CYGPATH -u "$windows_path"`
35931     new_path="$unix_path"
35932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35934     new_path="$unix_path"
35935   fi
35936 
35937 
35938   # Now try to locate executable using which
35939   new_path=`$WHICH "$new_path" 2> /dev/null`
35940 
35941   if test "x$new_path" = x; then
35942     # Oops. Which didn't find the executable.
35943     # The splitting of arguments from the executable at a space might have been incorrect,
35944     # since paths with space are more likely in Windows. Give it another try with the whole
35945     # argument.
35946     path="$complete"
35947     arguments="EOL"
35948     new_path="$path"
35949 
35950   windows_path="$new_path"
35951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35952     unix_path=`$CYGPATH -u "$windows_path"`
35953     new_path="$unix_path"
35954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35956     new_path="$unix_path"
35957   fi
35958 
35959 
35960     new_path=`$WHICH "$new_path" 2> /dev/null`
35961     # bat and cmd files are not always considered executable in MSYS causing which
35962     # to not find them
35963     if test "x$new_path" = x \
35964         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35965         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35966       new_path="$path"
35967 
35968   windows_path="$new_path"
35969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35970     unix_path=`$CYGPATH -u "$windows_path"`
35971     new_path="$unix_path"
35972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35974     new_path="$unix_path"
35975   fi
35976 
35977     fi
35978 
35979     if test "x$new_path" = x; then
35980       # It's still not found. Now this is an unrecoverable error.
35981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35982 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35983       has_space=`$ECHO "$complete" | $GREP " "`
35984       if test "x$has_space" != x; then
35985         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35986 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35987       fi
35988       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35989     fi
35990   fi
35991 
35992   # Now new_path has a complete unix path to the binary
35993   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35994     # Keep paths in /bin as-is, but remove trailing .exe if any
35995     new_path="${new_path/%.exe/}"
35996     # Do not save /bin paths to all_fixpath_prefixes!
35997   else
35998     # Not in mixed or Windows style, start by that.
35999     new_path=`cmd //c echo $new_path`
36000 
36001   input_path="$new_path"
36002   # Check if we need to convert this using DOS-style short mode. If the path
36003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36004   # take no chances and rewrite it.
36005   # Note: m4 eats our [], so we need to use [ and ] instead.
36006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36007   if test "x$has_forbidden_chars" != x; then
36008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36009     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36010   fi
36011 
36012     # Output is in $new_path
36013 
36014   windows_path="$new_path"
36015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36016     unix_path=`$CYGPATH -u "$windows_path"`
36017     new_path="$unix_path"
36018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36020     new_path="$unix_path"
36021   fi
36022 
36023     # remove trailing .exe if any
36024     new_path="${new_path/%.exe/}"
36025 
36026     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36027     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36028   fi
36029 
36030     else
36031       # We're on a unix platform. Hooray! :)
36032       # First separate the path from the arguments. This will split at the first
36033       # space.
36034       complete="$AS"
36035       path="${complete%% *}"
36036       tmp="$complete EOL"
36037       arguments="${tmp#* }"
36038 
36039       # Cannot rely on the command "which" here since it doesn't always work.
36040       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36041       if test -z "$is_absolute_path"; then
36042         # Path to executable is not absolute. Find it.
36043         IFS_save="$IFS"
36044         IFS=:
36045         for p in $PATH; do
36046           if test -f "$p/$path" && test -x "$p/$path"; then
36047             new_path="$p/$path"
36048             break
36049           fi
36050         done
36051         IFS="$IFS_save"
36052       else
36053         # This is an absolute path, we can use it without further modifications.
36054         new_path="$path"
36055       fi
36056 
36057       if test "x$new_path" = x; then
36058         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36059 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36060         has_space=`$ECHO "$complete" | $GREP " "`
36061         if test "x$has_space" != x; then
36062           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36063 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36064         fi
36065         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36066       fi
36067     fi
36068 
36069     # Now join together the path and the arguments once again
36070     if test "x$arguments" != xEOL; then
36071       new_complete="$new_path ${arguments% *}"
36072     else
36073       new_complete="$new_path"
36074     fi
36075 
36076     if test "x$complete" != "x$new_complete"; then
36077       AS="$new_complete"
36078       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36079 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36080     fi
36081   fi
36082 
36083   else
36084     # FIXME: is this correct for microsoft?
36085     AS="$CC -c"
36086   fi
36087 
36088 
36089   #
36090   # Setup the archiver (AR)
36091   #
36092   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36093     # The corresponding ar tool is lib.exe (used to create static libraries)
36094     # Extract the first word of "lib", so it can be a program name with args.
36095 set dummy lib; ac_word=$2
36096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36097 $as_echo_n "checking for $ac_word... " >&6; }
36098 if ${ac_cv_prog_AR+:} false; then :
36099   $as_echo_n "(cached) " >&6
36100 else
36101   if test -n "$AR"; then
36102   ac_cv_prog_AR="$AR" # Let the user override the test.
36103 else
36104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36105 for as_dir in $PATH
36106 do
36107   IFS=$as_save_IFS
36108   test -z "$as_dir" && as_dir=.
36109     for ac_exec_ext in '' $ac_executable_extensions; do
36110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36111     ac_cv_prog_AR="lib"
36112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36113     break 2
36114   fi
36115 done
36116   done
36117 IFS=$as_save_IFS
36118 
36119 fi
36120 fi
36121 AR=$ac_cv_prog_AR
36122 if test -n "$AR"; then
36123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36124 $as_echo "$AR" >&6; }
36125 else
36126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36127 $as_echo "no" >&6; }
36128 fi
36129 
36130 
36131   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36132 
36133 
36134   # Publish this variable in the help.
36135 
36136 
36137   if [ -z "${AR+x}" ]; then
36138     # The variable is not set by user, try to locate tool using the code snippet
36139     if test -n "$ac_tool_prefix"; then
36140   for ac_prog in ar gcc-ar
36141   do
36142     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36143 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36145 $as_echo_n "checking for $ac_word... " >&6; }
36146 if ${ac_cv_prog_AR+:} false; then :
36147   $as_echo_n "(cached) " >&6
36148 else
36149   if test -n "$AR"; then
36150   ac_cv_prog_AR="$AR" # Let the user override the test.
36151 else
36152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36153 for as_dir in $PATH
36154 do
36155   IFS=$as_save_IFS
36156   test -z "$as_dir" && as_dir=.
36157     for ac_exec_ext in '' $ac_executable_extensions; do
36158   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36159     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36160     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36161     break 2
36162   fi
36163 done
36164   done
36165 IFS=$as_save_IFS
36166 
36167 fi
36168 fi
36169 AR=$ac_cv_prog_AR
36170 if test -n "$AR"; then
36171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36172 $as_echo "$AR" >&6; }
36173 else
36174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36175 $as_echo "no" >&6; }
36176 fi
36177 
36178 
36179     test -n "$AR" && break
36180   done
36181 fi
36182 if test -z "$AR"; then
36183   ac_ct_AR=$AR
36184   for ac_prog in ar gcc-ar
36185 do
36186   # Extract the first word of "$ac_prog", so it can be a program name with args.
36187 set dummy $ac_prog; ac_word=$2
36188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36189 $as_echo_n "checking for $ac_word... " >&6; }
36190 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36191   $as_echo_n "(cached) " >&6
36192 else
36193   if test -n "$ac_ct_AR"; then
36194   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36195 else
36196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36197 for as_dir in $PATH
36198 do
36199   IFS=$as_save_IFS
36200   test -z "$as_dir" && as_dir=.
36201     for ac_exec_ext in '' $ac_executable_extensions; do
36202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36203     ac_cv_prog_ac_ct_AR="$ac_prog"
36204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36205     break 2
36206   fi
36207 done
36208   done
36209 IFS=$as_save_IFS
36210 
36211 fi
36212 fi
36213 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36214 if test -n "$ac_ct_AR"; then
36215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36216 $as_echo "$ac_ct_AR" >&6; }
36217 else
36218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36219 $as_echo "no" >&6; }
36220 fi
36221 
36222 
36223   test -n "$ac_ct_AR" && break
36224 done
36225 
36226   if test "x$ac_ct_AR" = x; then
36227     AR=""
36228   else
36229     case $cross_compiling:$ac_tool_warned in
36230 yes:)
36231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36232 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36233 ac_tool_warned=yes ;;
36234 esac
36235     AR=$ac_ct_AR
36236   fi
36237 fi
36238 
36239   else
36240     # The variable is set, but is it from the command line or the environment?
36241 
36242     # Try to remove the string !AR! from our list.
36243     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36244     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36245       # If it failed, the variable was not from the command line. Ignore it,
36246       # but warn the user (except for BASH, which is always set by the calling BASH).
36247       if test "xAR" != xBASH; then
36248         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36249 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36250       fi
36251       # Try to locate tool using the code snippet
36252       if test -n "$ac_tool_prefix"; then
36253   for ac_prog in ar gcc-ar
36254   do
36255     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36256 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36258 $as_echo_n "checking for $ac_word... " >&6; }
36259 if ${ac_cv_prog_AR+:} false; then :
36260   $as_echo_n "(cached) " >&6
36261 else
36262   if test -n "$AR"; then
36263   ac_cv_prog_AR="$AR" # Let the user override the test.
36264 else
36265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36266 for as_dir in $PATH
36267 do
36268   IFS=$as_save_IFS
36269   test -z "$as_dir" && as_dir=.
36270     for ac_exec_ext in '' $ac_executable_extensions; do
36271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36272     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36274     break 2
36275   fi
36276 done
36277   done
36278 IFS=$as_save_IFS
36279 
36280 fi
36281 fi
36282 AR=$ac_cv_prog_AR
36283 if test -n "$AR"; then
36284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36285 $as_echo "$AR" >&6; }
36286 else
36287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36288 $as_echo "no" >&6; }
36289 fi
36290 
36291 
36292     test -n "$AR" && break
36293   done
36294 fi
36295 if test -z "$AR"; then
36296   ac_ct_AR=$AR
36297   for ac_prog in ar gcc-ar
36298 do
36299   # Extract the first word of "$ac_prog", so it can be a program name with args.
36300 set dummy $ac_prog; ac_word=$2
36301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36302 $as_echo_n "checking for $ac_word... " >&6; }
36303 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36304   $as_echo_n "(cached) " >&6
36305 else
36306   if test -n "$ac_ct_AR"; then
36307   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36308 else
36309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36310 for as_dir in $PATH
36311 do
36312   IFS=$as_save_IFS
36313   test -z "$as_dir" && as_dir=.
36314     for ac_exec_ext in '' $ac_executable_extensions; do
36315   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36316     ac_cv_prog_ac_ct_AR="$ac_prog"
36317     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36318     break 2
36319   fi
36320 done
36321   done
36322 IFS=$as_save_IFS
36323 
36324 fi
36325 fi
36326 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36327 if test -n "$ac_ct_AR"; then
36328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36329 $as_echo "$ac_ct_AR" >&6; }
36330 else
36331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36332 $as_echo "no" >&6; }
36333 fi
36334 
36335 
36336   test -n "$ac_ct_AR" && break
36337 done
36338 
36339   if test "x$ac_ct_AR" = x; then
36340     AR=""
36341   else
36342     case $cross_compiling:$ac_tool_warned in
36343 yes:)
36344 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36345 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36346 ac_tool_warned=yes ;;
36347 esac
36348     AR=$ac_ct_AR
36349   fi
36350 fi
36351 
36352     else
36353       # If it succeeded, then it was overridden by the user. We will use it
36354       # for the tool.
36355 
36356       # First remove it from the list of overridden variables, so we can test
36357       # for unknown variables in the end.
36358       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36359 
36360       # Check if we try to supply an empty value
36361       if test "x$AR" = x; then
36362         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36363 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36364         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36365 $as_echo_n "checking for AR... " >&6; }
36366         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36367 $as_echo "disabled" >&6; }
36368       else
36369         # Check if the provided tool contains a complete path.
36370         tool_specified="$AR"
36371         tool_basename="${tool_specified##*/}"
36372         if test "x$tool_basename" = "x$tool_specified"; then
36373           # A command without a complete path is provided, search $PATH.
36374           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36375 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36376           # Extract the first word of "$tool_basename", so it can be a program name with args.
36377 set dummy $tool_basename; ac_word=$2
36378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36379 $as_echo_n "checking for $ac_word... " >&6; }
36380 if ${ac_cv_path_AR+:} false; then :
36381   $as_echo_n "(cached) " >&6
36382 else
36383   case $AR in
36384   [\\/]* | ?:[\\/]*)
36385   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36386   ;;
36387   *)
36388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36389 for as_dir in $PATH
36390 do
36391   IFS=$as_save_IFS
36392   test -z "$as_dir" && as_dir=.
36393     for ac_exec_ext in '' $ac_executable_extensions; do
36394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36395     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36397     break 2
36398   fi
36399 done
36400   done
36401 IFS=$as_save_IFS
36402 
36403   ;;
36404 esac
36405 fi
36406 AR=$ac_cv_path_AR
36407 if test -n "$AR"; then
36408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36409 $as_echo "$AR" >&6; }
36410 else
36411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36412 $as_echo "no" >&6; }
36413 fi
36414 
36415 
36416           if test "x$AR" = x; then
36417             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36418           fi
36419         else
36420           # Otherwise we believe it is a complete path. Use it as it is.
36421           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36422 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36423           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36424 $as_echo_n "checking for AR... " >&6; }
36425           if test ! -x "$tool_specified"; then
36426             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36427 $as_echo "not found" >&6; }
36428             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36429           fi
36430           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36431 $as_echo "$tool_specified" >&6; }
36432         fi
36433       fi
36434     fi
36435 
36436   fi
36437 
36438 
36439   else
36440 
36441 
36442   # Publish this variable in the help.
36443 
36444 
36445   if [ -z "${AR+x}" ]; then
36446     # The variable is not set by user, try to locate tool using the code snippet
36447     if test -n "$ac_tool_prefix"; then
36448   for ac_prog in ar
36449   do
36450     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36451 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36453 $as_echo_n "checking for $ac_word... " >&6; }
36454 if ${ac_cv_prog_AR+:} false; then :
36455   $as_echo_n "(cached) " >&6
36456 else
36457   if test -n "$AR"; then
36458   ac_cv_prog_AR="$AR" # Let the user override the test.
36459 else
36460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36461 for as_dir in $PATH
36462 do
36463   IFS=$as_save_IFS
36464   test -z "$as_dir" && as_dir=.
36465     for ac_exec_ext in '' $ac_executable_extensions; do
36466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36467     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36469     break 2
36470   fi
36471 done
36472   done
36473 IFS=$as_save_IFS
36474 
36475 fi
36476 fi
36477 AR=$ac_cv_prog_AR
36478 if test -n "$AR"; then
36479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36480 $as_echo "$AR" >&6; }
36481 else
36482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36483 $as_echo "no" >&6; }
36484 fi
36485 
36486 
36487     test -n "$AR" && break
36488   done
36489 fi
36490 if test -z "$AR"; then
36491   ac_ct_AR=$AR
36492   for ac_prog in ar
36493 do
36494   # Extract the first word of "$ac_prog", so it can be a program name with args.
36495 set dummy $ac_prog; ac_word=$2
36496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36497 $as_echo_n "checking for $ac_word... " >&6; }
36498 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36499   $as_echo_n "(cached) " >&6
36500 else
36501   if test -n "$ac_ct_AR"; then
36502   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36503 else
36504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36505 for as_dir in $PATH
36506 do
36507   IFS=$as_save_IFS
36508   test -z "$as_dir" && as_dir=.
36509     for ac_exec_ext in '' $ac_executable_extensions; do
36510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36511     ac_cv_prog_ac_ct_AR="$ac_prog"
36512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36513     break 2
36514   fi
36515 done
36516   done
36517 IFS=$as_save_IFS
36518 
36519 fi
36520 fi
36521 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36522 if test -n "$ac_ct_AR"; then
36523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36524 $as_echo "$ac_ct_AR" >&6; }
36525 else
36526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36527 $as_echo "no" >&6; }
36528 fi
36529 
36530 
36531   test -n "$ac_ct_AR" && break
36532 done
36533 
36534   if test "x$ac_ct_AR" = x; then
36535     AR=""
36536   else
36537     case $cross_compiling:$ac_tool_warned in
36538 yes:)
36539 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36540 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36541 ac_tool_warned=yes ;;
36542 esac
36543     AR=$ac_ct_AR
36544   fi
36545 fi
36546 
36547   else
36548     # The variable is set, but is it from the command line or the environment?
36549 
36550     # Try to remove the string !AR! from our list.
36551     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36552     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36553       # If it failed, the variable was not from the command line. Ignore it,
36554       # but warn the user (except for BASH, which is always set by the calling BASH).
36555       if test "xAR" != xBASH; then
36556         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36557 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36558       fi
36559       # Try to locate tool using the code snippet
36560       if test -n "$ac_tool_prefix"; then
36561   for ac_prog in ar
36562   do
36563     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36564 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36566 $as_echo_n "checking for $ac_word... " >&6; }
36567 if ${ac_cv_prog_AR+:} false; then :
36568   $as_echo_n "(cached) " >&6
36569 else
36570   if test -n "$AR"; then
36571   ac_cv_prog_AR="$AR" # Let the user override the test.
36572 else
36573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36574 for as_dir in $PATH
36575 do
36576   IFS=$as_save_IFS
36577   test -z "$as_dir" && as_dir=.
36578     for ac_exec_ext in '' $ac_executable_extensions; do
36579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36580     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36582     break 2
36583   fi
36584 done
36585   done
36586 IFS=$as_save_IFS
36587 
36588 fi
36589 fi
36590 AR=$ac_cv_prog_AR
36591 if test -n "$AR"; then
36592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36593 $as_echo "$AR" >&6; }
36594 else
36595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36596 $as_echo "no" >&6; }
36597 fi
36598 
36599 
36600     test -n "$AR" && break
36601   done
36602 fi
36603 if test -z "$AR"; then
36604   ac_ct_AR=$AR
36605   for ac_prog in ar
36606 do
36607   # Extract the first word of "$ac_prog", so it can be a program name with args.
36608 set dummy $ac_prog; ac_word=$2
36609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36610 $as_echo_n "checking for $ac_word... " >&6; }
36611 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36612   $as_echo_n "(cached) " >&6
36613 else
36614   if test -n "$ac_ct_AR"; then
36615   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36616 else
36617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36618 for as_dir in $PATH
36619 do
36620   IFS=$as_save_IFS
36621   test -z "$as_dir" && as_dir=.
36622     for ac_exec_ext in '' $ac_executable_extensions; do
36623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36624     ac_cv_prog_ac_ct_AR="$ac_prog"
36625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36626     break 2
36627   fi
36628 done
36629   done
36630 IFS=$as_save_IFS
36631 
36632 fi
36633 fi
36634 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36635 if test -n "$ac_ct_AR"; then
36636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36637 $as_echo "$ac_ct_AR" >&6; }
36638 else
36639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36640 $as_echo "no" >&6; }
36641 fi
36642 
36643 
36644   test -n "$ac_ct_AR" && break
36645 done
36646 
36647   if test "x$ac_ct_AR" = x; then
36648     AR=""
36649   else
36650     case $cross_compiling:$ac_tool_warned in
36651 yes:)
36652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36653 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36654 ac_tool_warned=yes ;;
36655 esac
36656     AR=$ac_ct_AR
36657   fi
36658 fi
36659 
36660     else
36661       # If it succeeded, then it was overridden by the user. We will use it
36662       # for the tool.
36663 
36664       # First remove it from the list of overridden variables, so we can test
36665       # for unknown variables in the end.
36666       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36667 
36668       # Check if we try to supply an empty value
36669       if test "x$AR" = x; then
36670         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36671 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36672         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36673 $as_echo_n "checking for AR... " >&6; }
36674         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36675 $as_echo "disabled" >&6; }
36676       else
36677         # Check if the provided tool contains a complete path.
36678         tool_specified="$AR"
36679         tool_basename="${tool_specified##*/}"
36680         if test "x$tool_basename" = "x$tool_specified"; then
36681           # A command without a complete path is provided, search $PATH.
36682           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36683 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36684           # Extract the first word of "$tool_basename", so it can be a program name with args.
36685 set dummy $tool_basename; ac_word=$2
36686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36687 $as_echo_n "checking for $ac_word... " >&6; }
36688 if ${ac_cv_path_AR+:} false; then :
36689   $as_echo_n "(cached) " >&6
36690 else
36691   case $AR in
36692   [\\/]* | ?:[\\/]*)
36693   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36694   ;;
36695   *)
36696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36697 for as_dir in $PATH
36698 do
36699   IFS=$as_save_IFS
36700   test -z "$as_dir" && as_dir=.
36701     for ac_exec_ext in '' $ac_executable_extensions; do
36702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36703     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36705     break 2
36706   fi
36707 done
36708   done
36709 IFS=$as_save_IFS
36710 
36711   ;;
36712 esac
36713 fi
36714 AR=$ac_cv_path_AR
36715 if test -n "$AR"; then
36716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36717 $as_echo "$AR" >&6; }
36718 else
36719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36720 $as_echo "no" >&6; }
36721 fi
36722 
36723 
36724           if test "x$AR" = x; then
36725             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36726           fi
36727         else
36728           # Otherwise we believe it is a complete path. Use it as it is.
36729           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36730 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36731           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36732 $as_echo_n "checking for AR... " >&6; }
36733           if test ! -x "$tool_specified"; then
36734             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36735 $as_echo "not found" >&6; }
36736             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36737           fi
36738           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36739 $as_echo "$tool_specified" >&6; }
36740         fi
36741       fi
36742     fi
36743 
36744   fi
36745 
36746 
36747   fi
36748 
36749   # Only process if variable expands to non-empty
36750 
36751   if test "x$AR" != x; then
36752     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36753 
36754   # First separate the path from the arguments. This will split at the first
36755   # space.
36756   complete="$AR"
36757   path="${complete%% *}"
36758   tmp="$complete EOL"
36759   arguments="${tmp#* }"
36760 
36761   # Input might be given as Windows format, start by converting to
36762   # unix format.
36763   new_path=`$CYGPATH -u "$path"`
36764 
36765   # Now try to locate executable using which
36766   new_path=`$WHICH "$new_path" 2> /dev/null`
36767   # bat and cmd files are not always considered executable in cygwin causing which
36768   # to not find them
36769   if test "x$new_path" = x \
36770       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36771       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36772     new_path=`$CYGPATH -u "$path"`
36773   fi
36774   if test "x$new_path" = x; then
36775     # Oops. Which didn't find the executable.
36776     # The splitting of arguments from the executable at a space might have been incorrect,
36777     # since paths with space are more likely in Windows. Give it another try with the whole
36778     # argument.
36779     path="$complete"
36780     arguments="EOL"
36781     new_path=`$CYGPATH -u "$path"`
36782     new_path=`$WHICH "$new_path" 2> /dev/null`
36783     # bat and cmd files are not always considered executable in cygwin causing which
36784     # to not find them
36785     if test "x$new_path" = x \
36786         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36787         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36788       new_path=`$CYGPATH -u "$path"`
36789     fi
36790     if test "x$new_path" = x; then
36791       # It's still not found. Now this is an unrecoverable error.
36792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36793 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36794       has_space=`$ECHO "$complete" | $GREP " "`
36795       if test "x$has_space" != x; then
36796         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36797 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36798       fi
36799       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36800     fi
36801   fi
36802 
36803   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36804   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36805   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36806   # "foo.exe" is OK but "foo" is an error.
36807   #
36808   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36809   # It is also a way to make sure we got the proper file name for the real test later on.
36810   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36811   if test "x$test_shortpath" = x; then
36812     # Short path failed, file does not exist as specified.
36813     # Try adding .exe or .cmd
36814     if test -f "${new_path}.exe"; then
36815       input_to_shortpath="${new_path}.exe"
36816     elif test -f "${new_path}.cmd"; then
36817       input_to_shortpath="${new_path}.cmd"
36818     else
36819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36820 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36821       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36822 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36823       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36824     fi
36825   else
36826     input_to_shortpath="$new_path"
36827   fi
36828 
36829   # Call helper function which possibly converts this using DOS-style short mode.
36830   # If so, the updated path is stored in $new_path.
36831   new_path="$input_to_shortpath"
36832 
36833   input_path="$input_to_shortpath"
36834   # Check if we need to convert this using DOS-style short mode. If the path
36835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36836   # take no chances and rewrite it.
36837   # Note: m4 eats our [], so we need to use [ and ] instead.
36838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36839   if test "x$has_forbidden_chars" != x; then
36840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36841     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36842     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36843     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36844       # Going to short mode and back again did indeed matter. Since short mode is
36845       # case insensitive, let's make it lowercase to improve readability.
36846       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36847       # Now convert it back to Unix-style (cygpath)
36848       input_path=`$CYGPATH -u "$shortmode_path"`
36849       new_path="$input_path"
36850     fi
36851   fi
36852 
36853   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36854   if test "x$test_cygdrive_prefix" = x; then
36855     # As a simple fix, exclude /usr/bin since it's not a real path.
36856     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36857       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36858       # a path prefixed by /cygdrive for fixpath to work.
36859       new_path="$CYGWIN_ROOT_PATH$input_path"
36860     fi
36861   fi
36862 
36863   # remove trailing .exe if any
36864   new_path="${new_path/%.exe/}"
36865 
36866     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36867 
36868   # First separate the path from the arguments. This will split at the first
36869   # space.
36870   complete="$AR"
36871   path="${complete%% *}"
36872   tmp="$complete EOL"
36873   arguments="${tmp#* }"
36874 
36875   # Input might be given as Windows format, start by converting to
36876   # unix format.
36877   new_path="$path"
36878 
36879   windows_path="$new_path"
36880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36881     unix_path=`$CYGPATH -u "$windows_path"`
36882     new_path="$unix_path"
36883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36885     new_path="$unix_path"
36886   fi
36887 
36888 
36889   # Now try to locate executable using which
36890   new_path=`$WHICH "$new_path" 2> /dev/null`
36891 
36892   if test "x$new_path" = x; then
36893     # Oops. Which didn't find the executable.
36894     # The splitting of arguments from the executable at a space might have been incorrect,
36895     # since paths with space are more likely in Windows. Give it another try with the whole
36896     # argument.
36897     path="$complete"
36898     arguments="EOL"
36899     new_path="$path"
36900 
36901   windows_path="$new_path"
36902   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36903     unix_path=`$CYGPATH -u "$windows_path"`
36904     new_path="$unix_path"
36905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36906     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36907     new_path="$unix_path"
36908   fi
36909 
36910 
36911     new_path=`$WHICH "$new_path" 2> /dev/null`
36912     # bat and cmd files are not always considered executable in MSYS causing which
36913     # to not find them
36914     if test "x$new_path" = x \
36915         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36916         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36917       new_path="$path"
36918 
36919   windows_path="$new_path"
36920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36921     unix_path=`$CYGPATH -u "$windows_path"`
36922     new_path="$unix_path"
36923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36925     new_path="$unix_path"
36926   fi
36927 
36928     fi
36929 
36930     if test "x$new_path" = x; then
36931       # It's still not found. Now this is an unrecoverable error.
36932       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36933 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36934       has_space=`$ECHO "$complete" | $GREP " "`
36935       if test "x$has_space" != x; then
36936         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36937 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36938       fi
36939       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36940     fi
36941   fi
36942 
36943   # Now new_path has a complete unix path to the binary
36944   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36945     # Keep paths in /bin as-is, but remove trailing .exe if any
36946     new_path="${new_path/%.exe/}"
36947     # Do not save /bin paths to all_fixpath_prefixes!
36948   else
36949     # Not in mixed or Windows style, start by that.
36950     new_path=`cmd //c echo $new_path`
36951 
36952   input_path="$new_path"
36953   # Check if we need to convert this using DOS-style short mode. If the path
36954   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36955   # take no chances and rewrite it.
36956   # Note: m4 eats our [], so we need to use [ and ] instead.
36957   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36958   if test "x$has_forbidden_chars" != x; then
36959     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36960     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36961   fi
36962 
36963     # Output is in $new_path
36964 
36965   windows_path="$new_path"
36966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36967     unix_path=`$CYGPATH -u "$windows_path"`
36968     new_path="$unix_path"
36969   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36970     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36971     new_path="$unix_path"
36972   fi
36973 
36974     # remove trailing .exe if any
36975     new_path="${new_path/%.exe/}"
36976 
36977     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36978     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36979   fi
36980 
36981     else
36982       # We're on a unix platform. Hooray! :)
36983       # First separate the path from the arguments. This will split at the first
36984       # space.
36985       complete="$AR"
36986       path="${complete%% *}"
36987       tmp="$complete EOL"
36988       arguments="${tmp#* }"
36989 
36990       # Cannot rely on the command "which" here since it doesn't always work.
36991       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36992       if test -z "$is_absolute_path"; then
36993         # Path to executable is not absolute. Find it.
36994         IFS_save="$IFS"
36995         IFS=:
36996         for p in $PATH; do
36997           if test -f "$p/$path" && test -x "$p/$path"; then
36998             new_path="$p/$path"
36999             break
37000           fi
37001         done
37002         IFS="$IFS_save"
37003       else
37004         # This is an absolute path, we can use it without further modifications.
37005         new_path="$path"
37006       fi
37007 
37008       if test "x$new_path" = x; then
37009         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37010 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37011         has_space=`$ECHO "$complete" | $GREP " "`
37012         if test "x$has_space" != x; then
37013           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37014 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37015         fi
37016         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37017       fi
37018     fi
37019 
37020     # Now join together the path and the arguments once again
37021     if test "x$arguments" != xEOL; then
37022       new_complete="$new_path ${arguments% *}"
37023     else
37024       new_complete="$new_path"
37025     fi
37026 
37027     if test "x$complete" != "x$new_complete"; then
37028       AR="$new_complete"
37029       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37030 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37031     fi
37032   fi
37033 
37034 
37035 
37036   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37037 
37038 
37039   # Publish this variable in the help.
37040 
37041 
37042   if [ -z "${LIPO+x}" ]; then
37043     # The variable is not set by user, try to locate tool using the code snippet
37044     for ac_prog in lipo
37045 do
37046   # Extract the first word of "$ac_prog", so it can be a program name with args.
37047 set dummy $ac_prog; ac_word=$2
37048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37049 $as_echo_n "checking for $ac_word... " >&6; }
37050 if ${ac_cv_path_LIPO+:} false; then :
37051   $as_echo_n "(cached) " >&6
37052 else
37053   case $LIPO in
37054   [\\/]* | ?:[\\/]*)
37055   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37056   ;;
37057   *)
37058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37059 for as_dir in $PATH
37060 do
37061   IFS=$as_save_IFS
37062   test -z "$as_dir" && as_dir=.
37063     for ac_exec_ext in '' $ac_executable_extensions; do
37064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37065     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37067     break 2
37068   fi
37069 done
37070   done
37071 IFS=$as_save_IFS
37072 
37073   ;;
37074 esac
37075 fi
37076 LIPO=$ac_cv_path_LIPO
37077 if test -n "$LIPO"; then
37078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37079 $as_echo "$LIPO" >&6; }
37080 else
37081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37082 $as_echo "no" >&6; }
37083 fi
37084 
37085 
37086   test -n "$LIPO" && break
37087 done
37088 
37089   else
37090     # The variable is set, but is it from the command line or the environment?
37091 
37092     # Try to remove the string !LIPO! from our list.
37093     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37094     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37095       # If it failed, the variable was not from the command line. Ignore it,
37096       # but warn the user (except for BASH, which is always set by the calling BASH).
37097       if test "xLIPO" != xBASH; then
37098         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37099 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37100       fi
37101       # Try to locate tool using the code snippet
37102       for ac_prog in lipo
37103 do
37104   # Extract the first word of "$ac_prog", so it can be a program name with args.
37105 set dummy $ac_prog; ac_word=$2
37106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37107 $as_echo_n "checking for $ac_word... " >&6; }
37108 if ${ac_cv_path_LIPO+:} false; then :
37109   $as_echo_n "(cached) " >&6
37110 else
37111   case $LIPO in
37112   [\\/]* | ?:[\\/]*)
37113   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37114   ;;
37115   *)
37116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37117 for as_dir in $PATH
37118 do
37119   IFS=$as_save_IFS
37120   test -z "$as_dir" && as_dir=.
37121     for ac_exec_ext in '' $ac_executable_extensions; do
37122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37123     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37125     break 2
37126   fi
37127 done
37128   done
37129 IFS=$as_save_IFS
37130 
37131   ;;
37132 esac
37133 fi
37134 LIPO=$ac_cv_path_LIPO
37135 if test -n "$LIPO"; then
37136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37137 $as_echo "$LIPO" >&6; }
37138 else
37139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37140 $as_echo "no" >&6; }
37141 fi
37142 
37143 
37144   test -n "$LIPO" && break
37145 done
37146 
37147     else
37148       # If it succeeded, then it was overridden by the user. We will use it
37149       # for the tool.
37150 
37151       # First remove it from the list of overridden variables, so we can test
37152       # for unknown variables in the end.
37153       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37154 
37155       # Check if we try to supply an empty value
37156       if test "x$LIPO" = x; then
37157         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37158 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37159         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37160 $as_echo_n "checking for LIPO... " >&6; }
37161         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37162 $as_echo "disabled" >&6; }
37163       else
37164         # Check if the provided tool contains a complete path.
37165         tool_specified="$LIPO"
37166         tool_basename="${tool_specified##*/}"
37167         if test "x$tool_basename" = "x$tool_specified"; then
37168           # A command without a complete path is provided, search $PATH.
37169           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37170 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37171           # Extract the first word of "$tool_basename", so it can be a program name with args.
37172 set dummy $tool_basename; ac_word=$2
37173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37174 $as_echo_n "checking for $ac_word... " >&6; }
37175 if ${ac_cv_path_LIPO+:} false; then :
37176   $as_echo_n "(cached) " >&6
37177 else
37178   case $LIPO in
37179   [\\/]* | ?:[\\/]*)
37180   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37181   ;;
37182   *)
37183   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37184 for as_dir in $PATH
37185 do
37186   IFS=$as_save_IFS
37187   test -z "$as_dir" && as_dir=.
37188     for ac_exec_ext in '' $ac_executable_extensions; do
37189   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37190     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37192     break 2
37193   fi
37194 done
37195   done
37196 IFS=$as_save_IFS
37197 
37198   ;;
37199 esac
37200 fi
37201 LIPO=$ac_cv_path_LIPO
37202 if test -n "$LIPO"; then
37203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37204 $as_echo "$LIPO" >&6; }
37205 else
37206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37207 $as_echo "no" >&6; }
37208 fi
37209 
37210 
37211           if test "x$LIPO" = x; then
37212             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37213           fi
37214         else
37215           # Otherwise we believe it is a complete path. Use it as it is.
37216           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37217 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37218           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37219 $as_echo_n "checking for LIPO... " >&6; }
37220           if test ! -x "$tool_specified"; then
37221             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37222 $as_echo "not found" >&6; }
37223             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37224           fi
37225           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37226 $as_echo "$tool_specified" >&6; }
37227         fi
37228       fi
37229     fi
37230 
37231   fi
37232 
37233 
37234 
37235   # Only process if variable expands to non-empty
37236 
37237   if test "x$LIPO" != x; then
37238     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37239 
37240   # First separate the path from the arguments. This will split at the first
37241   # space.
37242   complete="$LIPO"
37243   path="${complete%% *}"
37244   tmp="$complete EOL"
37245   arguments="${tmp#* }"
37246 
37247   # Input might be given as Windows format, start by converting to
37248   # unix format.
37249   new_path=`$CYGPATH -u "$path"`
37250 
37251   # Now try to locate executable using which
37252   new_path=`$WHICH "$new_path" 2> /dev/null`
37253   # bat and cmd files are not always considered executable in cygwin causing which
37254   # to not find them
37255   if test "x$new_path" = x \
37256       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37257       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37258     new_path=`$CYGPATH -u "$path"`
37259   fi
37260   if test "x$new_path" = x; then
37261     # Oops. Which didn't find the executable.
37262     # The splitting of arguments from the executable at a space might have been incorrect,
37263     # since paths with space are more likely in Windows. Give it another try with the whole
37264     # argument.
37265     path="$complete"
37266     arguments="EOL"
37267     new_path=`$CYGPATH -u "$path"`
37268     new_path=`$WHICH "$new_path" 2> /dev/null`
37269     # bat and cmd files are not always considered executable in cygwin causing which
37270     # to not find them
37271     if test "x$new_path" = x \
37272         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37273         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37274       new_path=`$CYGPATH -u "$path"`
37275     fi
37276     if test "x$new_path" = x; then
37277       # It's still not found. Now this is an unrecoverable error.
37278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37279 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37280       has_space=`$ECHO "$complete" | $GREP " "`
37281       if test "x$has_space" != x; then
37282         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37283 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37284       fi
37285       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37286     fi
37287   fi
37288 
37289   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37290   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37291   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37292   # "foo.exe" is OK but "foo" is an error.
37293   #
37294   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37295   # It is also a way to make sure we got the proper file name for the real test later on.
37296   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37297   if test "x$test_shortpath" = x; then
37298     # Short path failed, file does not exist as specified.
37299     # Try adding .exe or .cmd
37300     if test -f "${new_path}.exe"; then
37301       input_to_shortpath="${new_path}.exe"
37302     elif test -f "${new_path}.cmd"; then
37303       input_to_shortpath="${new_path}.cmd"
37304     else
37305       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37306 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37307       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37308 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37309       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37310     fi
37311   else
37312     input_to_shortpath="$new_path"
37313   fi
37314 
37315   # Call helper function which possibly converts this using DOS-style short mode.
37316   # If so, the updated path is stored in $new_path.
37317   new_path="$input_to_shortpath"
37318 
37319   input_path="$input_to_shortpath"
37320   # Check if we need to convert this using DOS-style short mode. If the path
37321   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37322   # take no chances and rewrite it.
37323   # Note: m4 eats our [], so we need to use [ and ] instead.
37324   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37325   if test "x$has_forbidden_chars" != x; then
37326     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37327     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37328     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37329     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37330       # Going to short mode and back again did indeed matter. Since short mode is
37331       # case insensitive, let's make it lowercase to improve readability.
37332       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37333       # Now convert it back to Unix-style (cygpath)
37334       input_path=`$CYGPATH -u "$shortmode_path"`
37335       new_path="$input_path"
37336     fi
37337   fi
37338 
37339   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37340   if test "x$test_cygdrive_prefix" = x; then
37341     # As a simple fix, exclude /usr/bin since it's not a real path.
37342     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37343       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37344       # a path prefixed by /cygdrive for fixpath to work.
37345       new_path="$CYGWIN_ROOT_PATH$input_path"
37346     fi
37347   fi
37348 
37349   # remove trailing .exe if any
37350   new_path="${new_path/%.exe/}"
37351 
37352     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37353 
37354   # First separate the path from the arguments. This will split at the first
37355   # space.
37356   complete="$LIPO"
37357   path="${complete%% *}"
37358   tmp="$complete EOL"
37359   arguments="${tmp#* }"
37360 
37361   # Input might be given as Windows format, start by converting to
37362   # unix format.
37363   new_path="$path"
37364 
37365   windows_path="$new_path"
37366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37367     unix_path=`$CYGPATH -u "$windows_path"`
37368     new_path="$unix_path"
37369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37370     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37371     new_path="$unix_path"
37372   fi
37373 
37374 
37375   # Now try to locate executable using which
37376   new_path=`$WHICH "$new_path" 2> /dev/null`
37377 
37378   if test "x$new_path" = x; then
37379     # Oops. Which didn't find the executable.
37380     # The splitting of arguments from the executable at a space might have been incorrect,
37381     # since paths with space are more likely in Windows. Give it another try with the whole
37382     # argument.
37383     path="$complete"
37384     arguments="EOL"
37385     new_path="$path"
37386 
37387   windows_path="$new_path"
37388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37389     unix_path=`$CYGPATH -u "$windows_path"`
37390     new_path="$unix_path"
37391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37393     new_path="$unix_path"
37394   fi
37395 
37396 
37397     new_path=`$WHICH "$new_path" 2> /dev/null`
37398     # bat and cmd files are not always considered executable in MSYS causing which
37399     # to not find them
37400     if test "x$new_path" = x \
37401         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37402         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37403       new_path="$path"
37404 
37405   windows_path="$new_path"
37406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37407     unix_path=`$CYGPATH -u "$windows_path"`
37408     new_path="$unix_path"
37409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37411     new_path="$unix_path"
37412   fi
37413 
37414     fi
37415 
37416     if test "x$new_path" = x; then
37417       # It's still not found. Now this is an unrecoverable error.
37418       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37419 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37420       has_space=`$ECHO "$complete" | $GREP " "`
37421       if test "x$has_space" != x; then
37422         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37423 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37424       fi
37425       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37426     fi
37427   fi
37428 
37429   # Now new_path has a complete unix path to the binary
37430   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37431     # Keep paths in /bin as-is, but remove trailing .exe if any
37432     new_path="${new_path/%.exe/}"
37433     # Do not save /bin paths to all_fixpath_prefixes!
37434   else
37435     # Not in mixed or Windows style, start by that.
37436     new_path=`cmd //c echo $new_path`
37437 
37438   input_path="$new_path"
37439   # Check if we need to convert this using DOS-style short mode. If the path
37440   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37441   # take no chances and rewrite it.
37442   # Note: m4 eats our [], so we need to use [ and ] instead.
37443   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37444   if test "x$has_forbidden_chars" != x; then
37445     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37446     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37447   fi
37448 
37449     # Output is in $new_path
37450 
37451   windows_path="$new_path"
37452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37453     unix_path=`$CYGPATH -u "$windows_path"`
37454     new_path="$unix_path"
37455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37457     new_path="$unix_path"
37458   fi
37459 
37460     # remove trailing .exe if any
37461     new_path="${new_path/%.exe/}"
37462 
37463     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37464     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37465   fi
37466 
37467     else
37468       # We're on a unix platform. Hooray! :)
37469       # First separate the path from the arguments. This will split at the first
37470       # space.
37471       complete="$LIPO"
37472       path="${complete%% *}"
37473       tmp="$complete EOL"
37474       arguments="${tmp#* }"
37475 
37476       # Cannot rely on the command "which" here since it doesn't always work.
37477       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37478       if test -z "$is_absolute_path"; then
37479         # Path to executable is not absolute. Find it.
37480         IFS_save="$IFS"
37481         IFS=:
37482         for p in $PATH; do
37483           if test -f "$p/$path" && test -x "$p/$path"; then
37484             new_path="$p/$path"
37485             break
37486           fi
37487         done
37488         IFS="$IFS_save"
37489       else
37490         # This is an absolute path, we can use it without further modifications.
37491         new_path="$path"
37492       fi
37493 
37494       if test "x$new_path" = x; then
37495         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37496 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37497         has_space=`$ECHO "$complete" | $GREP " "`
37498         if test "x$has_space" != x; then
37499           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37500 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37501         fi
37502         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37503       fi
37504     fi
37505 
37506     # Now join together the path and the arguments once again
37507     if test "x$arguments" != xEOL; then
37508       new_complete="$new_path ${arguments% *}"
37509     else
37510       new_complete="$new_path"
37511     fi
37512 
37513     if test "x$complete" != "x$new_complete"; then
37514       LIPO="$new_complete"
37515       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37516 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37517     fi
37518   fi
37519 
37520   fi
37521 
37522   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37523     # Extract the first word of "mt", so it can be a program name with args.
37524 set dummy mt; ac_word=$2
37525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37526 $as_echo_n "checking for $ac_word... " >&6; }
37527 if ${ac_cv_prog_MT+:} false; then :
37528   $as_echo_n "(cached) " >&6
37529 else
37530   if test -n "$MT"; then
37531   ac_cv_prog_MT="$MT" # Let the user override the test.
37532 else
37533   ac_prog_rejected=no
37534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37535 for as_dir in $PATH
37536 do
37537   IFS=$as_save_IFS
37538   test -z "$as_dir" && as_dir=.
37539     for ac_exec_ext in '' $ac_executable_extensions; do
37540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37541     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37542        ac_prog_rejected=yes
37543        continue
37544      fi
37545     ac_cv_prog_MT="mt"
37546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37547     break 2
37548   fi
37549 done
37550   done
37551 IFS=$as_save_IFS
37552 
37553 if test $ac_prog_rejected = yes; then
37554   # We found a bogon in the path, so make sure we never use it.
37555   set dummy $ac_cv_prog_MT
37556   shift
37557   if test $# != 0; then
37558     # We chose a different compiler from the bogus one.
37559     # However, it has the same basename, so the bogon will be chosen
37560     # first if we set MT to just the basename; use the full file name.
37561     shift
37562     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37563   fi
37564 fi
37565 fi
37566 fi
37567 MT=$ac_cv_prog_MT
37568 if test -n "$MT"; then
37569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37570 $as_echo "$MT" >&6; }
37571 else
37572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37573 $as_echo "no" >&6; }
37574 fi
37575 
37576 
37577 
37578   # Only process if variable expands to non-empty
37579 
37580   if test "x$MT" != x; then
37581     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37582 
37583   # First separate the path from the arguments. This will split at the first
37584   # space.
37585   complete="$MT"
37586   path="${complete%% *}"
37587   tmp="$complete EOL"
37588   arguments="${tmp#* }"
37589 
37590   # Input might be given as Windows format, start by converting to
37591   # unix format.
37592   new_path=`$CYGPATH -u "$path"`
37593 
37594   # Now try to locate executable using which
37595   new_path=`$WHICH "$new_path" 2> /dev/null`
37596   # bat and cmd files are not always considered executable in cygwin causing which
37597   # to not find them
37598   if test "x$new_path" = x \
37599       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37600       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37601     new_path=`$CYGPATH -u "$path"`
37602   fi
37603   if test "x$new_path" = x; then
37604     # Oops. Which didn't find the executable.
37605     # The splitting of arguments from the executable at a space might have been incorrect,
37606     # since paths with space are more likely in Windows. Give it another try with the whole
37607     # argument.
37608     path="$complete"
37609     arguments="EOL"
37610     new_path=`$CYGPATH -u "$path"`
37611     new_path=`$WHICH "$new_path" 2> /dev/null`
37612     # bat and cmd files are not always considered executable in cygwin causing which
37613     # to not find them
37614     if test "x$new_path" = x \
37615         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37616         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37617       new_path=`$CYGPATH -u "$path"`
37618     fi
37619     if test "x$new_path" = x; then
37620       # It's still not found. Now this is an unrecoverable error.
37621       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37622 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37623       has_space=`$ECHO "$complete" | $GREP " "`
37624       if test "x$has_space" != x; then
37625         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37626 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37627       fi
37628       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37629     fi
37630   fi
37631 
37632   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37633   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37634   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37635   # "foo.exe" is OK but "foo" is an error.
37636   #
37637   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37638   # It is also a way to make sure we got the proper file name for the real test later on.
37639   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37640   if test "x$test_shortpath" = x; then
37641     # Short path failed, file does not exist as specified.
37642     # Try adding .exe or .cmd
37643     if test -f "${new_path}.exe"; then
37644       input_to_shortpath="${new_path}.exe"
37645     elif test -f "${new_path}.cmd"; then
37646       input_to_shortpath="${new_path}.cmd"
37647     else
37648       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37649 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37650       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37651 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37652       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37653     fi
37654   else
37655     input_to_shortpath="$new_path"
37656   fi
37657 
37658   # Call helper function which possibly converts this using DOS-style short mode.
37659   # If so, the updated path is stored in $new_path.
37660   new_path="$input_to_shortpath"
37661 
37662   input_path="$input_to_shortpath"
37663   # Check if we need to convert this using DOS-style short mode. If the path
37664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37665   # take no chances and rewrite it.
37666   # Note: m4 eats our [], so we need to use [ and ] instead.
37667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37668   if test "x$has_forbidden_chars" != x; then
37669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37670     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37671     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37672     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37673       # Going to short mode and back again did indeed matter. Since short mode is
37674       # case insensitive, let's make it lowercase to improve readability.
37675       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37676       # Now convert it back to Unix-style (cygpath)
37677       input_path=`$CYGPATH -u "$shortmode_path"`
37678       new_path="$input_path"
37679     fi
37680   fi
37681 
37682   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37683   if test "x$test_cygdrive_prefix" = x; then
37684     # As a simple fix, exclude /usr/bin since it's not a real path.
37685     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37686       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37687       # a path prefixed by /cygdrive for fixpath to work.
37688       new_path="$CYGWIN_ROOT_PATH$input_path"
37689     fi
37690   fi
37691 
37692   # remove trailing .exe if any
37693   new_path="${new_path/%.exe/}"
37694 
37695     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37696 
37697   # First separate the path from the arguments. This will split at the first
37698   # space.
37699   complete="$MT"
37700   path="${complete%% *}"
37701   tmp="$complete EOL"
37702   arguments="${tmp#* }"
37703 
37704   # Input might be given as Windows format, start by converting to
37705   # unix format.
37706   new_path="$path"
37707 
37708   windows_path="$new_path"
37709   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37710     unix_path=`$CYGPATH -u "$windows_path"`
37711     new_path="$unix_path"
37712   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37713     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37714     new_path="$unix_path"
37715   fi
37716 
37717 
37718   # Now try to locate executable using which
37719   new_path=`$WHICH "$new_path" 2> /dev/null`
37720 
37721   if test "x$new_path" = x; then
37722     # Oops. Which didn't find the executable.
37723     # The splitting of arguments from the executable at a space might have been incorrect,
37724     # since paths with space are more likely in Windows. Give it another try with the whole
37725     # argument.
37726     path="$complete"
37727     arguments="EOL"
37728     new_path="$path"
37729 
37730   windows_path="$new_path"
37731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37732     unix_path=`$CYGPATH -u "$windows_path"`
37733     new_path="$unix_path"
37734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37735     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37736     new_path="$unix_path"
37737   fi
37738 
37739 
37740     new_path=`$WHICH "$new_path" 2> /dev/null`
37741     # bat and cmd files are not always considered executable in MSYS causing which
37742     # to not find them
37743     if test "x$new_path" = x \
37744         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37745         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37746       new_path="$path"
37747 
37748   windows_path="$new_path"
37749   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37750     unix_path=`$CYGPATH -u "$windows_path"`
37751     new_path="$unix_path"
37752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37753     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37754     new_path="$unix_path"
37755   fi
37756 
37757     fi
37758 
37759     if test "x$new_path" = x; then
37760       # It's still not found. Now this is an unrecoverable error.
37761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37762 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37763       has_space=`$ECHO "$complete" | $GREP " "`
37764       if test "x$has_space" != x; then
37765         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37766 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37767       fi
37768       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37769     fi
37770   fi
37771 
37772   # Now new_path has a complete unix path to the binary
37773   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37774     # Keep paths in /bin as-is, but remove trailing .exe if any
37775     new_path="${new_path/%.exe/}"
37776     # Do not save /bin paths to all_fixpath_prefixes!
37777   else
37778     # Not in mixed or Windows style, start by that.
37779     new_path=`cmd //c echo $new_path`
37780 
37781   input_path="$new_path"
37782   # Check if we need to convert this using DOS-style short mode. If the path
37783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37784   # take no chances and rewrite it.
37785   # Note: m4 eats our [], so we need to use [ and ] instead.
37786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37787   if test "x$has_forbidden_chars" != x; then
37788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37789     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37790   fi
37791 
37792     # Output is in $new_path
37793 
37794   windows_path="$new_path"
37795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37796     unix_path=`$CYGPATH -u "$windows_path"`
37797     new_path="$unix_path"
37798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37800     new_path="$unix_path"
37801   fi
37802 
37803     # remove trailing .exe if any
37804     new_path="${new_path/%.exe/}"
37805 
37806     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37807     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37808   fi
37809 
37810     else
37811       # We're on a unix platform. Hooray! :)
37812       # First separate the path from the arguments. This will split at the first
37813       # space.
37814       complete="$MT"
37815       path="${complete%% *}"
37816       tmp="$complete EOL"
37817       arguments="${tmp#* }"
37818 
37819       # Cannot rely on the command "which" here since it doesn't always work.
37820       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37821       if test -z "$is_absolute_path"; then
37822         # Path to executable is not absolute. Find it.
37823         IFS_save="$IFS"
37824         IFS=:
37825         for p in $PATH; do
37826           if test -f "$p/$path" && test -x "$p/$path"; then
37827             new_path="$p/$path"
37828             break
37829           fi
37830         done
37831         IFS="$IFS_save"
37832       else
37833         # This is an absolute path, we can use it without further modifications.
37834         new_path="$path"
37835       fi
37836 
37837       if test "x$new_path" = x; then
37838         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37839 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37840         has_space=`$ECHO "$complete" | $GREP " "`
37841         if test "x$has_space" != x; then
37842           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37843 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37844         fi
37845         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37846       fi
37847     fi
37848 
37849     # Now join together the path and the arguments once again
37850     if test "x$arguments" != xEOL; then
37851       new_complete="$new_path ${arguments% *}"
37852     else
37853       new_complete="$new_path"
37854     fi
37855 
37856     if test "x$complete" != "x$new_complete"; then
37857       MT="$new_complete"
37858       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37859 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37860     fi
37861   fi
37862 
37863     # Setup the resource compiler (RC)
37864     # Extract the first word of "rc", so it can be a program name with args.
37865 set dummy rc; ac_word=$2
37866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37867 $as_echo_n "checking for $ac_word... " >&6; }
37868 if ${ac_cv_prog_RC+:} false; then :
37869   $as_echo_n "(cached) " >&6
37870 else
37871   if test -n "$RC"; then
37872   ac_cv_prog_RC="$RC" # Let the user override the test.
37873 else
37874   ac_prog_rejected=no
37875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37876 for as_dir in $PATH
37877 do
37878   IFS=$as_save_IFS
37879   test -z "$as_dir" && as_dir=.
37880     for ac_exec_ext in '' $ac_executable_extensions; do
37881   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37882     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37883        ac_prog_rejected=yes
37884        continue
37885      fi
37886     ac_cv_prog_RC="rc"
37887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37888     break 2
37889   fi
37890 done
37891   done
37892 IFS=$as_save_IFS
37893 
37894 if test $ac_prog_rejected = yes; then
37895   # We found a bogon in the path, so make sure we never use it.
37896   set dummy $ac_cv_prog_RC
37897   shift
37898   if test $# != 0; then
37899     # We chose a different compiler from the bogus one.
37900     # However, it has the same basename, so the bogon will be chosen
37901     # first if we set RC to just the basename; use the full file name.
37902     shift
37903     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37904   fi
37905 fi
37906 fi
37907 fi
37908 RC=$ac_cv_prog_RC
37909 if test -n "$RC"; then
37910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37911 $as_echo "$RC" >&6; }
37912 else
37913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37914 $as_echo "no" >&6; }
37915 fi
37916 
37917 
37918 
37919   # Only process if variable expands to non-empty
37920 
37921   if test "x$RC" != x; then
37922     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37923 
37924   # First separate the path from the arguments. This will split at the first
37925   # space.
37926   complete="$RC"
37927   path="${complete%% *}"
37928   tmp="$complete EOL"
37929   arguments="${tmp#* }"
37930 
37931   # Input might be given as Windows format, start by converting to
37932   # unix format.
37933   new_path=`$CYGPATH -u "$path"`
37934 
37935   # Now try to locate executable using which
37936   new_path=`$WHICH "$new_path" 2> /dev/null`
37937   # bat and cmd files are not always considered executable in cygwin causing which
37938   # to not find them
37939   if test "x$new_path" = x \
37940       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37941       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37942     new_path=`$CYGPATH -u "$path"`
37943   fi
37944   if test "x$new_path" = x; then
37945     # Oops. Which didn't find the executable.
37946     # The splitting of arguments from the executable at a space might have been incorrect,
37947     # since paths with space are more likely in Windows. Give it another try with the whole
37948     # argument.
37949     path="$complete"
37950     arguments="EOL"
37951     new_path=`$CYGPATH -u "$path"`
37952     new_path=`$WHICH "$new_path" 2> /dev/null`
37953     # bat and cmd files are not always considered executable in cygwin causing which
37954     # to not find them
37955     if test "x$new_path" = x \
37956         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37957         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37958       new_path=`$CYGPATH -u "$path"`
37959     fi
37960     if test "x$new_path" = x; then
37961       # It's still not found. Now this is an unrecoverable error.
37962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37963 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37964       has_space=`$ECHO "$complete" | $GREP " "`
37965       if test "x$has_space" != x; then
37966         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37967 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37968       fi
37969       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37970     fi
37971   fi
37972 
37973   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37974   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37975   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37976   # "foo.exe" is OK but "foo" is an error.
37977   #
37978   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37979   # It is also a way to make sure we got the proper file name for the real test later on.
37980   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37981   if test "x$test_shortpath" = x; then
37982     # Short path failed, file does not exist as specified.
37983     # Try adding .exe or .cmd
37984     if test -f "${new_path}.exe"; then
37985       input_to_shortpath="${new_path}.exe"
37986     elif test -f "${new_path}.cmd"; then
37987       input_to_shortpath="${new_path}.cmd"
37988     else
37989       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37990 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37991       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37992 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37993       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37994     fi
37995   else
37996     input_to_shortpath="$new_path"
37997   fi
37998 
37999   # Call helper function which possibly converts this using DOS-style short mode.
38000   # If so, the updated path is stored in $new_path.
38001   new_path="$input_to_shortpath"
38002 
38003   input_path="$input_to_shortpath"
38004   # Check if we need to convert this using DOS-style short mode. If the path
38005   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38006   # take no chances and rewrite it.
38007   # Note: m4 eats our [], so we need to use [ and ] instead.
38008   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38009   if test "x$has_forbidden_chars" != x; then
38010     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38011     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38012     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38013     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38014       # Going to short mode and back again did indeed matter. Since short mode is
38015       # case insensitive, let's make it lowercase to improve readability.
38016       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38017       # Now convert it back to Unix-style (cygpath)
38018       input_path=`$CYGPATH -u "$shortmode_path"`
38019       new_path="$input_path"
38020     fi
38021   fi
38022 
38023   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38024   if test "x$test_cygdrive_prefix" = x; then
38025     # As a simple fix, exclude /usr/bin since it's not a real path.
38026     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38027       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38028       # a path prefixed by /cygdrive for fixpath to work.
38029       new_path="$CYGWIN_ROOT_PATH$input_path"
38030     fi
38031   fi
38032 
38033   # remove trailing .exe if any
38034   new_path="${new_path/%.exe/}"
38035 
38036     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38037 
38038   # First separate the path from the arguments. This will split at the first
38039   # space.
38040   complete="$RC"
38041   path="${complete%% *}"
38042   tmp="$complete EOL"
38043   arguments="${tmp#* }"
38044 
38045   # Input might be given as Windows format, start by converting to
38046   # unix format.
38047   new_path="$path"
38048 
38049   windows_path="$new_path"
38050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38051     unix_path=`$CYGPATH -u "$windows_path"`
38052     new_path="$unix_path"
38053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38054     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38055     new_path="$unix_path"
38056   fi
38057 
38058 
38059   # Now try to locate executable using which
38060   new_path=`$WHICH "$new_path" 2> /dev/null`
38061 
38062   if test "x$new_path" = x; then
38063     # Oops. Which didn't find the executable.
38064     # The splitting of arguments from the executable at a space might have been incorrect,
38065     # since paths with space are more likely in Windows. Give it another try with the whole
38066     # argument.
38067     path="$complete"
38068     arguments="EOL"
38069     new_path="$path"
38070 
38071   windows_path="$new_path"
38072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38073     unix_path=`$CYGPATH -u "$windows_path"`
38074     new_path="$unix_path"
38075   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38076     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38077     new_path="$unix_path"
38078   fi
38079 
38080 
38081     new_path=`$WHICH "$new_path" 2> /dev/null`
38082     # bat and cmd files are not always considered executable in MSYS causing which
38083     # to not find them
38084     if test "x$new_path" = x \
38085         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38086         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38087       new_path="$path"
38088 
38089   windows_path="$new_path"
38090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38091     unix_path=`$CYGPATH -u "$windows_path"`
38092     new_path="$unix_path"
38093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38094     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38095     new_path="$unix_path"
38096   fi
38097 
38098     fi
38099 
38100     if test "x$new_path" = x; then
38101       # It's still not found. Now this is an unrecoverable error.
38102       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38103 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38104       has_space=`$ECHO "$complete" | $GREP " "`
38105       if test "x$has_space" != x; then
38106         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38107 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38108       fi
38109       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38110     fi
38111   fi
38112 
38113   # Now new_path has a complete unix path to the binary
38114   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38115     # Keep paths in /bin as-is, but remove trailing .exe if any
38116     new_path="${new_path/%.exe/}"
38117     # Do not save /bin paths to all_fixpath_prefixes!
38118   else
38119     # Not in mixed or Windows style, start by that.
38120     new_path=`cmd //c echo $new_path`
38121 
38122   input_path="$new_path"
38123   # Check if we need to convert this using DOS-style short mode. If the path
38124   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38125   # take no chances and rewrite it.
38126   # Note: m4 eats our [], so we need to use [ and ] instead.
38127   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38128   if test "x$has_forbidden_chars" != x; then
38129     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38130     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38131   fi
38132 
38133     # Output is in $new_path
38134 
38135   windows_path="$new_path"
38136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38137     unix_path=`$CYGPATH -u "$windows_path"`
38138     new_path="$unix_path"
38139   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38140     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38141     new_path="$unix_path"
38142   fi
38143 
38144     # remove trailing .exe if any
38145     new_path="${new_path/%.exe/}"
38146 
38147     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38148     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38149   fi
38150 
38151     else
38152       # We're on a unix platform. Hooray! :)
38153       # First separate the path from the arguments. This will split at the first
38154       # space.
38155       complete="$RC"
38156       path="${complete%% *}"
38157       tmp="$complete EOL"
38158       arguments="${tmp#* }"
38159 
38160       # Cannot rely on the command "which" here since it doesn't always work.
38161       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38162       if test -z "$is_absolute_path"; then
38163         # Path to executable is not absolute. Find it.
38164         IFS_save="$IFS"
38165         IFS=:
38166         for p in $PATH; do
38167           if test -f "$p/$path" && test -x "$p/$path"; then
38168             new_path="$p/$path"
38169             break
38170           fi
38171         done
38172         IFS="$IFS_save"
38173       else
38174         # This is an absolute path, we can use it without further modifications.
38175         new_path="$path"
38176       fi
38177 
38178       if test "x$new_path" = x; then
38179         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38180 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38181         has_space=`$ECHO "$complete" | $GREP " "`
38182         if test "x$has_space" != x; then
38183           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38184 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38185         fi
38186         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38187       fi
38188     fi
38189 
38190     # Now join together the path and the arguments once again
38191     if test "x$arguments" != xEOL; then
38192       new_complete="$new_path ${arguments% *}"
38193     else
38194       new_complete="$new_path"
38195     fi
38196 
38197     if test "x$complete" != "x$new_complete"; then
38198       RC="$new_complete"
38199       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38200 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38201     fi
38202   fi
38203 
38204     # Extract the first word of "dumpbin", so it can be a program name with args.
38205 set dummy dumpbin; ac_word=$2
38206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38207 $as_echo_n "checking for $ac_word... " >&6; }
38208 if ${ac_cv_prog_DUMPBIN+:} false; then :
38209   $as_echo_n "(cached) " >&6
38210 else
38211   if test -n "$DUMPBIN"; then
38212   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38213 else
38214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38215 for as_dir in $PATH
38216 do
38217   IFS=$as_save_IFS
38218   test -z "$as_dir" && as_dir=.
38219     for ac_exec_ext in '' $ac_executable_extensions; do
38220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38221     ac_cv_prog_DUMPBIN="dumpbin"
38222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38223     break 2
38224   fi
38225 done
38226   done
38227 IFS=$as_save_IFS
38228 
38229 fi
38230 fi
38231 DUMPBIN=$ac_cv_prog_DUMPBIN
38232 if test -n "$DUMPBIN"; then
38233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38234 $as_echo "$DUMPBIN" >&6; }
38235 else
38236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38237 $as_echo "no" >&6; }
38238 fi
38239 
38240 
38241 
38242   # Only process if variable expands to non-empty
38243 
38244   if test "x$DUMPBIN" != x; then
38245     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38246 
38247   # First separate the path from the arguments. This will split at the first
38248   # space.
38249   complete="$DUMPBIN"
38250   path="${complete%% *}"
38251   tmp="$complete EOL"
38252   arguments="${tmp#* }"
38253 
38254   # Input might be given as Windows format, start by converting to
38255   # unix format.
38256   new_path=`$CYGPATH -u "$path"`
38257 
38258   # Now try to locate executable using which
38259   new_path=`$WHICH "$new_path" 2> /dev/null`
38260   # bat and cmd files are not always considered executable in cygwin causing which
38261   # to not find them
38262   if test "x$new_path" = x \
38263       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38264       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38265     new_path=`$CYGPATH -u "$path"`
38266   fi
38267   if test "x$new_path" = x; then
38268     # Oops. Which didn't find the executable.
38269     # The splitting of arguments from the executable at a space might have been incorrect,
38270     # since paths with space are more likely in Windows. Give it another try with the whole
38271     # argument.
38272     path="$complete"
38273     arguments="EOL"
38274     new_path=`$CYGPATH -u "$path"`
38275     new_path=`$WHICH "$new_path" 2> /dev/null`
38276     # bat and cmd files are not always considered executable in cygwin causing which
38277     # to not find them
38278     if test "x$new_path" = x \
38279         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38280         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38281       new_path=`$CYGPATH -u "$path"`
38282     fi
38283     if test "x$new_path" = x; then
38284       # It's still not found. Now this is an unrecoverable error.
38285       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38286 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38287       has_space=`$ECHO "$complete" | $GREP " "`
38288       if test "x$has_space" != x; then
38289         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38290 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38291       fi
38292       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38293     fi
38294   fi
38295 
38296   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38297   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38298   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38299   # "foo.exe" is OK but "foo" is an error.
38300   #
38301   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38302   # It is also a way to make sure we got the proper file name for the real test later on.
38303   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38304   if test "x$test_shortpath" = x; then
38305     # Short path failed, file does not exist as specified.
38306     # Try adding .exe or .cmd
38307     if test -f "${new_path}.exe"; then
38308       input_to_shortpath="${new_path}.exe"
38309     elif test -f "${new_path}.cmd"; then
38310       input_to_shortpath="${new_path}.cmd"
38311     else
38312       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38313 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38314       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38315 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38316       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38317     fi
38318   else
38319     input_to_shortpath="$new_path"
38320   fi
38321 
38322   # Call helper function which possibly converts this using DOS-style short mode.
38323   # If so, the updated path is stored in $new_path.
38324   new_path="$input_to_shortpath"
38325 
38326   input_path="$input_to_shortpath"
38327   # Check if we need to convert this using DOS-style short mode. If the path
38328   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38329   # take no chances and rewrite it.
38330   # Note: m4 eats our [], so we need to use [ and ] instead.
38331   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38332   if test "x$has_forbidden_chars" != x; then
38333     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38334     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38335     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38336     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38337       # Going to short mode and back again did indeed matter. Since short mode is
38338       # case insensitive, let's make it lowercase to improve readability.
38339       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38340       # Now convert it back to Unix-style (cygpath)
38341       input_path=`$CYGPATH -u "$shortmode_path"`
38342       new_path="$input_path"
38343     fi
38344   fi
38345 
38346   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38347   if test "x$test_cygdrive_prefix" = x; then
38348     # As a simple fix, exclude /usr/bin since it's not a real path.
38349     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38350       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38351       # a path prefixed by /cygdrive for fixpath to work.
38352       new_path="$CYGWIN_ROOT_PATH$input_path"
38353     fi
38354   fi
38355 
38356   # remove trailing .exe if any
38357   new_path="${new_path/%.exe/}"
38358 
38359     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38360 
38361   # First separate the path from the arguments. This will split at the first
38362   # space.
38363   complete="$DUMPBIN"
38364   path="${complete%% *}"
38365   tmp="$complete EOL"
38366   arguments="${tmp#* }"
38367 
38368   # Input might be given as Windows format, start by converting to
38369   # unix format.
38370   new_path="$path"
38371 
38372   windows_path="$new_path"
38373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38374     unix_path=`$CYGPATH -u "$windows_path"`
38375     new_path="$unix_path"
38376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38378     new_path="$unix_path"
38379   fi
38380 
38381 
38382   # Now try to locate executable using which
38383   new_path=`$WHICH "$new_path" 2> /dev/null`
38384 
38385   if test "x$new_path" = x; then
38386     # Oops. Which didn't find the executable.
38387     # The splitting of arguments from the executable at a space might have been incorrect,
38388     # since paths with space are more likely in Windows. Give it another try with the whole
38389     # argument.
38390     path="$complete"
38391     arguments="EOL"
38392     new_path="$path"
38393 
38394   windows_path="$new_path"
38395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38396     unix_path=`$CYGPATH -u "$windows_path"`
38397     new_path="$unix_path"
38398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38400     new_path="$unix_path"
38401   fi
38402 
38403 
38404     new_path=`$WHICH "$new_path" 2> /dev/null`
38405     # bat and cmd files are not always considered executable in MSYS causing which
38406     # to not find them
38407     if test "x$new_path" = x \
38408         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38409         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38410       new_path="$path"
38411 
38412   windows_path="$new_path"
38413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38414     unix_path=`$CYGPATH -u "$windows_path"`
38415     new_path="$unix_path"
38416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38418     new_path="$unix_path"
38419   fi
38420 
38421     fi
38422 
38423     if test "x$new_path" = x; then
38424       # It's still not found. Now this is an unrecoverable error.
38425       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38426 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38427       has_space=`$ECHO "$complete" | $GREP " "`
38428       if test "x$has_space" != x; then
38429         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38430 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38431       fi
38432       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38433     fi
38434   fi
38435 
38436   # Now new_path has a complete unix path to the binary
38437   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38438     # Keep paths in /bin as-is, but remove trailing .exe if any
38439     new_path="${new_path/%.exe/}"
38440     # Do not save /bin paths to all_fixpath_prefixes!
38441   else
38442     # Not in mixed or Windows style, start by that.
38443     new_path=`cmd //c echo $new_path`
38444 
38445   input_path="$new_path"
38446   # Check if we need to convert this using DOS-style short mode. If the path
38447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38448   # take no chances and rewrite it.
38449   # Note: m4 eats our [], so we need to use [ and ] instead.
38450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38451   if test "x$has_forbidden_chars" != x; then
38452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38453     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38454   fi
38455 
38456     # Output is in $new_path
38457 
38458   windows_path="$new_path"
38459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38460     unix_path=`$CYGPATH -u "$windows_path"`
38461     new_path="$unix_path"
38462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38464     new_path="$unix_path"
38465   fi
38466 
38467     # remove trailing .exe if any
38468     new_path="${new_path/%.exe/}"
38469 
38470     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38471     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38472   fi
38473 
38474     else
38475       # We're on a unix platform. Hooray! :)
38476       # First separate the path from the arguments. This will split at the first
38477       # space.
38478       complete="$DUMPBIN"
38479       path="${complete%% *}"
38480       tmp="$complete EOL"
38481       arguments="${tmp#* }"
38482 
38483       # Cannot rely on the command "which" here since it doesn't always work.
38484       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38485       if test -z "$is_absolute_path"; then
38486         # Path to executable is not absolute. Find it.
38487         IFS_save="$IFS"
38488         IFS=:
38489         for p in $PATH; do
38490           if test -f "$p/$path" && test -x "$p/$path"; then
38491             new_path="$p/$path"
38492             break
38493           fi
38494         done
38495         IFS="$IFS_save"
38496       else
38497         # This is an absolute path, we can use it without further modifications.
38498         new_path="$path"
38499       fi
38500 
38501       if test "x$new_path" = x; then
38502         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38503 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38504         has_space=`$ECHO "$complete" | $GREP " "`
38505         if test "x$has_space" != x; then
38506           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38507 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38508         fi
38509         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38510       fi
38511     fi
38512 
38513     # Now join together the path and the arguments once again
38514     if test "x$arguments" != xEOL; then
38515       new_complete="$new_path ${arguments% *}"
38516     else
38517       new_complete="$new_path"
38518     fi
38519 
38520     if test "x$complete" != "x$new_complete"; then
38521       DUMPBIN="$new_complete"
38522       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38523 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38524     fi
38525   fi
38526 
38527     # We need to check for 'msbuild.exe' because at the place where we expect to
38528     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38529     # won't find the 'msbuild.exe' executable in that case (and the
38530     # 'ac_executable_extensions' is unusable due to performance reasons).
38531     # Notice that we intentionally don't fix up the path to MSBUILD because we
38532     # will call it in a DOS shell during freetype detection on Windows (see
38533     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38534     # Extract the first word of "msbuild.exe", so it can be a program name with args.
38535 set dummy msbuild.exe; ac_word=$2
38536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38537 $as_echo_n "checking for $ac_word... " >&6; }
38538 if ${ac_cv_prog_MSBUILD+:} false; then :
38539   $as_echo_n "(cached) " >&6
38540 else
38541   if test -n "$MSBUILD"; then
38542   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38543 else
38544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38545 for as_dir in $PATH
38546 do
38547   IFS=$as_save_IFS
38548   test -z "$as_dir" && as_dir=.
38549     for ac_exec_ext in '' $ac_executable_extensions; do
38550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38551     ac_cv_prog_MSBUILD="msbuild.exe"
38552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38553     break 2
38554   fi
38555 done
38556   done
38557 IFS=$as_save_IFS
38558 
38559 fi
38560 fi
38561 MSBUILD=$ac_cv_prog_MSBUILD
38562 if test -n "$MSBUILD"; then
38563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38564 $as_echo "$MSBUILD" >&6; }
38565 else
38566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38567 $as_echo "no" >&6; }
38568 fi
38569 
38570 
38571   fi
38572 
38573   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38574 
38575 
38576   # Publish this variable in the help.
38577 
38578 
38579   if [ -z "${STRIP+x}" ]; then
38580     # The variable is not set by user, try to locate tool using the code snippet
38581     for ac_prog in strip
38582 do
38583   # Extract the first word of "$ac_prog", so it can be a program name with args.
38584 set dummy $ac_prog; ac_word=$2
38585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38586 $as_echo_n "checking for $ac_word... " >&6; }
38587 if ${ac_cv_path_STRIP+:} false; then :
38588   $as_echo_n "(cached) " >&6
38589 else
38590   case $STRIP in
38591   [\\/]* | ?:[\\/]*)
38592   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38593   ;;
38594   *)
38595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38596 for as_dir in $PATH
38597 do
38598   IFS=$as_save_IFS
38599   test -z "$as_dir" && as_dir=.
38600     for ac_exec_ext in '' $ac_executable_extensions; do
38601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38602     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38604     break 2
38605   fi
38606 done
38607   done
38608 IFS=$as_save_IFS
38609 
38610   ;;
38611 esac
38612 fi
38613 STRIP=$ac_cv_path_STRIP
38614 if test -n "$STRIP"; then
38615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38616 $as_echo "$STRIP" >&6; }
38617 else
38618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38619 $as_echo "no" >&6; }
38620 fi
38621 
38622 
38623   test -n "$STRIP" && break
38624 done
38625 
38626   else
38627     # The variable is set, but is it from the command line or the environment?
38628 
38629     # Try to remove the string !STRIP! from our list.
38630     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38631     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38632       # If it failed, the variable was not from the command line. Ignore it,
38633       # but warn the user (except for BASH, which is always set by the calling BASH).
38634       if test "xSTRIP" != xBASH; then
38635         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38636 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38637       fi
38638       # Try to locate tool using the code snippet
38639       for ac_prog in strip
38640 do
38641   # Extract the first word of "$ac_prog", so it can be a program name with args.
38642 set dummy $ac_prog; ac_word=$2
38643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38644 $as_echo_n "checking for $ac_word... " >&6; }
38645 if ${ac_cv_path_STRIP+:} false; then :
38646   $as_echo_n "(cached) " >&6
38647 else
38648   case $STRIP in
38649   [\\/]* | ?:[\\/]*)
38650   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38651   ;;
38652   *)
38653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38654 for as_dir in $PATH
38655 do
38656   IFS=$as_save_IFS
38657   test -z "$as_dir" && as_dir=.
38658     for ac_exec_ext in '' $ac_executable_extensions; do
38659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38660     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38662     break 2
38663   fi
38664 done
38665   done
38666 IFS=$as_save_IFS
38667 
38668   ;;
38669 esac
38670 fi
38671 STRIP=$ac_cv_path_STRIP
38672 if test -n "$STRIP"; then
38673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38674 $as_echo "$STRIP" >&6; }
38675 else
38676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38677 $as_echo "no" >&6; }
38678 fi
38679 
38680 
38681   test -n "$STRIP" && break
38682 done
38683 
38684     else
38685       # If it succeeded, then it was overridden by the user. We will use it
38686       # for the tool.
38687 
38688       # First remove it from the list of overridden variables, so we can test
38689       # for unknown variables in the end.
38690       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38691 
38692       # Check if we try to supply an empty value
38693       if test "x$STRIP" = x; then
38694         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38695 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38696         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38697 $as_echo_n "checking for STRIP... " >&6; }
38698         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38699 $as_echo "disabled" >&6; }
38700       else
38701         # Check if the provided tool contains a complete path.
38702         tool_specified="$STRIP"
38703         tool_basename="${tool_specified##*/}"
38704         if test "x$tool_basename" = "x$tool_specified"; then
38705           # A command without a complete path is provided, search $PATH.
38706           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38707 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38708           # Extract the first word of "$tool_basename", so it can be a program name with args.
38709 set dummy $tool_basename; ac_word=$2
38710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38711 $as_echo_n "checking for $ac_word... " >&6; }
38712 if ${ac_cv_path_STRIP+:} false; then :
38713   $as_echo_n "(cached) " >&6
38714 else
38715   case $STRIP in
38716   [\\/]* | ?:[\\/]*)
38717   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38718   ;;
38719   *)
38720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38721 for as_dir in $PATH
38722 do
38723   IFS=$as_save_IFS
38724   test -z "$as_dir" && as_dir=.
38725     for ac_exec_ext in '' $ac_executable_extensions; do
38726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38727     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38729     break 2
38730   fi
38731 done
38732   done
38733 IFS=$as_save_IFS
38734 
38735   ;;
38736 esac
38737 fi
38738 STRIP=$ac_cv_path_STRIP
38739 if test -n "$STRIP"; then
38740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38741 $as_echo "$STRIP" >&6; }
38742 else
38743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38744 $as_echo "no" >&6; }
38745 fi
38746 
38747 
38748           if test "x$STRIP" = x; then
38749             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38750           fi
38751         else
38752           # Otherwise we believe it is a complete path. Use it as it is.
38753           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38754 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38755           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38756 $as_echo_n "checking for STRIP... " >&6; }
38757           if test ! -x "$tool_specified"; then
38758             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38759 $as_echo "not found" >&6; }
38760             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38761           fi
38762           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38763 $as_echo "$tool_specified" >&6; }
38764         fi
38765       fi
38766     fi
38767 
38768   fi
38769 
38770 
38771 
38772   # Only process if variable expands to non-empty
38773 
38774   if test "x$STRIP" != x; then
38775     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38776 
38777   # First separate the path from the arguments. This will split at the first
38778   # space.
38779   complete="$STRIP"
38780   path="${complete%% *}"
38781   tmp="$complete EOL"
38782   arguments="${tmp#* }"
38783 
38784   # Input might be given as Windows format, start by converting to
38785   # unix format.
38786   new_path=`$CYGPATH -u "$path"`
38787 
38788   # Now try to locate executable using which
38789   new_path=`$WHICH "$new_path" 2> /dev/null`
38790   # bat and cmd files are not always considered executable in cygwin causing which
38791   # to not find them
38792   if test "x$new_path" = x \
38793       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38794       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38795     new_path=`$CYGPATH -u "$path"`
38796   fi
38797   if test "x$new_path" = x; then
38798     # Oops. Which didn't find the executable.
38799     # The splitting of arguments from the executable at a space might have been incorrect,
38800     # since paths with space are more likely in Windows. Give it another try with the whole
38801     # argument.
38802     path="$complete"
38803     arguments="EOL"
38804     new_path=`$CYGPATH -u "$path"`
38805     new_path=`$WHICH "$new_path" 2> /dev/null`
38806     # bat and cmd files are not always considered executable in cygwin causing which
38807     # to not find them
38808     if test "x$new_path" = x \
38809         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38810         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38811       new_path=`$CYGPATH -u "$path"`
38812     fi
38813     if test "x$new_path" = x; then
38814       # It's still not found. Now this is an unrecoverable error.
38815       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38816 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38817       has_space=`$ECHO "$complete" | $GREP " "`
38818       if test "x$has_space" != x; then
38819         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38820 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38821       fi
38822       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38823     fi
38824   fi
38825 
38826   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38827   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38828   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38829   # "foo.exe" is OK but "foo" is an error.
38830   #
38831   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38832   # It is also a way to make sure we got the proper file name for the real test later on.
38833   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38834   if test "x$test_shortpath" = x; then
38835     # Short path failed, file does not exist as specified.
38836     # Try adding .exe or .cmd
38837     if test -f "${new_path}.exe"; then
38838       input_to_shortpath="${new_path}.exe"
38839     elif test -f "${new_path}.cmd"; then
38840       input_to_shortpath="${new_path}.cmd"
38841     else
38842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38843 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38844       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38845 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38846       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38847     fi
38848   else
38849     input_to_shortpath="$new_path"
38850   fi
38851 
38852   # Call helper function which possibly converts this using DOS-style short mode.
38853   # If so, the updated path is stored in $new_path.
38854   new_path="$input_to_shortpath"
38855 
38856   input_path="$input_to_shortpath"
38857   # Check if we need to convert this using DOS-style short mode. If the path
38858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38859   # take no chances and rewrite it.
38860   # Note: m4 eats our [], so we need to use [ and ] instead.
38861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38862   if test "x$has_forbidden_chars" != x; then
38863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38864     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38865     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38866     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38867       # Going to short mode and back again did indeed matter. Since short mode is
38868       # case insensitive, let's make it lowercase to improve readability.
38869       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38870       # Now convert it back to Unix-style (cygpath)
38871       input_path=`$CYGPATH -u "$shortmode_path"`
38872       new_path="$input_path"
38873     fi
38874   fi
38875 
38876   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38877   if test "x$test_cygdrive_prefix" = x; then
38878     # As a simple fix, exclude /usr/bin since it's not a real path.
38879     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38880       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38881       # a path prefixed by /cygdrive for fixpath to work.
38882       new_path="$CYGWIN_ROOT_PATH$input_path"
38883     fi
38884   fi
38885 
38886   # remove trailing .exe if any
38887   new_path="${new_path/%.exe/}"
38888 
38889     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38890 
38891   # First separate the path from the arguments. This will split at the first
38892   # space.
38893   complete="$STRIP"
38894   path="${complete%% *}"
38895   tmp="$complete EOL"
38896   arguments="${tmp#* }"
38897 
38898   # Input might be given as Windows format, start by converting to
38899   # unix format.
38900   new_path="$path"
38901 
38902   windows_path="$new_path"
38903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38904     unix_path=`$CYGPATH -u "$windows_path"`
38905     new_path="$unix_path"
38906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38908     new_path="$unix_path"
38909   fi
38910 
38911 
38912   # Now try to locate executable using which
38913   new_path=`$WHICH "$new_path" 2> /dev/null`
38914 
38915   if test "x$new_path" = x; then
38916     # Oops. Which didn't find the executable.
38917     # The splitting of arguments from the executable at a space might have been incorrect,
38918     # since paths with space are more likely in Windows. Give it another try with the whole
38919     # argument.
38920     path="$complete"
38921     arguments="EOL"
38922     new_path="$path"
38923 
38924   windows_path="$new_path"
38925   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38926     unix_path=`$CYGPATH -u "$windows_path"`
38927     new_path="$unix_path"
38928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38929     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38930     new_path="$unix_path"
38931   fi
38932 
38933 
38934     new_path=`$WHICH "$new_path" 2> /dev/null`
38935     # bat and cmd files are not always considered executable in MSYS causing which
38936     # to not find them
38937     if test "x$new_path" = x \
38938         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38939         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38940       new_path="$path"
38941 
38942   windows_path="$new_path"
38943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38944     unix_path=`$CYGPATH -u "$windows_path"`
38945     new_path="$unix_path"
38946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38948     new_path="$unix_path"
38949   fi
38950 
38951     fi
38952 
38953     if test "x$new_path" = x; then
38954       # It's still not found. Now this is an unrecoverable error.
38955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38956 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38957       has_space=`$ECHO "$complete" | $GREP " "`
38958       if test "x$has_space" != x; then
38959         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38961       fi
38962       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38963     fi
38964   fi
38965 
38966   # Now new_path has a complete unix path to the binary
38967   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38968     # Keep paths in /bin as-is, but remove trailing .exe if any
38969     new_path="${new_path/%.exe/}"
38970     # Do not save /bin paths to all_fixpath_prefixes!
38971   else
38972     # Not in mixed or Windows style, start by that.
38973     new_path=`cmd //c echo $new_path`
38974 
38975   input_path="$new_path"
38976   # Check if we need to convert this using DOS-style short mode. If the path
38977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38978   # take no chances and rewrite it.
38979   # Note: m4 eats our [], so we need to use [ and ] instead.
38980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38981   if test "x$has_forbidden_chars" != x; then
38982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38983     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38984   fi
38985 
38986     # Output is in $new_path
38987 
38988   windows_path="$new_path"
38989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38990     unix_path=`$CYGPATH -u "$windows_path"`
38991     new_path="$unix_path"
38992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38994     new_path="$unix_path"
38995   fi
38996 
38997     # remove trailing .exe if any
38998     new_path="${new_path/%.exe/}"
38999 
39000     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39001     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39002   fi
39003 
39004     else
39005       # We're on a unix platform. Hooray! :)
39006       # First separate the path from the arguments. This will split at the first
39007       # space.
39008       complete="$STRIP"
39009       path="${complete%% *}"
39010       tmp="$complete EOL"
39011       arguments="${tmp#* }"
39012 
39013       # Cannot rely on the command "which" here since it doesn't always work.
39014       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39015       if test -z "$is_absolute_path"; then
39016         # Path to executable is not absolute. Find it.
39017         IFS_save="$IFS"
39018         IFS=:
39019         for p in $PATH; do
39020           if test -f "$p/$path" && test -x "$p/$path"; then
39021             new_path="$p/$path"
39022             break
39023           fi
39024         done
39025         IFS="$IFS_save"
39026       else
39027         # This is an absolute path, we can use it without further modifications.
39028         new_path="$path"
39029       fi
39030 
39031       if test "x$new_path" = x; then
39032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39033 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39034         has_space=`$ECHO "$complete" | $GREP " "`
39035         if test "x$has_space" != x; then
39036           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39037 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39038         fi
39039         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39040       fi
39041     fi
39042 
39043     # Now join together the path and the arguments once again
39044     if test "x$arguments" != xEOL; then
39045       new_complete="$new_path ${arguments% *}"
39046     else
39047       new_complete="$new_path"
39048     fi
39049 
39050     if test "x$complete" != "x$new_complete"; then
39051       STRIP="$new_complete"
39052       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39053 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39054     fi
39055   fi
39056 
39057 
39058 
39059   # Publish this variable in the help.
39060 
39061 
39062   if [ -z "${NM+x}" ]; then
39063     # The variable is not set by user, try to locate tool using the code snippet
39064     for ac_prog in nm
39065 do
39066   # Extract the first word of "$ac_prog", so it can be a program name with args.
39067 set dummy $ac_prog; ac_word=$2
39068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39069 $as_echo_n "checking for $ac_word... " >&6; }
39070 if ${ac_cv_path_NM+:} false; then :
39071   $as_echo_n "(cached) " >&6
39072 else
39073   case $NM in
39074   [\\/]* | ?:[\\/]*)
39075   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39076   ;;
39077   *)
39078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39079 for as_dir in $PATH
39080 do
39081   IFS=$as_save_IFS
39082   test -z "$as_dir" && as_dir=.
39083     for ac_exec_ext in '' $ac_executable_extensions; do
39084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39085     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39087     break 2
39088   fi
39089 done
39090   done
39091 IFS=$as_save_IFS
39092 
39093   ;;
39094 esac
39095 fi
39096 NM=$ac_cv_path_NM
39097 if test -n "$NM"; then
39098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39099 $as_echo "$NM" >&6; }
39100 else
39101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39102 $as_echo "no" >&6; }
39103 fi
39104 
39105 
39106   test -n "$NM" && break
39107 done
39108 
39109   else
39110     # The variable is set, but is it from the command line or the environment?
39111 
39112     # Try to remove the string !NM! from our list.
39113     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39114     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39115       # If it failed, the variable was not from the command line. Ignore it,
39116       # but warn the user (except for BASH, which is always set by the calling BASH).
39117       if test "xNM" != xBASH; then
39118         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39119 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39120       fi
39121       # Try to locate tool using the code snippet
39122       for ac_prog in nm
39123 do
39124   # Extract the first word of "$ac_prog", so it can be a program name with args.
39125 set dummy $ac_prog; ac_word=$2
39126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39127 $as_echo_n "checking for $ac_word... " >&6; }
39128 if ${ac_cv_path_NM+:} false; then :
39129   $as_echo_n "(cached) " >&6
39130 else
39131   case $NM in
39132   [\\/]* | ?:[\\/]*)
39133   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39134   ;;
39135   *)
39136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39137 for as_dir in $PATH
39138 do
39139   IFS=$as_save_IFS
39140   test -z "$as_dir" && as_dir=.
39141     for ac_exec_ext in '' $ac_executable_extensions; do
39142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39143     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39145     break 2
39146   fi
39147 done
39148   done
39149 IFS=$as_save_IFS
39150 
39151   ;;
39152 esac
39153 fi
39154 NM=$ac_cv_path_NM
39155 if test -n "$NM"; then
39156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39157 $as_echo "$NM" >&6; }
39158 else
39159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39160 $as_echo "no" >&6; }
39161 fi
39162 
39163 
39164   test -n "$NM" && break
39165 done
39166 
39167     else
39168       # If it succeeded, then it was overridden by the user. We will use it
39169       # for the tool.
39170 
39171       # First remove it from the list of overridden variables, so we can test
39172       # for unknown variables in the end.
39173       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39174 
39175       # Check if we try to supply an empty value
39176       if test "x$NM" = x; then
39177         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39178 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39179         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39180 $as_echo_n "checking for NM... " >&6; }
39181         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39182 $as_echo "disabled" >&6; }
39183       else
39184         # Check if the provided tool contains a complete path.
39185         tool_specified="$NM"
39186         tool_basename="${tool_specified##*/}"
39187         if test "x$tool_basename" = "x$tool_specified"; then
39188           # A command without a complete path is provided, search $PATH.
39189           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39190 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39191           # Extract the first word of "$tool_basename", so it can be a program name with args.
39192 set dummy $tool_basename; ac_word=$2
39193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39194 $as_echo_n "checking for $ac_word... " >&6; }
39195 if ${ac_cv_path_NM+:} false; then :
39196   $as_echo_n "(cached) " >&6
39197 else
39198   case $NM in
39199   [\\/]* | ?:[\\/]*)
39200   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39201   ;;
39202   *)
39203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39204 for as_dir in $PATH
39205 do
39206   IFS=$as_save_IFS
39207   test -z "$as_dir" && as_dir=.
39208     for ac_exec_ext in '' $ac_executable_extensions; do
39209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39210     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39212     break 2
39213   fi
39214 done
39215   done
39216 IFS=$as_save_IFS
39217 
39218   ;;
39219 esac
39220 fi
39221 NM=$ac_cv_path_NM
39222 if test -n "$NM"; then
39223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39224 $as_echo "$NM" >&6; }
39225 else
39226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39227 $as_echo "no" >&6; }
39228 fi
39229 
39230 
39231           if test "x$NM" = x; then
39232             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39233           fi
39234         else
39235           # Otherwise we believe it is a complete path. Use it as it is.
39236           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39237 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39238           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39239 $as_echo_n "checking for NM... " >&6; }
39240           if test ! -x "$tool_specified"; then
39241             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39242 $as_echo "not found" >&6; }
39243             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39244           fi
39245           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39246 $as_echo "$tool_specified" >&6; }
39247         fi
39248       fi
39249     fi
39250 
39251   fi
39252 
39253 
39254 
39255   # Only process if variable expands to non-empty
39256 
39257   if test "x$NM" != x; then
39258     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39259 
39260   # First separate the path from the arguments. This will split at the first
39261   # space.
39262   complete="$NM"
39263   path="${complete%% *}"
39264   tmp="$complete EOL"
39265   arguments="${tmp#* }"
39266 
39267   # Input might be given as Windows format, start by converting to
39268   # unix format.
39269   new_path=`$CYGPATH -u "$path"`
39270 
39271   # Now try to locate executable using which
39272   new_path=`$WHICH "$new_path" 2> /dev/null`
39273   # bat and cmd files are not always considered executable in cygwin causing which
39274   # to not find them
39275   if test "x$new_path" = x \
39276       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39277       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39278     new_path=`$CYGPATH -u "$path"`
39279   fi
39280   if test "x$new_path" = x; then
39281     # Oops. Which didn't find the executable.
39282     # The splitting of arguments from the executable at a space might have been incorrect,
39283     # since paths with space are more likely in Windows. Give it another try with the whole
39284     # argument.
39285     path="$complete"
39286     arguments="EOL"
39287     new_path=`$CYGPATH -u "$path"`
39288     new_path=`$WHICH "$new_path" 2> /dev/null`
39289     # bat and cmd files are not always considered executable in cygwin causing which
39290     # to not find them
39291     if test "x$new_path" = x \
39292         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39293         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39294       new_path=`$CYGPATH -u "$path"`
39295     fi
39296     if test "x$new_path" = x; then
39297       # It's still not found. Now this is an unrecoverable error.
39298       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39299 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39300       has_space=`$ECHO "$complete" | $GREP " "`
39301       if test "x$has_space" != x; then
39302         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39303 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39304       fi
39305       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39306     fi
39307   fi
39308 
39309   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39310   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39311   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39312   # "foo.exe" is OK but "foo" is an error.
39313   #
39314   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39315   # It is also a way to make sure we got the proper file name for the real test later on.
39316   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39317   if test "x$test_shortpath" = x; then
39318     # Short path failed, file does not exist as specified.
39319     # Try adding .exe or .cmd
39320     if test -f "${new_path}.exe"; then
39321       input_to_shortpath="${new_path}.exe"
39322     elif test -f "${new_path}.cmd"; then
39323       input_to_shortpath="${new_path}.cmd"
39324     else
39325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39326 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39327       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39328 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39329       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39330     fi
39331   else
39332     input_to_shortpath="$new_path"
39333   fi
39334 
39335   # Call helper function which possibly converts this using DOS-style short mode.
39336   # If so, the updated path is stored in $new_path.
39337   new_path="$input_to_shortpath"
39338 
39339   input_path="$input_to_shortpath"
39340   # Check if we need to convert this using DOS-style short mode. If the path
39341   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39342   # take no chances and rewrite it.
39343   # Note: m4 eats our [], so we need to use [ and ] instead.
39344   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39345   if test "x$has_forbidden_chars" != x; then
39346     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39347     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39348     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39349     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39350       # Going to short mode and back again did indeed matter. Since short mode is
39351       # case insensitive, let's make it lowercase to improve readability.
39352       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39353       # Now convert it back to Unix-style (cygpath)
39354       input_path=`$CYGPATH -u "$shortmode_path"`
39355       new_path="$input_path"
39356     fi
39357   fi
39358 
39359   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39360   if test "x$test_cygdrive_prefix" = x; then
39361     # As a simple fix, exclude /usr/bin since it's not a real path.
39362     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39363       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39364       # a path prefixed by /cygdrive for fixpath to work.
39365       new_path="$CYGWIN_ROOT_PATH$input_path"
39366     fi
39367   fi
39368 
39369   # remove trailing .exe if any
39370   new_path="${new_path/%.exe/}"
39371 
39372     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39373 
39374   # First separate the path from the arguments. This will split at the first
39375   # space.
39376   complete="$NM"
39377   path="${complete%% *}"
39378   tmp="$complete EOL"
39379   arguments="${tmp#* }"
39380 
39381   # Input might be given as Windows format, start by converting to
39382   # unix format.
39383   new_path="$path"
39384 
39385   windows_path="$new_path"
39386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39387     unix_path=`$CYGPATH -u "$windows_path"`
39388     new_path="$unix_path"
39389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39391     new_path="$unix_path"
39392   fi
39393 
39394 
39395   # Now try to locate executable using which
39396   new_path=`$WHICH "$new_path" 2> /dev/null`
39397 
39398   if test "x$new_path" = x; then
39399     # Oops. Which didn't find the executable.
39400     # The splitting of arguments from the executable at a space might have been incorrect,
39401     # since paths with space are more likely in Windows. Give it another try with the whole
39402     # argument.
39403     path="$complete"
39404     arguments="EOL"
39405     new_path="$path"
39406 
39407   windows_path="$new_path"
39408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39409     unix_path=`$CYGPATH -u "$windows_path"`
39410     new_path="$unix_path"
39411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39413     new_path="$unix_path"
39414   fi
39415 
39416 
39417     new_path=`$WHICH "$new_path" 2> /dev/null`
39418     # bat and cmd files are not always considered executable in MSYS causing which
39419     # to not find them
39420     if test "x$new_path" = x \
39421         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39422         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39423       new_path="$path"
39424 
39425   windows_path="$new_path"
39426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39427     unix_path=`$CYGPATH -u "$windows_path"`
39428     new_path="$unix_path"
39429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39430     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39431     new_path="$unix_path"
39432   fi
39433 
39434     fi
39435 
39436     if test "x$new_path" = x; then
39437       # It's still not found. Now this is an unrecoverable error.
39438       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39439 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39440       has_space=`$ECHO "$complete" | $GREP " "`
39441       if test "x$has_space" != x; then
39442         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39443 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39444       fi
39445       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39446     fi
39447   fi
39448 
39449   # Now new_path has a complete unix path to the binary
39450   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39451     # Keep paths in /bin as-is, but remove trailing .exe if any
39452     new_path="${new_path/%.exe/}"
39453     # Do not save /bin paths to all_fixpath_prefixes!
39454   else
39455     # Not in mixed or Windows style, start by that.
39456     new_path=`cmd //c echo $new_path`
39457 
39458   input_path="$new_path"
39459   # Check if we need to convert this using DOS-style short mode. If the path
39460   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39461   # take no chances and rewrite it.
39462   # Note: m4 eats our [], so we need to use [ and ] instead.
39463   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39464   if test "x$has_forbidden_chars" != x; then
39465     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39466     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39467   fi
39468 
39469     # Output is in $new_path
39470 
39471   windows_path="$new_path"
39472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39473     unix_path=`$CYGPATH -u "$windows_path"`
39474     new_path="$unix_path"
39475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39476     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39477     new_path="$unix_path"
39478   fi
39479 
39480     # remove trailing .exe if any
39481     new_path="${new_path/%.exe/}"
39482 
39483     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39484     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39485   fi
39486 
39487     else
39488       # We're on a unix platform. Hooray! :)
39489       # First separate the path from the arguments. This will split at the first
39490       # space.
39491       complete="$NM"
39492       path="${complete%% *}"
39493       tmp="$complete EOL"
39494       arguments="${tmp#* }"
39495 
39496       # Cannot rely on the command "which" here since it doesn't always work.
39497       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39498       if test -z "$is_absolute_path"; then
39499         # Path to executable is not absolute. Find it.
39500         IFS_save="$IFS"
39501         IFS=:
39502         for p in $PATH; do
39503           if test -f "$p/$path" && test -x "$p/$path"; then
39504             new_path="$p/$path"
39505             break
39506           fi
39507         done
39508         IFS="$IFS_save"
39509       else
39510         # This is an absolute path, we can use it without further modifications.
39511         new_path="$path"
39512       fi
39513 
39514       if test "x$new_path" = x; then
39515         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39516 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39517         has_space=`$ECHO "$complete" | $GREP " "`
39518         if test "x$has_space" != x; then
39519           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39520 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39521         fi
39522         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39523       fi
39524     fi
39525 
39526     # Now join together the path and the arguments once again
39527     if test "x$arguments" != xEOL; then
39528       new_complete="$new_path ${arguments% *}"
39529     else
39530       new_complete="$new_path"
39531     fi
39532 
39533     if test "x$complete" != "x$new_complete"; then
39534       NM="$new_complete"
39535       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39536 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39537     fi
39538   fi
39539 
39540 
39541 
39542   # Publish this variable in the help.
39543 
39544 
39545   if [ -z "${GNM+x}" ]; then
39546     # The variable is not set by user, try to locate tool using the code snippet
39547     for ac_prog in gnm
39548 do
39549   # Extract the first word of "$ac_prog", so it can be a program name with args.
39550 set dummy $ac_prog; ac_word=$2
39551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39552 $as_echo_n "checking for $ac_word... " >&6; }
39553 if ${ac_cv_path_GNM+:} false; then :
39554   $as_echo_n "(cached) " >&6
39555 else
39556   case $GNM in
39557   [\\/]* | ?:[\\/]*)
39558   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39559   ;;
39560   *)
39561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39562 for as_dir in $PATH
39563 do
39564   IFS=$as_save_IFS
39565   test -z "$as_dir" && as_dir=.
39566     for ac_exec_ext in '' $ac_executable_extensions; do
39567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39568     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39570     break 2
39571   fi
39572 done
39573   done
39574 IFS=$as_save_IFS
39575 
39576   ;;
39577 esac
39578 fi
39579 GNM=$ac_cv_path_GNM
39580 if test -n "$GNM"; then
39581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39582 $as_echo "$GNM" >&6; }
39583 else
39584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39585 $as_echo "no" >&6; }
39586 fi
39587 
39588 
39589   test -n "$GNM" && break
39590 done
39591 
39592   else
39593     # The variable is set, but is it from the command line or the environment?
39594 
39595     # Try to remove the string !GNM! from our list.
39596     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39597     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39598       # If it failed, the variable was not from the command line. Ignore it,
39599       # but warn the user (except for BASH, which is always set by the calling BASH).
39600       if test "xGNM" != xBASH; then
39601         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39602 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39603       fi
39604       # Try to locate tool using the code snippet
39605       for ac_prog in gnm
39606 do
39607   # Extract the first word of "$ac_prog", so it can be a program name with args.
39608 set dummy $ac_prog; ac_word=$2
39609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39610 $as_echo_n "checking for $ac_word... " >&6; }
39611 if ${ac_cv_path_GNM+:} false; then :
39612   $as_echo_n "(cached) " >&6
39613 else
39614   case $GNM in
39615   [\\/]* | ?:[\\/]*)
39616   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39617   ;;
39618   *)
39619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39620 for as_dir in $PATH
39621 do
39622   IFS=$as_save_IFS
39623   test -z "$as_dir" && as_dir=.
39624     for ac_exec_ext in '' $ac_executable_extensions; do
39625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39626     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39628     break 2
39629   fi
39630 done
39631   done
39632 IFS=$as_save_IFS
39633 
39634   ;;
39635 esac
39636 fi
39637 GNM=$ac_cv_path_GNM
39638 if test -n "$GNM"; then
39639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39640 $as_echo "$GNM" >&6; }
39641 else
39642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39643 $as_echo "no" >&6; }
39644 fi
39645 
39646 
39647   test -n "$GNM" && break
39648 done
39649 
39650     else
39651       # If it succeeded, then it was overridden by the user. We will use it
39652       # for the tool.
39653 
39654       # First remove it from the list of overridden variables, so we can test
39655       # for unknown variables in the end.
39656       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39657 
39658       # Check if we try to supply an empty value
39659       if test "x$GNM" = x; then
39660         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39661 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39662         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39663 $as_echo_n "checking for GNM... " >&6; }
39664         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39665 $as_echo "disabled" >&6; }
39666       else
39667         # Check if the provided tool contains a complete path.
39668         tool_specified="$GNM"
39669         tool_basename="${tool_specified##*/}"
39670         if test "x$tool_basename" = "x$tool_specified"; then
39671           # A command without a complete path is provided, search $PATH.
39672           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39673 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39674           # Extract the first word of "$tool_basename", so it can be a program name with args.
39675 set dummy $tool_basename; ac_word=$2
39676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39677 $as_echo_n "checking for $ac_word... " >&6; }
39678 if ${ac_cv_path_GNM+:} false; then :
39679   $as_echo_n "(cached) " >&6
39680 else
39681   case $GNM in
39682   [\\/]* | ?:[\\/]*)
39683   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39684   ;;
39685   *)
39686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39687 for as_dir in $PATH
39688 do
39689   IFS=$as_save_IFS
39690   test -z "$as_dir" && as_dir=.
39691     for ac_exec_ext in '' $ac_executable_extensions; do
39692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39693     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39695     break 2
39696   fi
39697 done
39698   done
39699 IFS=$as_save_IFS
39700 
39701   ;;
39702 esac
39703 fi
39704 GNM=$ac_cv_path_GNM
39705 if test -n "$GNM"; then
39706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39707 $as_echo "$GNM" >&6; }
39708 else
39709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39710 $as_echo "no" >&6; }
39711 fi
39712 
39713 
39714           if test "x$GNM" = x; then
39715             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39716           fi
39717         else
39718           # Otherwise we believe it is a complete path. Use it as it is.
39719           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39720 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39721           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39722 $as_echo_n "checking for GNM... " >&6; }
39723           if test ! -x "$tool_specified"; then
39724             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39725 $as_echo "not found" >&6; }
39726             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39727           fi
39728           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39729 $as_echo "$tool_specified" >&6; }
39730         fi
39731       fi
39732     fi
39733 
39734   fi
39735 
39736 
39737 
39738   # Only process if variable expands to non-empty
39739 
39740   if test "x$GNM" != x; then
39741     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39742 
39743   # First separate the path from the arguments. This will split at the first
39744   # space.
39745   complete="$GNM"
39746   path="${complete%% *}"
39747   tmp="$complete EOL"
39748   arguments="${tmp#* }"
39749 
39750   # Input might be given as Windows format, start by converting to
39751   # unix format.
39752   new_path=`$CYGPATH -u "$path"`
39753 
39754   # Now try to locate executable using which
39755   new_path=`$WHICH "$new_path" 2> /dev/null`
39756   # bat and cmd files are not always considered executable in cygwin causing which
39757   # to not find them
39758   if test "x$new_path" = x \
39759       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39760       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39761     new_path=`$CYGPATH -u "$path"`
39762   fi
39763   if test "x$new_path" = x; then
39764     # Oops. Which didn't find the executable.
39765     # The splitting of arguments from the executable at a space might have been incorrect,
39766     # since paths with space are more likely in Windows. Give it another try with the whole
39767     # argument.
39768     path="$complete"
39769     arguments="EOL"
39770     new_path=`$CYGPATH -u "$path"`
39771     new_path=`$WHICH "$new_path" 2> /dev/null`
39772     # bat and cmd files are not always considered executable in cygwin causing which
39773     # to not find them
39774     if test "x$new_path" = x \
39775         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39776         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39777       new_path=`$CYGPATH -u "$path"`
39778     fi
39779     if test "x$new_path" = x; then
39780       # It's still not found. Now this is an unrecoverable error.
39781       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39782 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39783       has_space=`$ECHO "$complete" | $GREP " "`
39784       if test "x$has_space" != x; then
39785         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39786 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39787       fi
39788       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39789     fi
39790   fi
39791 
39792   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39793   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39794   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39795   # "foo.exe" is OK but "foo" is an error.
39796   #
39797   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39798   # It is also a way to make sure we got the proper file name for the real test later on.
39799   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39800   if test "x$test_shortpath" = x; then
39801     # Short path failed, file does not exist as specified.
39802     # Try adding .exe or .cmd
39803     if test -f "${new_path}.exe"; then
39804       input_to_shortpath="${new_path}.exe"
39805     elif test -f "${new_path}.cmd"; then
39806       input_to_shortpath="${new_path}.cmd"
39807     else
39808       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39809 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39810       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39811 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39812       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39813     fi
39814   else
39815     input_to_shortpath="$new_path"
39816   fi
39817 
39818   # Call helper function which possibly converts this using DOS-style short mode.
39819   # If so, the updated path is stored in $new_path.
39820   new_path="$input_to_shortpath"
39821 
39822   input_path="$input_to_shortpath"
39823   # Check if we need to convert this using DOS-style short mode. If the path
39824   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39825   # take no chances and rewrite it.
39826   # Note: m4 eats our [], so we need to use [ and ] instead.
39827   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39828   if test "x$has_forbidden_chars" != x; then
39829     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39830     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39831     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39832     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39833       # Going to short mode and back again did indeed matter. Since short mode is
39834       # case insensitive, let's make it lowercase to improve readability.
39835       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39836       # Now convert it back to Unix-style (cygpath)
39837       input_path=`$CYGPATH -u "$shortmode_path"`
39838       new_path="$input_path"
39839     fi
39840   fi
39841 
39842   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39843   if test "x$test_cygdrive_prefix" = x; then
39844     # As a simple fix, exclude /usr/bin since it's not a real path.
39845     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39846       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39847       # a path prefixed by /cygdrive for fixpath to work.
39848       new_path="$CYGWIN_ROOT_PATH$input_path"
39849     fi
39850   fi
39851 
39852   # remove trailing .exe if any
39853   new_path="${new_path/%.exe/}"
39854 
39855     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39856 
39857   # First separate the path from the arguments. This will split at the first
39858   # space.
39859   complete="$GNM"
39860   path="${complete%% *}"
39861   tmp="$complete EOL"
39862   arguments="${tmp#* }"
39863 
39864   # Input might be given as Windows format, start by converting to
39865   # unix format.
39866   new_path="$path"
39867 
39868   windows_path="$new_path"
39869   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39870     unix_path=`$CYGPATH -u "$windows_path"`
39871     new_path="$unix_path"
39872   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39873     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39874     new_path="$unix_path"
39875   fi
39876 
39877 
39878   # Now try to locate executable using which
39879   new_path=`$WHICH "$new_path" 2> /dev/null`
39880 
39881   if test "x$new_path" = x; then
39882     # Oops. Which didn't find the executable.
39883     # The splitting of arguments from the executable at a space might have been incorrect,
39884     # since paths with space are more likely in Windows. Give it another try with the whole
39885     # argument.
39886     path="$complete"
39887     arguments="EOL"
39888     new_path="$path"
39889 
39890   windows_path="$new_path"
39891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39892     unix_path=`$CYGPATH -u "$windows_path"`
39893     new_path="$unix_path"
39894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39895     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39896     new_path="$unix_path"
39897   fi
39898 
39899 
39900     new_path=`$WHICH "$new_path" 2> /dev/null`
39901     # bat and cmd files are not always considered executable in MSYS causing which
39902     # to not find them
39903     if test "x$new_path" = x \
39904         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39905         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39906       new_path="$path"
39907 
39908   windows_path="$new_path"
39909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39910     unix_path=`$CYGPATH -u "$windows_path"`
39911     new_path="$unix_path"
39912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39914     new_path="$unix_path"
39915   fi
39916 
39917     fi
39918 
39919     if test "x$new_path" = x; then
39920       # It's still not found. Now this is an unrecoverable error.
39921       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39922 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39923       has_space=`$ECHO "$complete" | $GREP " "`
39924       if test "x$has_space" != x; then
39925         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39926 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39927       fi
39928       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39929     fi
39930   fi
39931 
39932   # Now new_path has a complete unix path to the binary
39933   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39934     # Keep paths in /bin as-is, but remove trailing .exe if any
39935     new_path="${new_path/%.exe/}"
39936     # Do not save /bin paths to all_fixpath_prefixes!
39937   else
39938     # Not in mixed or Windows style, start by that.
39939     new_path=`cmd //c echo $new_path`
39940 
39941   input_path="$new_path"
39942   # Check if we need to convert this using DOS-style short mode. If the path
39943   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39944   # take no chances and rewrite it.
39945   # Note: m4 eats our [], so we need to use [ and ] instead.
39946   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39947   if test "x$has_forbidden_chars" != x; then
39948     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39949     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39950   fi
39951 
39952     # Output is in $new_path
39953 
39954   windows_path="$new_path"
39955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39956     unix_path=`$CYGPATH -u "$windows_path"`
39957     new_path="$unix_path"
39958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39960     new_path="$unix_path"
39961   fi
39962 
39963     # remove trailing .exe if any
39964     new_path="${new_path/%.exe/}"
39965 
39966     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39967     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39968   fi
39969 
39970     else
39971       # We're on a unix platform. Hooray! :)
39972       # First separate the path from the arguments. This will split at the first
39973       # space.
39974       complete="$GNM"
39975       path="${complete%% *}"
39976       tmp="$complete EOL"
39977       arguments="${tmp#* }"
39978 
39979       # Cannot rely on the command "which" here since it doesn't always work.
39980       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39981       if test -z "$is_absolute_path"; then
39982         # Path to executable is not absolute. Find it.
39983         IFS_save="$IFS"
39984         IFS=:
39985         for p in $PATH; do
39986           if test -f "$p/$path" && test -x "$p/$path"; then
39987             new_path="$p/$path"
39988             break
39989           fi
39990         done
39991         IFS="$IFS_save"
39992       else
39993         # This is an absolute path, we can use it without further modifications.
39994         new_path="$path"
39995       fi
39996 
39997       if test "x$new_path" = x; then
39998         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39999 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40000         has_space=`$ECHO "$complete" | $GREP " "`
40001         if test "x$has_space" != x; then
40002           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40003 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40004         fi
40005         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40006       fi
40007     fi
40008 
40009     # Now join together the path and the arguments once again
40010     if test "x$arguments" != xEOL; then
40011       new_complete="$new_path ${arguments% *}"
40012     else
40013       new_complete="$new_path"
40014     fi
40015 
40016     if test "x$complete" != "x$new_complete"; then
40017       GNM="$new_complete"
40018       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40019 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40020     fi
40021   fi
40022 
40023   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40024     # FIXME: we should unify this with the solaris case above.
40025 
40026 
40027   # Publish this variable in the help.
40028 
40029 
40030   if [ -z "${STRIP+x}" ]; then
40031     # The variable is not set by user, try to locate tool using the code snippet
40032     if test -n "$ac_tool_prefix"; then
40033   for ac_prog in strip
40034   do
40035     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40036 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40038 $as_echo_n "checking for $ac_word... " >&6; }
40039 if ${ac_cv_prog_STRIP+:} false; then :
40040   $as_echo_n "(cached) " >&6
40041 else
40042   if test -n "$STRIP"; then
40043   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40044 else
40045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40046 for as_dir in $PATH
40047 do
40048   IFS=$as_save_IFS
40049   test -z "$as_dir" && as_dir=.
40050     for ac_exec_ext in '' $ac_executable_extensions; do
40051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40052     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40054     break 2
40055   fi
40056 done
40057   done
40058 IFS=$as_save_IFS
40059 
40060 fi
40061 fi
40062 STRIP=$ac_cv_prog_STRIP
40063 if test -n "$STRIP"; then
40064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40065 $as_echo "$STRIP" >&6; }
40066 else
40067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40068 $as_echo "no" >&6; }
40069 fi
40070 
40071 
40072     test -n "$STRIP" && break
40073   done
40074 fi
40075 if test -z "$STRIP"; then
40076   ac_ct_STRIP=$STRIP
40077   for ac_prog in strip
40078 do
40079   # Extract the first word of "$ac_prog", so it can be a program name with args.
40080 set dummy $ac_prog; ac_word=$2
40081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40082 $as_echo_n "checking for $ac_word... " >&6; }
40083 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40084   $as_echo_n "(cached) " >&6
40085 else
40086   if test -n "$ac_ct_STRIP"; then
40087   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40088 else
40089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40090 for as_dir in $PATH
40091 do
40092   IFS=$as_save_IFS
40093   test -z "$as_dir" && as_dir=.
40094     for ac_exec_ext in '' $ac_executable_extensions; do
40095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40096     ac_cv_prog_ac_ct_STRIP="$ac_prog"
40097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40098     break 2
40099   fi
40100 done
40101   done
40102 IFS=$as_save_IFS
40103 
40104 fi
40105 fi
40106 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40107 if test -n "$ac_ct_STRIP"; then
40108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40109 $as_echo "$ac_ct_STRIP" >&6; }
40110 else
40111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40112 $as_echo "no" >&6; }
40113 fi
40114 
40115 
40116   test -n "$ac_ct_STRIP" && break
40117 done
40118 
40119   if test "x$ac_ct_STRIP" = x; then
40120     STRIP=""
40121   else
40122     case $cross_compiling:$ac_tool_warned in
40123 yes:)
40124 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40125 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40126 ac_tool_warned=yes ;;
40127 esac
40128     STRIP=$ac_ct_STRIP
40129   fi
40130 fi
40131 
40132   else
40133     # The variable is set, but is it from the command line or the environment?
40134 
40135     # Try to remove the string !STRIP! from our list.
40136     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40137     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40138       # If it failed, the variable was not from the command line. Ignore it,
40139       # but warn the user (except for BASH, which is always set by the calling BASH).
40140       if test "xSTRIP" != xBASH; then
40141         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40142 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40143       fi
40144       # Try to locate tool using the code snippet
40145       if test -n "$ac_tool_prefix"; then
40146   for ac_prog in strip
40147   do
40148     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40149 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40151 $as_echo_n "checking for $ac_word... " >&6; }
40152 if ${ac_cv_prog_STRIP+:} false; then :
40153   $as_echo_n "(cached) " >&6
40154 else
40155   if test -n "$STRIP"; then
40156   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40157 else
40158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40159 for as_dir in $PATH
40160 do
40161   IFS=$as_save_IFS
40162   test -z "$as_dir" && as_dir=.
40163     for ac_exec_ext in '' $ac_executable_extensions; do
40164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40165     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40167     break 2
40168   fi
40169 done
40170   done
40171 IFS=$as_save_IFS
40172 
40173 fi
40174 fi
40175 STRIP=$ac_cv_prog_STRIP
40176 if test -n "$STRIP"; then
40177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40178 $as_echo "$STRIP" >&6; }
40179 else
40180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40181 $as_echo "no" >&6; }
40182 fi
40183 
40184 
40185     test -n "$STRIP" && break
40186   done
40187 fi
40188 if test -z "$STRIP"; then
40189   ac_ct_STRIP=$STRIP
40190   for ac_prog in strip
40191 do
40192   # Extract the first word of "$ac_prog", so it can be a program name with args.
40193 set dummy $ac_prog; ac_word=$2
40194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40195 $as_echo_n "checking for $ac_word... " >&6; }
40196 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40197   $as_echo_n "(cached) " >&6
40198 else
40199   if test -n "$ac_ct_STRIP"; then
40200   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40201 else
40202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40203 for as_dir in $PATH
40204 do
40205   IFS=$as_save_IFS
40206   test -z "$as_dir" && as_dir=.
40207     for ac_exec_ext in '' $ac_executable_extensions; do
40208   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40209     ac_cv_prog_ac_ct_STRIP="$ac_prog"
40210     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40211     break 2
40212   fi
40213 done
40214   done
40215 IFS=$as_save_IFS
40216 
40217 fi
40218 fi
40219 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40220 if test -n "$ac_ct_STRIP"; then
40221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40222 $as_echo "$ac_ct_STRIP" >&6; }
40223 else
40224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40225 $as_echo "no" >&6; }
40226 fi
40227 
40228 
40229   test -n "$ac_ct_STRIP" && break
40230 done
40231 
40232   if test "x$ac_ct_STRIP" = x; then
40233     STRIP=""
40234   else
40235     case $cross_compiling:$ac_tool_warned in
40236 yes:)
40237 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40238 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40239 ac_tool_warned=yes ;;
40240 esac
40241     STRIP=$ac_ct_STRIP
40242   fi
40243 fi
40244 
40245     else
40246       # If it succeeded, then it was overridden by the user. We will use it
40247       # for the tool.
40248 
40249       # First remove it from the list of overridden variables, so we can test
40250       # for unknown variables in the end.
40251       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40252 
40253       # Check if we try to supply an empty value
40254       if test "x$STRIP" = x; then
40255         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40256 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40258 $as_echo_n "checking for STRIP... " >&6; }
40259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40260 $as_echo "disabled" >&6; }
40261       else
40262         # Check if the provided tool contains a complete path.
40263         tool_specified="$STRIP"
40264         tool_basename="${tool_specified##*/}"
40265         if test "x$tool_basename" = "x$tool_specified"; then
40266           # A command without a complete path is provided, search $PATH.
40267           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40268 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40269           # Extract the first word of "$tool_basename", so it can be a program name with args.
40270 set dummy $tool_basename; ac_word=$2
40271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40272 $as_echo_n "checking for $ac_word... " >&6; }
40273 if ${ac_cv_path_STRIP+:} false; then :
40274   $as_echo_n "(cached) " >&6
40275 else
40276   case $STRIP in
40277   [\\/]* | ?:[\\/]*)
40278   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40279   ;;
40280   *)
40281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40282 for as_dir in $PATH
40283 do
40284   IFS=$as_save_IFS
40285   test -z "$as_dir" && as_dir=.
40286     for ac_exec_ext in '' $ac_executable_extensions; do
40287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40288     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40290     break 2
40291   fi
40292 done
40293   done
40294 IFS=$as_save_IFS
40295 
40296   ;;
40297 esac
40298 fi
40299 STRIP=$ac_cv_path_STRIP
40300 if test -n "$STRIP"; then
40301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40302 $as_echo "$STRIP" >&6; }
40303 else
40304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40305 $as_echo "no" >&6; }
40306 fi
40307 
40308 
40309           if test "x$STRIP" = x; then
40310             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40311           fi
40312         else
40313           # Otherwise we believe it is a complete path. Use it as it is.
40314           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40315 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40316           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40317 $as_echo_n "checking for STRIP... " >&6; }
40318           if test ! -x "$tool_specified"; then
40319             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40320 $as_echo "not found" >&6; }
40321             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40322           fi
40323           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40324 $as_echo "$tool_specified" >&6; }
40325         fi
40326       fi
40327     fi
40328 
40329   fi
40330 
40331 
40332 
40333   # Only process if variable expands to non-empty
40334 
40335   if test "x$STRIP" != x; then
40336     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40337 
40338   # First separate the path from the arguments. This will split at the first
40339   # space.
40340   complete="$STRIP"
40341   path="${complete%% *}"
40342   tmp="$complete EOL"
40343   arguments="${tmp#* }"
40344 
40345   # Input might be given as Windows format, start by converting to
40346   # unix format.
40347   new_path=`$CYGPATH -u "$path"`
40348 
40349   # Now try to locate executable using which
40350   new_path=`$WHICH "$new_path" 2> /dev/null`
40351   # bat and cmd files are not always considered executable in cygwin causing which
40352   # to not find them
40353   if test "x$new_path" = x \
40354       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40355       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40356     new_path=`$CYGPATH -u "$path"`
40357   fi
40358   if test "x$new_path" = x; then
40359     # Oops. Which didn't find the executable.
40360     # The splitting of arguments from the executable at a space might have been incorrect,
40361     # since paths with space are more likely in Windows. Give it another try with the whole
40362     # argument.
40363     path="$complete"
40364     arguments="EOL"
40365     new_path=`$CYGPATH -u "$path"`
40366     new_path=`$WHICH "$new_path" 2> /dev/null`
40367     # bat and cmd files are not always considered executable in cygwin causing which
40368     # to not find them
40369     if test "x$new_path" = x \
40370         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40371         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40372       new_path=`$CYGPATH -u "$path"`
40373     fi
40374     if test "x$new_path" = x; then
40375       # It's still not found. Now this is an unrecoverable error.
40376       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40377 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40378       has_space=`$ECHO "$complete" | $GREP " "`
40379       if test "x$has_space" != x; then
40380         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40381 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40382       fi
40383       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40384     fi
40385   fi
40386 
40387   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40388   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40389   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40390   # "foo.exe" is OK but "foo" is an error.
40391   #
40392   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40393   # It is also a way to make sure we got the proper file name for the real test later on.
40394   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40395   if test "x$test_shortpath" = x; then
40396     # Short path failed, file does not exist as specified.
40397     # Try adding .exe or .cmd
40398     if test -f "${new_path}.exe"; then
40399       input_to_shortpath="${new_path}.exe"
40400     elif test -f "${new_path}.cmd"; then
40401       input_to_shortpath="${new_path}.cmd"
40402     else
40403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40404 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40405       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40406 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40407       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40408     fi
40409   else
40410     input_to_shortpath="$new_path"
40411   fi
40412 
40413   # Call helper function which possibly converts this using DOS-style short mode.
40414   # If so, the updated path is stored in $new_path.
40415   new_path="$input_to_shortpath"
40416 
40417   input_path="$input_to_shortpath"
40418   # Check if we need to convert this using DOS-style short mode. If the path
40419   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40420   # take no chances and rewrite it.
40421   # Note: m4 eats our [], so we need to use [ and ] instead.
40422   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40423   if test "x$has_forbidden_chars" != x; then
40424     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40425     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40426     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40427     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40428       # Going to short mode and back again did indeed matter. Since short mode is
40429       # case insensitive, let's make it lowercase to improve readability.
40430       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40431       # Now convert it back to Unix-style (cygpath)
40432       input_path=`$CYGPATH -u "$shortmode_path"`
40433       new_path="$input_path"
40434     fi
40435   fi
40436 
40437   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40438   if test "x$test_cygdrive_prefix" = x; then
40439     # As a simple fix, exclude /usr/bin since it's not a real path.
40440     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40441       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40442       # a path prefixed by /cygdrive for fixpath to work.
40443       new_path="$CYGWIN_ROOT_PATH$input_path"
40444     fi
40445   fi
40446 
40447   # remove trailing .exe if any
40448   new_path="${new_path/%.exe/}"
40449 
40450     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40451 
40452   # First separate the path from the arguments. This will split at the first
40453   # space.
40454   complete="$STRIP"
40455   path="${complete%% *}"
40456   tmp="$complete EOL"
40457   arguments="${tmp#* }"
40458 
40459   # Input might be given as Windows format, start by converting to
40460   # unix format.
40461   new_path="$path"
40462 
40463   windows_path="$new_path"
40464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40465     unix_path=`$CYGPATH -u "$windows_path"`
40466     new_path="$unix_path"
40467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40469     new_path="$unix_path"
40470   fi
40471 
40472 
40473   # Now try to locate executable using which
40474   new_path=`$WHICH "$new_path" 2> /dev/null`
40475 
40476   if test "x$new_path" = x; then
40477     # Oops. Which didn't find the executable.
40478     # The splitting of arguments from the executable at a space might have been incorrect,
40479     # since paths with space are more likely in Windows. Give it another try with the whole
40480     # argument.
40481     path="$complete"
40482     arguments="EOL"
40483     new_path="$path"
40484 
40485   windows_path="$new_path"
40486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40487     unix_path=`$CYGPATH -u "$windows_path"`
40488     new_path="$unix_path"
40489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40491     new_path="$unix_path"
40492   fi
40493 
40494 
40495     new_path=`$WHICH "$new_path" 2> /dev/null`
40496     # bat and cmd files are not always considered executable in MSYS causing which
40497     # to not find them
40498     if test "x$new_path" = x \
40499         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40500         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40501       new_path="$path"
40502 
40503   windows_path="$new_path"
40504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40505     unix_path=`$CYGPATH -u "$windows_path"`
40506     new_path="$unix_path"
40507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40508     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40509     new_path="$unix_path"
40510   fi
40511 
40512     fi
40513 
40514     if test "x$new_path" = x; then
40515       # It's still not found. Now this is an unrecoverable error.
40516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40517 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40518       has_space=`$ECHO "$complete" | $GREP " "`
40519       if test "x$has_space" != x; then
40520         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40521 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40522       fi
40523       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40524     fi
40525   fi
40526 
40527   # Now new_path has a complete unix path to the binary
40528   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40529     # Keep paths in /bin as-is, but remove trailing .exe if any
40530     new_path="${new_path/%.exe/}"
40531     # Do not save /bin paths to all_fixpath_prefixes!
40532   else
40533     # Not in mixed or Windows style, start by that.
40534     new_path=`cmd //c echo $new_path`
40535 
40536   input_path="$new_path"
40537   # Check if we need to convert this using DOS-style short mode. If the path
40538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40539   # take no chances and rewrite it.
40540   # Note: m4 eats our [], so we need to use [ and ] instead.
40541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40542   if test "x$has_forbidden_chars" != x; then
40543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40544     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40545   fi
40546 
40547     # Output is in $new_path
40548 
40549   windows_path="$new_path"
40550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40551     unix_path=`$CYGPATH -u "$windows_path"`
40552     new_path="$unix_path"
40553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40554     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40555     new_path="$unix_path"
40556   fi
40557 
40558     # remove trailing .exe if any
40559     new_path="${new_path/%.exe/}"
40560 
40561     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40562     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40563   fi
40564 
40565     else
40566       # We're on a unix platform. Hooray! :)
40567       # First separate the path from the arguments. This will split at the first
40568       # space.
40569       complete="$STRIP"
40570       path="${complete%% *}"
40571       tmp="$complete EOL"
40572       arguments="${tmp#* }"
40573 
40574       # Cannot rely on the command "which" here since it doesn't always work.
40575       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40576       if test -z "$is_absolute_path"; then
40577         # Path to executable is not absolute. Find it.
40578         IFS_save="$IFS"
40579         IFS=:
40580         for p in $PATH; do
40581           if test -f "$p/$path" && test -x "$p/$path"; then
40582             new_path="$p/$path"
40583             break
40584           fi
40585         done
40586         IFS="$IFS_save"
40587       else
40588         # This is an absolute path, we can use it without further modifications.
40589         new_path="$path"
40590       fi
40591 
40592       if test "x$new_path" = x; then
40593         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40594 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40595         has_space=`$ECHO "$complete" | $GREP " "`
40596         if test "x$has_space" != x; then
40597           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40598 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40599         fi
40600         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40601       fi
40602     fi
40603 
40604     # Now join together the path and the arguments once again
40605     if test "x$arguments" != xEOL; then
40606       new_complete="$new_path ${arguments% *}"
40607     else
40608       new_complete="$new_path"
40609     fi
40610 
40611     if test "x$complete" != "x$new_complete"; then
40612       STRIP="$new_complete"
40613       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40614 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40615     fi
40616   fi
40617 
40618     if test "x$TOOLCHAIN_TYPE" = xgcc; then
40619 
40620 
40621   # Publish this variable in the help.
40622 
40623 
40624   if [ -z "${NM+x}" ]; then
40625     # The variable is not set by user, try to locate tool using the code snippet
40626     if test -n "$ac_tool_prefix"; then
40627   for ac_prog in nm gcc-nm
40628   do
40629     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40630 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40632 $as_echo_n "checking for $ac_word... " >&6; }
40633 if ${ac_cv_prog_NM+:} false; then :
40634   $as_echo_n "(cached) " >&6
40635 else
40636   if test -n "$NM"; then
40637   ac_cv_prog_NM="$NM" # Let the user override the test.
40638 else
40639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40640 for as_dir in $PATH
40641 do
40642   IFS=$as_save_IFS
40643   test -z "$as_dir" && as_dir=.
40644     for ac_exec_ext in '' $ac_executable_extensions; do
40645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40646     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40648     break 2
40649   fi
40650 done
40651   done
40652 IFS=$as_save_IFS
40653 
40654 fi
40655 fi
40656 NM=$ac_cv_prog_NM
40657 if test -n "$NM"; then
40658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40659 $as_echo "$NM" >&6; }
40660 else
40661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40662 $as_echo "no" >&6; }
40663 fi
40664 
40665 
40666     test -n "$NM" && break
40667   done
40668 fi
40669 if test -z "$NM"; then
40670   ac_ct_NM=$NM
40671   for ac_prog in nm gcc-nm
40672 do
40673   # Extract the first word of "$ac_prog", so it can be a program name with args.
40674 set dummy $ac_prog; ac_word=$2
40675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40676 $as_echo_n "checking for $ac_word... " >&6; }
40677 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40678   $as_echo_n "(cached) " >&6
40679 else
40680   if test -n "$ac_ct_NM"; then
40681   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40682 else
40683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40684 for as_dir in $PATH
40685 do
40686   IFS=$as_save_IFS
40687   test -z "$as_dir" && as_dir=.
40688     for ac_exec_ext in '' $ac_executable_extensions; do
40689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40690     ac_cv_prog_ac_ct_NM="$ac_prog"
40691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40692     break 2
40693   fi
40694 done
40695   done
40696 IFS=$as_save_IFS
40697 
40698 fi
40699 fi
40700 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40701 if test -n "$ac_ct_NM"; then
40702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40703 $as_echo "$ac_ct_NM" >&6; }
40704 else
40705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40706 $as_echo "no" >&6; }
40707 fi
40708 
40709 
40710   test -n "$ac_ct_NM" && break
40711 done
40712 
40713   if test "x$ac_ct_NM" = x; then
40714     NM=""
40715   else
40716     case $cross_compiling:$ac_tool_warned in
40717 yes:)
40718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40719 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40720 ac_tool_warned=yes ;;
40721 esac
40722     NM=$ac_ct_NM
40723   fi
40724 fi
40725 
40726   else
40727     # The variable is set, but is it from the command line or the environment?
40728 
40729     # Try to remove the string !NM! from our list.
40730     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40731     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40732       # If it failed, the variable was not from the command line. Ignore it,
40733       # but warn the user (except for BASH, which is always set by the calling BASH).
40734       if test "xNM" != xBASH; then
40735         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40736 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40737       fi
40738       # Try to locate tool using the code snippet
40739       if test -n "$ac_tool_prefix"; then
40740   for ac_prog in nm gcc-nm
40741   do
40742     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40743 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40745 $as_echo_n "checking for $ac_word... " >&6; }
40746 if ${ac_cv_prog_NM+:} false; then :
40747   $as_echo_n "(cached) " >&6
40748 else
40749   if test -n "$NM"; then
40750   ac_cv_prog_NM="$NM" # Let the user override the test.
40751 else
40752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40753 for as_dir in $PATH
40754 do
40755   IFS=$as_save_IFS
40756   test -z "$as_dir" && as_dir=.
40757     for ac_exec_ext in '' $ac_executable_extensions; do
40758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40759     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40761     break 2
40762   fi
40763 done
40764   done
40765 IFS=$as_save_IFS
40766 
40767 fi
40768 fi
40769 NM=$ac_cv_prog_NM
40770 if test -n "$NM"; then
40771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40772 $as_echo "$NM" >&6; }
40773 else
40774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40775 $as_echo "no" >&6; }
40776 fi
40777 
40778 
40779     test -n "$NM" && break
40780   done
40781 fi
40782 if test -z "$NM"; then
40783   ac_ct_NM=$NM
40784   for ac_prog in nm gcc-nm
40785 do
40786   # Extract the first word of "$ac_prog", so it can be a program name with args.
40787 set dummy $ac_prog; ac_word=$2
40788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40789 $as_echo_n "checking for $ac_word... " >&6; }
40790 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40791   $as_echo_n "(cached) " >&6
40792 else
40793   if test -n "$ac_ct_NM"; then
40794   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40795 else
40796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40797 for as_dir in $PATH
40798 do
40799   IFS=$as_save_IFS
40800   test -z "$as_dir" && as_dir=.
40801     for ac_exec_ext in '' $ac_executable_extensions; do
40802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40803     ac_cv_prog_ac_ct_NM="$ac_prog"
40804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40805     break 2
40806   fi
40807 done
40808   done
40809 IFS=$as_save_IFS
40810 
40811 fi
40812 fi
40813 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40814 if test -n "$ac_ct_NM"; then
40815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40816 $as_echo "$ac_ct_NM" >&6; }
40817 else
40818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40819 $as_echo "no" >&6; }
40820 fi
40821 
40822 
40823   test -n "$ac_ct_NM" && break
40824 done
40825 
40826   if test "x$ac_ct_NM" = x; then
40827     NM=""
40828   else
40829     case $cross_compiling:$ac_tool_warned in
40830 yes:)
40831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40832 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40833 ac_tool_warned=yes ;;
40834 esac
40835     NM=$ac_ct_NM
40836   fi
40837 fi
40838 
40839     else
40840       # If it succeeded, then it was overridden by the user. We will use it
40841       # for the tool.
40842 
40843       # First remove it from the list of overridden variables, so we can test
40844       # for unknown variables in the end.
40845       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40846 
40847       # Check if we try to supply an empty value
40848       if test "x$NM" = x; then
40849         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40850 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40851         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40852 $as_echo_n "checking for NM... " >&6; }
40853         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40854 $as_echo "disabled" >&6; }
40855       else
40856         # Check if the provided tool contains a complete path.
40857         tool_specified="$NM"
40858         tool_basename="${tool_specified##*/}"
40859         if test "x$tool_basename" = "x$tool_specified"; then
40860           # A command without a complete path is provided, search $PATH.
40861           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40862 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40863           # Extract the first word of "$tool_basename", so it can be a program name with args.
40864 set dummy $tool_basename; ac_word=$2
40865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40866 $as_echo_n "checking for $ac_word... " >&6; }
40867 if ${ac_cv_path_NM+:} false; then :
40868   $as_echo_n "(cached) " >&6
40869 else
40870   case $NM in
40871   [\\/]* | ?:[\\/]*)
40872   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40873   ;;
40874   *)
40875   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40876 for as_dir in $PATH
40877 do
40878   IFS=$as_save_IFS
40879   test -z "$as_dir" && as_dir=.
40880     for ac_exec_ext in '' $ac_executable_extensions; do
40881   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40882     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40884     break 2
40885   fi
40886 done
40887   done
40888 IFS=$as_save_IFS
40889 
40890   ;;
40891 esac
40892 fi
40893 NM=$ac_cv_path_NM
40894 if test -n "$NM"; then
40895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40896 $as_echo "$NM" >&6; }
40897 else
40898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40899 $as_echo "no" >&6; }
40900 fi
40901 
40902 
40903           if test "x$NM" = x; then
40904             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40905           fi
40906         else
40907           # Otherwise we believe it is a complete path. Use it as it is.
40908           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40909 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40910           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40911 $as_echo_n "checking for NM... " >&6; }
40912           if test ! -x "$tool_specified"; then
40913             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40914 $as_echo "not found" >&6; }
40915             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40916           fi
40917           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40918 $as_echo "$tool_specified" >&6; }
40919         fi
40920       fi
40921     fi
40922 
40923   fi
40924 
40925 
40926     else
40927 
40928 
40929   # Publish this variable in the help.
40930 
40931 
40932   if [ -z "${NM+x}" ]; then
40933     # The variable is not set by user, try to locate tool using the code snippet
40934     if test -n "$ac_tool_prefix"; then
40935   for ac_prog in nm
40936   do
40937     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40938 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40940 $as_echo_n "checking for $ac_word... " >&6; }
40941 if ${ac_cv_prog_NM+:} false; then :
40942   $as_echo_n "(cached) " >&6
40943 else
40944   if test -n "$NM"; then
40945   ac_cv_prog_NM="$NM" # Let the user override the test.
40946 else
40947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40948 for as_dir in $PATH
40949 do
40950   IFS=$as_save_IFS
40951   test -z "$as_dir" && as_dir=.
40952     for ac_exec_ext in '' $ac_executable_extensions; do
40953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40954     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40956     break 2
40957   fi
40958 done
40959   done
40960 IFS=$as_save_IFS
40961 
40962 fi
40963 fi
40964 NM=$ac_cv_prog_NM
40965 if test -n "$NM"; then
40966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40967 $as_echo "$NM" >&6; }
40968 else
40969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40970 $as_echo "no" >&6; }
40971 fi
40972 
40973 
40974     test -n "$NM" && break
40975   done
40976 fi
40977 if test -z "$NM"; then
40978   ac_ct_NM=$NM
40979   for ac_prog in nm
40980 do
40981   # Extract the first word of "$ac_prog", so it can be a program name with args.
40982 set dummy $ac_prog; ac_word=$2
40983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40984 $as_echo_n "checking for $ac_word... " >&6; }
40985 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40986   $as_echo_n "(cached) " >&6
40987 else
40988   if test -n "$ac_ct_NM"; then
40989   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40990 else
40991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40992 for as_dir in $PATH
40993 do
40994   IFS=$as_save_IFS
40995   test -z "$as_dir" && as_dir=.
40996     for ac_exec_ext in '' $ac_executable_extensions; do
40997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40998     ac_cv_prog_ac_ct_NM="$ac_prog"
40999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41000     break 2
41001   fi
41002 done
41003   done
41004 IFS=$as_save_IFS
41005 
41006 fi
41007 fi
41008 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41009 if test -n "$ac_ct_NM"; then
41010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41011 $as_echo "$ac_ct_NM" >&6; }
41012 else
41013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41014 $as_echo "no" >&6; }
41015 fi
41016 
41017 
41018   test -n "$ac_ct_NM" && break
41019 done
41020 
41021   if test "x$ac_ct_NM" = x; then
41022     NM=""
41023   else
41024     case $cross_compiling:$ac_tool_warned in
41025 yes:)
41026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41027 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41028 ac_tool_warned=yes ;;
41029 esac
41030     NM=$ac_ct_NM
41031   fi
41032 fi
41033 
41034   else
41035     # The variable is set, but is it from the command line or the environment?
41036 
41037     # Try to remove the string !NM! from our list.
41038     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41039     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41040       # If it failed, the variable was not from the command line. Ignore it,
41041       # but warn the user (except for BASH, which is always set by the calling BASH).
41042       if test "xNM" != xBASH; then
41043         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41044 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41045       fi
41046       # Try to locate tool using the code snippet
41047       if test -n "$ac_tool_prefix"; then
41048   for ac_prog in nm
41049   do
41050     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41051 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41053 $as_echo_n "checking for $ac_word... " >&6; }
41054 if ${ac_cv_prog_NM+:} false; then :
41055   $as_echo_n "(cached) " >&6
41056 else
41057   if test -n "$NM"; then
41058   ac_cv_prog_NM="$NM" # Let the user override the test.
41059 else
41060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41061 for as_dir in $PATH
41062 do
41063   IFS=$as_save_IFS
41064   test -z "$as_dir" && as_dir=.
41065     for ac_exec_ext in '' $ac_executable_extensions; do
41066   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41067     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41069     break 2
41070   fi
41071 done
41072   done
41073 IFS=$as_save_IFS
41074 
41075 fi
41076 fi
41077 NM=$ac_cv_prog_NM
41078 if test -n "$NM"; then
41079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41080 $as_echo "$NM" >&6; }
41081 else
41082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41083 $as_echo "no" >&6; }
41084 fi
41085 
41086 
41087     test -n "$NM" && break
41088   done
41089 fi
41090 if test -z "$NM"; then
41091   ac_ct_NM=$NM
41092   for ac_prog in nm
41093 do
41094   # Extract the first word of "$ac_prog", so it can be a program name with args.
41095 set dummy $ac_prog; ac_word=$2
41096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41097 $as_echo_n "checking for $ac_word... " >&6; }
41098 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41099   $as_echo_n "(cached) " >&6
41100 else
41101   if test -n "$ac_ct_NM"; then
41102   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41103 else
41104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41105 for as_dir in $PATH
41106 do
41107   IFS=$as_save_IFS
41108   test -z "$as_dir" && as_dir=.
41109     for ac_exec_ext in '' $ac_executable_extensions; do
41110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41111     ac_cv_prog_ac_ct_NM="$ac_prog"
41112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41113     break 2
41114   fi
41115 done
41116   done
41117 IFS=$as_save_IFS
41118 
41119 fi
41120 fi
41121 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41122 if test -n "$ac_ct_NM"; then
41123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41124 $as_echo "$ac_ct_NM" >&6; }
41125 else
41126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41127 $as_echo "no" >&6; }
41128 fi
41129 
41130 
41131   test -n "$ac_ct_NM" && break
41132 done
41133 
41134   if test "x$ac_ct_NM" = x; then
41135     NM=""
41136   else
41137     case $cross_compiling:$ac_tool_warned in
41138 yes:)
41139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41140 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41141 ac_tool_warned=yes ;;
41142 esac
41143     NM=$ac_ct_NM
41144   fi
41145 fi
41146 
41147     else
41148       # If it succeeded, then it was overridden by the user. We will use it
41149       # for the tool.
41150 
41151       # First remove it from the list of overridden variables, so we can test
41152       # for unknown variables in the end.
41153       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41154 
41155       # Check if we try to supply an empty value
41156       if test "x$NM" = x; then
41157         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41158 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41159         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41160 $as_echo_n "checking for NM... " >&6; }
41161         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41162 $as_echo "disabled" >&6; }
41163       else
41164         # Check if the provided tool contains a complete path.
41165         tool_specified="$NM"
41166         tool_basename="${tool_specified##*/}"
41167         if test "x$tool_basename" = "x$tool_specified"; then
41168           # A command without a complete path is provided, search $PATH.
41169           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41170 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41171           # Extract the first word of "$tool_basename", so it can be a program name with args.
41172 set dummy $tool_basename; ac_word=$2
41173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41174 $as_echo_n "checking for $ac_word... " >&6; }
41175 if ${ac_cv_path_NM+:} false; then :
41176   $as_echo_n "(cached) " >&6
41177 else
41178   case $NM in
41179   [\\/]* | ?:[\\/]*)
41180   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41181   ;;
41182   *)
41183   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41184 for as_dir in $PATH
41185 do
41186   IFS=$as_save_IFS
41187   test -z "$as_dir" && as_dir=.
41188     for ac_exec_ext in '' $ac_executable_extensions; do
41189   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41190     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41192     break 2
41193   fi
41194 done
41195   done
41196 IFS=$as_save_IFS
41197 
41198   ;;
41199 esac
41200 fi
41201 NM=$ac_cv_path_NM
41202 if test -n "$NM"; then
41203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41204 $as_echo "$NM" >&6; }
41205 else
41206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41207 $as_echo "no" >&6; }
41208 fi
41209 
41210 
41211           if test "x$NM" = x; then
41212             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41213           fi
41214         else
41215           # Otherwise we believe it is a complete path. Use it as it is.
41216           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41217 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41218           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41219 $as_echo_n "checking for NM... " >&6; }
41220           if test ! -x "$tool_specified"; then
41221             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41222 $as_echo "not found" >&6; }
41223             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41224           fi
41225           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41226 $as_echo "$tool_specified" >&6; }
41227         fi
41228       fi
41229     fi
41230 
41231   fi
41232 
41233 
41234     fi
41235 
41236   # Only process if variable expands to non-empty
41237 
41238   if test "x$NM" != x; then
41239     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41240 
41241   # First separate the path from the arguments. This will split at the first
41242   # space.
41243   complete="$NM"
41244   path="${complete%% *}"
41245   tmp="$complete EOL"
41246   arguments="${tmp#* }"
41247 
41248   # Input might be given as Windows format, start by converting to
41249   # unix format.
41250   new_path=`$CYGPATH -u "$path"`
41251 
41252   # Now try to locate executable using which
41253   new_path=`$WHICH "$new_path" 2> /dev/null`
41254   # bat and cmd files are not always considered executable in cygwin causing which
41255   # to not find them
41256   if test "x$new_path" = x \
41257       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41258       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41259     new_path=`$CYGPATH -u "$path"`
41260   fi
41261   if test "x$new_path" = x; then
41262     # Oops. Which didn't find the executable.
41263     # The splitting of arguments from the executable at a space might have been incorrect,
41264     # since paths with space are more likely in Windows. Give it another try with the whole
41265     # argument.
41266     path="$complete"
41267     arguments="EOL"
41268     new_path=`$CYGPATH -u "$path"`
41269     new_path=`$WHICH "$new_path" 2> /dev/null`
41270     # bat and cmd files are not always considered executable in cygwin causing which
41271     # to not find them
41272     if test "x$new_path" = x \
41273         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41274         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41275       new_path=`$CYGPATH -u "$path"`
41276     fi
41277     if test "x$new_path" = x; then
41278       # It's still not found. Now this is an unrecoverable error.
41279       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41280 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41281       has_space=`$ECHO "$complete" | $GREP " "`
41282       if test "x$has_space" != x; then
41283         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41284 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41285       fi
41286       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41287     fi
41288   fi
41289 
41290   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41291   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41292   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41293   # "foo.exe" is OK but "foo" is an error.
41294   #
41295   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41296   # It is also a way to make sure we got the proper file name for the real test later on.
41297   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41298   if test "x$test_shortpath" = x; then
41299     # Short path failed, file does not exist as specified.
41300     # Try adding .exe or .cmd
41301     if test -f "${new_path}.exe"; then
41302       input_to_shortpath="${new_path}.exe"
41303     elif test -f "${new_path}.cmd"; then
41304       input_to_shortpath="${new_path}.cmd"
41305     else
41306       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41307 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41308       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41309 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41310       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41311     fi
41312   else
41313     input_to_shortpath="$new_path"
41314   fi
41315 
41316   # Call helper function which possibly converts this using DOS-style short mode.
41317   # If so, the updated path is stored in $new_path.
41318   new_path="$input_to_shortpath"
41319 
41320   input_path="$input_to_shortpath"
41321   # Check if we need to convert this using DOS-style short mode. If the path
41322   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41323   # take no chances and rewrite it.
41324   # Note: m4 eats our [], so we need to use [ and ] instead.
41325   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41326   if test "x$has_forbidden_chars" != x; then
41327     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41328     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41329     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41330     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41331       # Going to short mode and back again did indeed matter. Since short mode is
41332       # case insensitive, let's make it lowercase to improve readability.
41333       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41334       # Now convert it back to Unix-style (cygpath)
41335       input_path=`$CYGPATH -u "$shortmode_path"`
41336       new_path="$input_path"
41337     fi
41338   fi
41339 
41340   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41341   if test "x$test_cygdrive_prefix" = x; then
41342     # As a simple fix, exclude /usr/bin since it's not a real path.
41343     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41344       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41345       # a path prefixed by /cygdrive for fixpath to work.
41346       new_path="$CYGWIN_ROOT_PATH$input_path"
41347     fi
41348   fi
41349 
41350   # remove trailing .exe if any
41351   new_path="${new_path/%.exe/}"
41352 
41353     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41354 
41355   # First separate the path from the arguments. This will split at the first
41356   # space.
41357   complete="$NM"
41358   path="${complete%% *}"
41359   tmp="$complete EOL"
41360   arguments="${tmp#* }"
41361 
41362   # Input might be given as Windows format, start by converting to
41363   # unix format.
41364   new_path="$path"
41365 
41366   windows_path="$new_path"
41367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41368     unix_path=`$CYGPATH -u "$windows_path"`
41369     new_path="$unix_path"
41370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41372     new_path="$unix_path"
41373   fi
41374 
41375 
41376   # Now try to locate executable using which
41377   new_path=`$WHICH "$new_path" 2> /dev/null`
41378 
41379   if test "x$new_path" = x; then
41380     # Oops. Which didn't find the executable.
41381     # The splitting of arguments from the executable at a space might have been incorrect,
41382     # since paths with space are more likely in Windows. Give it another try with the whole
41383     # argument.
41384     path="$complete"
41385     arguments="EOL"
41386     new_path="$path"
41387 
41388   windows_path="$new_path"
41389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41390     unix_path=`$CYGPATH -u "$windows_path"`
41391     new_path="$unix_path"
41392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41394     new_path="$unix_path"
41395   fi
41396 
41397 
41398     new_path=`$WHICH "$new_path" 2> /dev/null`
41399     # bat and cmd files are not always considered executable in MSYS causing which
41400     # to not find them
41401     if test "x$new_path" = x \
41402         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41403         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41404       new_path="$path"
41405 
41406   windows_path="$new_path"
41407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41408     unix_path=`$CYGPATH -u "$windows_path"`
41409     new_path="$unix_path"
41410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41412     new_path="$unix_path"
41413   fi
41414 
41415     fi
41416 
41417     if test "x$new_path" = x; then
41418       # It's still not found. Now this is an unrecoverable error.
41419       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41420 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41421       has_space=`$ECHO "$complete" | $GREP " "`
41422       if test "x$has_space" != x; then
41423         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41424 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41425       fi
41426       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41427     fi
41428   fi
41429 
41430   # Now new_path has a complete unix path to the binary
41431   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41432     # Keep paths in /bin as-is, but remove trailing .exe if any
41433     new_path="${new_path/%.exe/}"
41434     # Do not save /bin paths to all_fixpath_prefixes!
41435   else
41436     # Not in mixed or Windows style, start by that.
41437     new_path=`cmd //c echo $new_path`
41438 
41439   input_path="$new_path"
41440   # Check if we need to convert this using DOS-style short mode. If the path
41441   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41442   # take no chances and rewrite it.
41443   # Note: m4 eats our [], so we need to use [ and ] instead.
41444   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41445   if test "x$has_forbidden_chars" != x; then
41446     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41447     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41448   fi
41449 
41450     # Output is in $new_path
41451 
41452   windows_path="$new_path"
41453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41454     unix_path=`$CYGPATH -u "$windows_path"`
41455     new_path="$unix_path"
41456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41458     new_path="$unix_path"
41459   fi
41460 
41461     # remove trailing .exe if any
41462     new_path="${new_path/%.exe/}"
41463 
41464     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41465     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41466   fi
41467 
41468     else
41469       # We're on a unix platform. Hooray! :)
41470       # First separate the path from the arguments. This will split at the first
41471       # space.
41472       complete="$NM"
41473       path="${complete%% *}"
41474       tmp="$complete EOL"
41475       arguments="${tmp#* }"
41476 
41477       # Cannot rely on the command "which" here since it doesn't always work.
41478       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41479       if test -z "$is_absolute_path"; then
41480         # Path to executable is not absolute. Find it.
41481         IFS_save="$IFS"
41482         IFS=:
41483         for p in $PATH; do
41484           if test -f "$p/$path" && test -x "$p/$path"; then
41485             new_path="$p/$path"
41486             break
41487           fi
41488         done
41489         IFS="$IFS_save"
41490       else
41491         # This is an absolute path, we can use it without further modifications.
41492         new_path="$path"
41493       fi
41494 
41495       if test "x$new_path" = x; then
41496         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41497 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41498         has_space=`$ECHO "$complete" | $GREP " "`
41499         if test "x$has_space" != x; then
41500           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41501 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41502         fi
41503         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41504       fi
41505     fi
41506 
41507     # Now join together the path and the arguments once again
41508     if test "x$arguments" != xEOL; then
41509       new_complete="$new_path ${arguments% *}"
41510     else
41511       new_complete="$new_path"
41512     fi
41513 
41514     if test "x$complete" != "x$new_complete"; then
41515       NM="$new_complete"
41516       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41517 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41518     fi
41519   fi
41520 
41521     GNM="$NM"
41522 
41523   fi
41524 
41525   # objcopy is used for moving debug symbols to separate files when
41526   # full debug symbols are enabled.
41527   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41528 
41529 
41530   # Publish this variable in the help.
41531 
41532 
41533   if [ -z "${OBJCOPY+x}" ]; then
41534     # The variable is not set by user, try to locate tool using the code snippet
41535     if test -n "$ac_tool_prefix"; then
41536   for ac_prog in gobjcopy objcopy
41537   do
41538     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41539 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41541 $as_echo_n "checking for $ac_word... " >&6; }
41542 if ${ac_cv_prog_OBJCOPY+:} false; then :
41543   $as_echo_n "(cached) " >&6
41544 else
41545   if test -n "$OBJCOPY"; then
41546   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41547 else
41548 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41549 for as_dir in $PATH
41550 do
41551   IFS=$as_save_IFS
41552   test -z "$as_dir" && as_dir=.
41553     for ac_exec_ext in '' $ac_executable_extensions; do
41554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41555     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41557     break 2
41558   fi
41559 done
41560   done
41561 IFS=$as_save_IFS
41562 
41563 fi
41564 fi
41565 OBJCOPY=$ac_cv_prog_OBJCOPY
41566 if test -n "$OBJCOPY"; then
41567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41568 $as_echo "$OBJCOPY" >&6; }
41569 else
41570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41571 $as_echo "no" >&6; }
41572 fi
41573 
41574 
41575     test -n "$OBJCOPY" && break
41576   done
41577 fi
41578 if test -z "$OBJCOPY"; then
41579   ac_ct_OBJCOPY=$OBJCOPY
41580   for ac_prog in gobjcopy objcopy
41581 do
41582   # Extract the first word of "$ac_prog", so it can be a program name with args.
41583 set dummy $ac_prog; ac_word=$2
41584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41585 $as_echo_n "checking for $ac_word... " >&6; }
41586 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41587   $as_echo_n "(cached) " >&6
41588 else
41589   if test -n "$ac_ct_OBJCOPY"; then
41590   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41591 else
41592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41593 for as_dir in $PATH
41594 do
41595   IFS=$as_save_IFS
41596   test -z "$as_dir" && as_dir=.
41597     for ac_exec_ext in '' $ac_executable_extensions; do
41598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41599     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41601     break 2
41602   fi
41603 done
41604   done
41605 IFS=$as_save_IFS
41606 
41607 fi
41608 fi
41609 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41610 if test -n "$ac_ct_OBJCOPY"; then
41611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41612 $as_echo "$ac_ct_OBJCOPY" >&6; }
41613 else
41614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41615 $as_echo "no" >&6; }
41616 fi
41617 
41618 
41619   test -n "$ac_ct_OBJCOPY" && break
41620 done
41621 
41622   if test "x$ac_ct_OBJCOPY" = x; then
41623     OBJCOPY=""
41624   else
41625     case $cross_compiling:$ac_tool_warned in
41626 yes:)
41627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41628 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41629 ac_tool_warned=yes ;;
41630 esac
41631     OBJCOPY=$ac_ct_OBJCOPY
41632   fi
41633 fi
41634 
41635   else
41636     # The variable is set, but is it from the command line or the environment?
41637 
41638     # Try to remove the string !OBJCOPY! from our list.
41639     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41640     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41641       # If it failed, the variable was not from the command line. Ignore it,
41642       # but warn the user (except for BASH, which is always set by the calling BASH).
41643       if test "xOBJCOPY" != xBASH; then
41644         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41645 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41646       fi
41647       # Try to locate tool using the code snippet
41648       if test -n "$ac_tool_prefix"; then
41649   for ac_prog in gobjcopy objcopy
41650   do
41651     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41652 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41654 $as_echo_n "checking for $ac_word... " >&6; }
41655 if ${ac_cv_prog_OBJCOPY+:} false; then :
41656   $as_echo_n "(cached) " >&6
41657 else
41658   if test -n "$OBJCOPY"; then
41659   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41660 else
41661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41662 for as_dir in $PATH
41663 do
41664   IFS=$as_save_IFS
41665   test -z "$as_dir" && as_dir=.
41666     for ac_exec_ext in '' $ac_executable_extensions; do
41667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41668     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41670     break 2
41671   fi
41672 done
41673   done
41674 IFS=$as_save_IFS
41675 
41676 fi
41677 fi
41678 OBJCOPY=$ac_cv_prog_OBJCOPY
41679 if test -n "$OBJCOPY"; then
41680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41681 $as_echo "$OBJCOPY" >&6; }
41682 else
41683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41684 $as_echo "no" >&6; }
41685 fi
41686 
41687 
41688     test -n "$OBJCOPY" && break
41689   done
41690 fi
41691 if test -z "$OBJCOPY"; then
41692   ac_ct_OBJCOPY=$OBJCOPY
41693   for ac_prog in gobjcopy objcopy
41694 do
41695   # Extract the first word of "$ac_prog", so it can be a program name with args.
41696 set dummy $ac_prog; ac_word=$2
41697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41698 $as_echo_n "checking for $ac_word... " >&6; }
41699 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41700   $as_echo_n "(cached) " >&6
41701 else
41702   if test -n "$ac_ct_OBJCOPY"; then
41703   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41704 else
41705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41706 for as_dir in $PATH
41707 do
41708   IFS=$as_save_IFS
41709   test -z "$as_dir" && as_dir=.
41710     for ac_exec_ext in '' $ac_executable_extensions; do
41711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41712     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41714     break 2
41715   fi
41716 done
41717   done
41718 IFS=$as_save_IFS
41719 
41720 fi
41721 fi
41722 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41723 if test -n "$ac_ct_OBJCOPY"; then
41724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41725 $as_echo "$ac_ct_OBJCOPY" >&6; }
41726 else
41727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41728 $as_echo "no" >&6; }
41729 fi
41730 
41731 
41732   test -n "$ac_ct_OBJCOPY" && break
41733 done
41734 
41735   if test "x$ac_ct_OBJCOPY" = x; then
41736     OBJCOPY=""
41737   else
41738     case $cross_compiling:$ac_tool_warned in
41739 yes:)
41740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41741 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41742 ac_tool_warned=yes ;;
41743 esac
41744     OBJCOPY=$ac_ct_OBJCOPY
41745   fi
41746 fi
41747 
41748     else
41749       # If it succeeded, then it was overridden by the user. We will use it
41750       # for the tool.
41751 
41752       # First remove it from the list of overridden variables, so we can test
41753       # for unknown variables in the end.
41754       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41755 
41756       # Check if we try to supply an empty value
41757       if test "x$OBJCOPY" = x; then
41758         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41759 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41760         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41761 $as_echo_n "checking for OBJCOPY... " >&6; }
41762         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41763 $as_echo "disabled" >&6; }
41764       else
41765         # Check if the provided tool contains a complete path.
41766         tool_specified="$OBJCOPY"
41767         tool_basename="${tool_specified##*/}"
41768         if test "x$tool_basename" = "x$tool_specified"; then
41769           # A command without a complete path is provided, search $PATH.
41770           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41771 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41772           # Extract the first word of "$tool_basename", so it can be a program name with args.
41773 set dummy $tool_basename; ac_word=$2
41774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41775 $as_echo_n "checking for $ac_word... " >&6; }
41776 if ${ac_cv_path_OBJCOPY+:} false; then :
41777   $as_echo_n "(cached) " >&6
41778 else
41779   case $OBJCOPY in
41780   [\\/]* | ?:[\\/]*)
41781   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41782   ;;
41783   *)
41784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41785 for as_dir in $PATH
41786 do
41787   IFS=$as_save_IFS
41788   test -z "$as_dir" && as_dir=.
41789     for ac_exec_ext in '' $ac_executable_extensions; do
41790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41791     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41793     break 2
41794   fi
41795 done
41796   done
41797 IFS=$as_save_IFS
41798 
41799   ;;
41800 esac
41801 fi
41802 OBJCOPY=$ac_cv_path_OBJCOPY
41803 if test -n "$OBJCOPY"; then
41804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41805 $as_echo "$OBJCOPY" >&6; }
41806 else
41807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41808 $as_echo "no" >&6; }
41809 fi
41810 
41811 
41812           if test "x$OBJCOPY" = x; then
41813             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41814           fi
41815         else
41816           # Otherwise we believe it is a complete path. Use it as it is.
41817           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41818 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41819           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41820 $as_echo_n "checking for OBJCOPY... " >&6; }
41821           if test ! -x "$tool_specified"; then
41822             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41823 $as_echo "not found" >&6; }
41824             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41825           fi
41826           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41827 $as_echo "$tool_specified" >&6; }
41828         fi
41829       fi
41830     fi
41831 
41832   fi
41833 
41834 
41835     # Only call fixup if objcopy was found.
41836     if test -n "$OBJCOPY"; then
41837 
41838   # Only process if variable expands to non-empty
41839 
41840   if test "x$OBJCOPY" != x; then
41841     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41842 
41843   # First separate the path from the arguments. This will split at the first
41844   # space.
41845   complete="$OBJCOPY"
41846   path="${complete%% *}"
41847   tmp="$complete EOL"
41848   arguments="${tmp#* }"
41849 
41850   # Input might be given as Windows format, start by converting to
41851   # unix format.
41852   new_path=`$CYGPATH -u "$path"`
41853 
41854   # Now try to locate executable using which
41855   new_path=`$WHICH "$new_path" 2> /dev/null`
41856   # bat and cmd files are not always considered executable in cygwin causing which
41857   # to not find them
41858   if test "x$new_path" = x \
41859       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41860       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41861     new_path=`$CYGPATH -u "$path"`
41862   fi
41863   if test "x$new_path" = x; then
41864     # Oops. Which didn't find the executable.
41865     # The splitting of arguments from the executable at a space might have been incorrect,
41866     # since paths with space are more likely in Windows. Give it another try with the whole
41867     # argument.
41868     path="$complete"
41869     arguments="EOL"
41870     new_path=`$CYGPATH -u "$path"`
41871     new_path=`$WHICH "$new_path" 2> /dev/null`
41872     # bat and cmd files are not always considered executable in cygwin causing which
41873     # to not find them
41874     if test "x$new_path" = x \
41875         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41876         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41877       new_path=`$CYGPATH -u "$path"`
41878     fi
41879     if test "x$new_path" = x; then
41880       # It's still not found. Now this is an unrecoverable error.
41881       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41882 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41883       has_space=`$ECHO "$complete" | $GREP " "`
41884       if test "x$has_space" != x; then
41885         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41886 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41887       fi
41888       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41889     fi
41890   fi
41891 
41892   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41893   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41894   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41895   # "foo.exe" is OK but "foo" is an error.
41896   #
41897   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41898   # It is also a way to make sure we got the proper file name for the real test later on.
41899   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41900   if test "x$test_shortpath" = x; then
41901     # Short path failed, file does not exist as specified.
41902     # Try adding .exe or .cmd
41903     if test -f "${new_path}.exe"; then
41904       input_to_shortpath="${new_path}.exe"
41905     elif test -f "${new_path}.cmd"; then
41906       input_to_shortpath="${new_path}.cmd"
41907     else
41908       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41909 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41910       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41911 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41912       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41913     fi
41914   else
41915     input_to_shortpath="$new_path"
41916   fi
41917 
41918   # Call helper function which possibly converts this using DOS-style short mode.
41919   # If so, the updated path is stored in $new_path.
41920   new_path="$input_to_shortpath"
41921 
41922   input_path="$input_to_shortpath"
41923   # Check if we need to convert this using DOS-style short mode. If the path
41924   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41925   # take no chances and rewrite it.
41926   # Note: m4 eats our [], so we need to use [ and ] instead.
41927   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41928   if test "x$has_forbidden_chars" != x; then
41929     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41930     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41931     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41932     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41933       # Going to short mode and back again did indeed matter. Since short mode is
41934       # case insensitive, let's make it lowercase to improve readability.
41935       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41936       # Now convert it back to Unix-style (cygpath)
41937       input_path=`$CYGPATH -u "$shortmode_path"`
41938       new_path="$input_path"
41939     fi
41940   fi
41941 
41942   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41943   if test "x$test_cygdrive_prefix" = x; then
41944     # As a simple fix, exclude /usr/bin since it's not a real path.
41945     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41946       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41947       # a path prefixed by /cygdrive for fixpath to work.
41948       new_path="$CYGWIN_ROOT_PATH$input_path"
41949     fi
41950   fi
41951 
41952   # remove trailing .exe if any
41953   new_path="${new_path/%.exe/}"
41954 
41955     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41956 
41957   # First separate the path from the arguments. This will split at the first
41958   # space.
41959   complete="$OBJCOPY"
41960   path="${complete%% *}"
41961   tmp="$complete EOL"
41962   arguments="${tmp#* }"
41963 
41964   # Input might be given as Windows format, start by converting to
41965   # unix format.
41966   new_path="$path"
41967 
41968   windows_path="$new_path"
41969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41970     unix_path=`$CYGPATH -u "$windows_path"`
41971     new_path="$unix_path"
41972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41974     new_path="$unix_path"
41975   fi
41976 
41977 
41978   # Now try to locate executable using which
41979   new_path=`$WHICH "$new_path" 2> /dev/null`
41980 
41981   if test "x$new_path" = x; then
41982     # Oops. Which didn't find the executable.
41983     # The splitting of arguments from the executable at a space might have been incorrect,
41984     # since paths with space are more likely in Windows. Give it another try with the whole
41985     # argument.
41986     path="$complete"
41987     arguments="EOL"
41988     new_path="$path"
41989 
41990   windows_path="$new_path"
41991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41992     unix_path=`$CYGPATH -u "$windows_path"`
41993     new_path="$unix_path"
41994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41995     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41996     new_path="$unix_path"
41997   fi
41998 
41999 
42000     new_path=`$WHICH "$new_path" 2> /dev/null`
42001     # bat and cmd files are not always considered executable in MSYS causing which
42002     # to not find them
42003     if test "x$new_path" = x \
42004         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42005         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42006       new_path="$path"
42007 
42008   windows_path="$new_path"
42009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42010     unix_path=`$CYGPATH -u "$windows_path"`
42011     new_path="$unix_path"
42012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42014     new_path="$unix_path"
42015   fi
42016 
42017     fi
42018 
42019     if test "x$new_path" = x; then
42020       # It's still not found. Now this is an unrecoverable error.
42021       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42022 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42023       has_space=`$ECHO "$complete" | $GREP " "`
42024       if test "x$has_space" != x; then
42025         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42026 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42027       fi
42028       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42029     fi
42030   fi
42031 
42032   # Now new_path has a complete unix path to the binary
42033   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42034     # Keep paths in /bin as-is, but remove trailing .exe if any
42035     new_path="${new_path/%.exe/}"
42036     # Do not save /bin paths to all_fixpath_prefixes!
42037   else
42038     # Not in mixed or Windows style, start by that.
42039     new_path=`cmd //c echo $new_path`
42040 
42041   input_path="$new_path"
42042   # Check if we need to convert this using DOS-style short mode. If the path
42043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42044   # take no chances and rewrite it.
42045   # Note: m4 eats our [], so we need to use [ and ] instead.
42046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42047   if test "x$has_forbidden_chars" != x; then
42048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42049     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42050   fi
42051 
42052     # Output is in $new_path
42053 
42054   windows_path="$new_path"
42055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42056     unix_path=`$CYGPATH -u "$windows_path"`
42057     new_path="$unix_path"
42058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42060     new_path="$unix_path"
42061   fi
42062 
42063     # remove trailing .exe if any
42064     new_path="${new_path/%.exe/}"
42065 
42066     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42067     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42068   fi
42069 
42070     else
42071       # We're on a unix platform. Hooray! :)
42072       # First separate the path from the arguments. This will split at the first
42073       # space.
42074       complete="$OBJCOPY"
42075       path="${complete%% *}"
42076       tmp="$complete EOL"
42077       arguments="${tmp#* }"
42078 
42079       # Cannot rely on the command "which" here since it doesn't always work.
42080       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42081       if test -z "$is_absolute_path"; then
42082         # Path to executable is not absolute. Find it.
42083         IFS_save="$IFS"
42084         IFS=:
42085         for p in $PATH; do
42086           if test -f "$p/$path" && test -x "$p/$path"; then
42087             new_path="$p/$path"
42088             break
42089           fi
42090         done
42091         IFS="$IFS_save"
42092       else
42093         # This is an absolute path, we can use it without further modifications.
42094         new_path="$path"
42095       fi
42096 
42097       if test "x$new_path" = x; then
42098         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42099 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42100         has_space=`$ECHO "$complete" | $GREP " "`
42101         if test "x$has_space" != x; then
42102           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42103 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42104         fi
42105         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42106       fi
42107     fi
42108 
42109     # Now join together the path and the arguments once again
42110     if test "x$arguments" != xEOL; then
42111       new_complete="$new_path ${arguments% *}"
42112     else
42113       new_complete="$new_path"
42114     fi
42115 
42116     if test "x$complete" != "x$new_complete"; then
42117       OBJCOPY="$new_complete"
42118       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42119 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42120     fi
42121   fi
42122 
42123       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42124         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42125         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42126         # - version number is last blank separate word on first line
42127         # - version number formats that have been seen:
42128         #   - <major>.<minor>
42129         #   - <major>.<minor>.<micro>
42130         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42131         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42132          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42133               -e 's/.* //' \
42134               -e '/^[01]\./b bad' \
42135               -e '/^2\./{' \
42136               -e '  s/^2\.//' \
42137               -e '  /^[0-9]$/b bad' \
42138               -e '  /^[0-9]\./b bad' \
42139               -e '  /^1[0-9]$/b bad' \
42140               -e '  /^1[0-9]\./b bad' \
42141               -e '  /^20\./b bad' \
42142               -e '  /^21\.0$/b bad' \
42143               -e '  /^21\.0\./b bad' \
42144               -e '}' \
42145               -e ':good' \
42146               -e 's/.*/VALID_VERSION/p' \
42147               -e 'q' \
42148               -e ':bad' \
42149               -e 's/.*/BAD_VERSION/p' \
42150               -e 'q'`
42151         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42152           OBJCOPY=
42153           { $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
42154 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42155           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42156 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42157           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42158 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42159           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42160 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42161           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42162 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42163         fi
42164       fi
42165     fi
42166   fi
42167 
42168 
42169 
42170   # Publish this variable in the help.
42171 
42172 
42173   if [ -z "${OBJDUMP+x}" ]; then
42174     # The variable is not set by user, try to locate tool using the code snippet
42175     if test -n "$ac_tool_prefix"; then
42176   for ac_prog in gobjdump objdump
42177   do
42178     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42179 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42181 $as_echo_n "checking for $ac_word... " >&6; }
42182 if ${ac_cv_prog_OBJDUMP+:} false; then :
42183   $as_echo_n "(cached) " >&6
42184 else
42185   if test -n "$OBJDUMP"; then
42186   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42187 else
42188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42189 for as_dir in $PATH
42190 do
42191   IFS=$as_save_IFS
42192   test -z "$as_dir" && as_dir=.
42193     for ac_exec_ext in '' $ac_executable_extensions; do
42194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42195     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42197     break 2
42198   fi
42199 done
42200   done
42201 IFS=$as_save_IFS
42202 
42203 fi
42204 fi
42205 OBJDUMP=$ac_cv_prog_OBJDUMP
42206 if test -n "$OBJDUMP"; then
42207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42208 $as_echo "$OBJDUMP" >&6; }
42209 else
42210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42211 $as_echo "no" >&6; }
42212 fi
42213 
42214 
42215     test -n "$OBJDUMP" && break
42216   done
42217 fi
42218 if test -z "$OBJDUMP"; then
42219   ac_ct_OBJDUMP=$OBJDUMP
42220   for ac_prog in gobjdump objdump
42221 do
42222   # Extract the first word of "$ac_prog", so it can be a program name with args.
42223 set dummy $ac_prog; ac_word=$2
42224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42225 $as_echo_n "checking for $ac_word... " >&6; }
42226 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42227   $as_echo_n "(cached) " >&6
42228 else
42229   if test -n "$ac_ct_OBJDUMP"; then
42230   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42231 else
42232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42233 for as_dir in $PATH
42234 do
42235   IFS=$as_save_IFS
42236   test -z "$as_dir" && as_dir=.
42237     for ac_exec_ext in '' $ac_executable_extensions; do
42238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42239     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42241     break 2
42242   fi
42243 done
42244   done
42245 IFS=$as_save_IFS
42246 
42247 fi
42248 fi
42249 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42250 if test -n "$ac_ct_OBJDUMP"; then
42251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42252 $as_echo "$ac_ct_OBJDUMP" >&6; }
42253 else
42254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42255 $as_echo "no" >&6; }
42256 fi
42257 
42258 
42259   test -n "$ac_ct_OBJDUMP" && break
42260 done
42261 
42262   if test "x$ac_ct_OBJDUMP" = x; then
42263     OBJDUMP=""
42264   else
42265     case $cross_compiling:$ac_tool_warned in
42266 yes:)
42267 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42268 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42269 ac_tool_warned=yes ;;
42270 esac
42271     OBJDUMP=$ac_ct_OBJDUMP
42272   fi
42273 fi
42274 
42275   else
42276     # The variable is set, but is it from the command line or the environment?
42277 
42278     # Try to remove the string !OBJDUMP! from our list.
42279     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42280     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42281       # If it failed, the variable was not from the command line. Ignore it,
42282       # but warn the user (except for BASH, which is always set by the calling BASH).
42283       if test "xOBJDUMP" != xBASH; then
42284         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42285 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42286       fi
42287       # Try to locate tool using the code snippet
42288       if test -n "$ac_tool_prefix"; then
42289   for ac_prog in gobjdump objdump
42290   do
42291     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42292 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42294 $as_echo_n "checking for $ac_word... " >&6; }
42295 if ${ac_cv_prog_OBJDUMP+:} false; then :
42296   $as_echo_n "(cached) " >&6
42297 else
42298   if test -n "$OBJDUMP"; then
42299   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42300 else
42301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42302 for as_dir in $PATH
42303 do
42304   IFS=$as_save_IFS
42305   test -z "$as_dir" && as_dir=.
42306     for ac_exec_ext in '' $ac_executable_extensions; do
42307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42308     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42310     break 2
42311   fi
42312 done
42313   done
42314 IFS=$as_save_IFS
42315 
42316 fi
42317 fi
42318 OBJDUMP=$ac_cv_prog_OBJDUMP
42319 if test -n "$OBJDUMP"; then
42320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42321 $as_echo "$OBJDUMP" >&6; }
42322 else
42323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42324 $as_echo "no" >&6; }
42325 fi
42326 
42327 
42328     test -n "$OBJDUMP" && break
42329   done
42330 fi
42331 if test -z "$OBJDUMP"; then
42332   ac_ct_OBJDUMP=$OBJDUMP
42333   for ac_prog in gobjdump objdump
42334 do
42335   # Extract the first word of "$ac_prog", so it can be a program name with args.
42336 set dummy $ac_prog; ac_word=$2
42337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42338 $as_echo_n "checking for $ac_word... " >&6; }
42339 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42340   $as_echo_n "(cached) " >&6
42341 else
42342   if test -n "$ac_ct_OBJDUMP"; then
42343   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42344 else
42345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42346 for as_dir in $PATH
42347 do
42348   IFS=$as_save_IFS
42349   test -z "$as_dir" && as_dir=.
42350     for ac_exec_ext in '' $ac_executable_extensions; do
42351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42352     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42354     break 2
42355   fi
42356 done
42357   done
42358 IFS=$as_save_IFS
42359 
42360 fi
42361 fi
42362 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42363 if test -n "$ac_ct_OBJDUMP"; then
42364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42365 $as_echo "$ac_ct_OBJDUMP" >&6; }
42366 else
42367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42368 $as_echo "no" >&6; }
42369 fi
42370 
42371 
42372   test -n "$ac_ct_OBJDUMP" && break
42373 done
42374 
42375   if test "x$ac_ct_OBJDUMP" = x; then
42376     OBJDUMP=""
42377   else
42378     case $cross_compiling:$ac_tool_warned in
42379 yes:)
42380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42381 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42382 ac_tool_warned=yes ;;
42383 esac
42384     OBJDUMP=$ac_ct_OBJDUMP
42385   fi
42386 fi
42387 
42388     else
42389       # If it succeeded, then it was overridden by the user. We will use it
42390       # for the tool.
42391 
42392       # First remove it from the list of overridden variables, so we can test
42393       # for unknown variables in the end.
42394       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42395 
42396       # Check if we try to supply an empty value
42397       if test "x$OBJDUMP" = x; then
42398         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42399 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42400         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42401 $as_echo_n "checking for OBJDUMP... " >&6; }
42402         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42403 $as_echo "disabled" >&6; }
42404       else
42405         # Check if the provided tool contains a complete path.
42406         tool_specified="$OBJDUMP"
42407         tool_basename="${tool_specified##*/}"
42408         if test "x$tool_basename" = "x$tool_specified"; then
42409           # A command without a complete path is provided, search $PATH.
42410           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42411 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42412           # Extract the first word of "$tool_basename", so it can be a program name with args.
42413 set dummy $tool_basename; ac_word=$2
42414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42415 $as_echo_n "checking for $ac_word... " >&6; }
42416 if ${ac_cv_path_OBJDUMP+:} false; then :
42417   $as_echo_n "(cached) " >&6
42418 else
42419   case $OBJDUMP in
42420   [\\/]* | ?:[\\/]*)
42421   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42422   ;;
42423   *)
42424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42425 for as_dir in $PATH
42426 do
42427   IFS=$as_save_IFS
42428   test -z "$as_dir" && as_dir=.
42429     for ac_exec_ext in '' $ac_executable_extensions; do
42430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42431     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42433     break 2
42434   fi
42435 done
42436   done
42437 IFS=$as_save_IFS
42438 
42439   ;;
42440 esac
42441 fi
42442 OBJDUMP=$ac_cv_path_OBJDUMP
42443 if test -n "$OBJDUMP"; then
42444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42445 $as_echo "$OBJDUMP" >&6; }
42446 else
42447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42448 $as_echo "no" >&6; }
42449 fi
42450 
42451 
42452           if test "x$OBJDUMP" = x; then
42453             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42454           fi
42455         else
42456           # Otherwise we believe it is a complete path. Use it as it is.
42457           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42458 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42459           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42460 $as_echo_n "checking for OBJDUMP... " >&6; }
42461           if test ! -x "$tool_specified"; then
42462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42463 $as_echo "not found" >&6; }
42464             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42465           fi
42466           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42467 $as_echo "$tool_specified" >&6; }
42468         fi
42469       fi
42470     fi
42471 
42472   fi
42473 
42474 
42475   if test "x$OBJDUMP" != x; then
42476     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42477     # bails if argument is missing.
42478 
42479   # Only process if variable expands to non-empty
42480 
42481   if test "x$OBJDUMP" != x; then
42482     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42483 
42484   # First separate the path from the arguments. This will split at the first
42485   # space.
42486   complete="$OBJDUMP"
42487   path="${complete%% *}"
42488   tmp="$complete EOL"
42489   arguments="${tmp#* }"
42490 
42491   # Input might be given as Windows format, start by converting to
42492   # unix format.
42493   new_path=`$CYGPATH -u "$path"`
42494 
42495   # Now try to locate executable using which
42496   new_path=`$WHICH "$new_path" 2> /dev/null`
42497   # bat and cmd files are not always considered executable in cygwin causing which
42498   # to not find them
42499   if test "x$new_path" = x \
42500       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42501       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42502     new_path=`$CYGPATH -u "$path"`
42503   fi
42504   if test "x$new_path" = x; then
42505     # Oops. Which didn't find the executable.
42506     # The splitting of arguments from the executable at a space might have been incorrect,
42507     # since paths with space are more likely in Windows. Give it another try with the whole
42508     # argument.
42509     path="$complete"
42510     arguments="EOL"
42511     new_path=`$CYGPATH -u "$path"`
42512     new_path=`$WHICH "$new_path" 2> /dev/null`
42513     # bat and cmd files are not always considered executable in cygwin causing which
42514     # to not find them
42515     if test "x$new_path" = x \
42516         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42517         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42518       new_path=`$CYGPATH -u "$path"`
42519     fi
42520     if test "x$new_path" = x; then
42521       # It's still not found. Now this is an unrecoverable error.
42522       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42523 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42524       has_space=`$ECHO "$complete" | $GREP " "`
42525       if test "x$has_space" != x; then
42526         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42527 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42528       fi
42529       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42530     fi
42531   fi
42532 
42533   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42534   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42535   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42536   # "foo.exe" is OK but "foo" is an error.
42537   #
42538   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42539   # It is also a way to make sure we got the proper file name for the real test later on.
42540   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42541   if test "x$test_shortpath" = x; then
42542     # Short path failed, file does not exist as specified.
42543     # Try adding .exe or .cmd
42544     if test -f "${new_path}.exe"; then
42545       input_to_shortpath="${new_path}.exe"
42546     elif test -f "${new_path}.cmd"; then
42547       input_to_shortpath="${new_path}.cmd"
42548     else
42549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42550 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42551       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42552 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42553       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42554     fi
42555   else
42556     input_to_shortpath="$new_path"
42557   fi
42558 
42559   # Call helper function which possibly converts this using DOS-style short mode.
42560   # If so, the updated path is stored in $new_path.
42561   new_path="$input_to_shortpath"
42562 
42563   input_path="$input_to_shortpath"
42564   # Check if we need to convert this using DOS-style short mode. If the path
42565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42566   # take no chances and rewrite it.
42567   # Note: m4 eats our [], so we need to use [ and ] instead.
42568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42569   if test "x$has_forbidden_chars" != x; then
42570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42571     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42572     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42573     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42574       # Going to short mode and back again did indeed matter. Since short mode is
42575       # case insensitive, let's make it lowercase to improve readability.
42576       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42577       # Now convert it back to Unix-style (cygpath)
42578       input_path=`$CYGPATH -u "$shortmode_path"`
42579       new_path="$input_path"
42580     fi
42581   fi
42582 
42583   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42584   if test "x$test_cygdrive_prefix" = x; then
42585     # As a simple fix, exclude /usr/bin since it's not a real path.
42586     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42587       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42588       # a path prefixed by /cygdrive for fixpath to work.
42589       new_path="$CYGWIN_ROOT_PATH$input_path"
42590     fi
42591   fi
42592 
42593   # remove trailing .exe if any
42594   new_path="${new_path/%.exe/}"
42595 
42596     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42597 
42598   # First separate the path from the arguments. This will split at the first
42599   # space.
42600   complete="$OBJDUMP"
42601   path="${complete%% *}"
42602   tmp="$complete EOL"
42603   arguments="${tmp#* }"
42604 
42605   # Input might be given as Windows format, start by converting to
42606   # unix format.
42607   new_path="$path"
42608 
42609   windows_path="$new_path"
42610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42611     unix_path=`$CYGPATH -u "$windows_path"`
42612     new_path="$unix_path"
42613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42615     new_path="$unix_path"
42616   fi
42617 
42618 
42619   # Now try to locate executable using which
42620   new_path=`$WHICH "$new_path" 2> /dev/null`
42621 
42622   if test "x$new_path" = x; then
42623     # Oops. Which didn't find the executable.
42624     # The splitting of arguments from the executable at a space might have been incorrect,
42625     # since paths with space are more likely in Windows. Give it another try with the whole
42626     # argument.
42627     path="$complete"
42628     arguments="EOL"
42629     new_path="$path"
42630 
42631   windows_path="$new_path"
42632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42633     unix_path=`$CYGPATH -u "$windows_path"`
42634     new_path="$unix_path"
42635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42637     new_path="$unix_path"
42638   fi
42639 
42640 
42641     new_path=`$WHICH "$new_path" 2> /dev/null`
42642     # bat and cmd files are not always considered executable in MSYS causing which
42643     # to not find them
42644     if test "x$new_path" = x \
42645         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42646         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42647       new_path="$path"
42648 
42649   windows_path="$new_path"
42650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42651     unix_path=`$CYGPATH -u "$windows_path"`
42652     new_path="$unix_path"
42653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42655     new_path="$unix_path"
42656   fi
42657 
42658     fi
42659 
42660     if test "x$new_path" = x; then
42661       # It's still not found. Now this is an unrecoverable error.
42662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42663 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42664       has_space=`$ECHO "$complete" | $GREP " "`
42665       if test "x$has_space" != x; then
42666         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42667 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42668       fi
42669       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42670     fi
42671   fi
42672 
42673   # Now new_path has a complete unix path to the binary
42674   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42675     # Keep paths in /bin as-is, but remove trailing .exe if any
42676     new_path="${new_path/%.exe/}"
42677     # Do not save /bin paths to all_fixpath_prefixes!
42678   else
42679     # Not in mixed or Windows style, start by that.
42680     new_path=`cmd //c echo $new_path`
42681 
42682   input_path="$new_path"
42683   # Check if we need to convert this using DOS-style short mode. If the path
42684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42685   # take no chances and rewrite it.
42686   # Note: m4 eats our [], so we need to use [ and ] instead.
42687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42688   if test "x$has_forbidden_chars" != x; then
42689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42690     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42691   fi
42692 
42693     # Output is in $new_path
42694 
42695   windows_path="$new_path"
42696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42697     unix_path=`$CYGPATH -u "$windows_path"`
42698     new_path="$unix_path"
42699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42701     new_path="$unix_path"
42702   fi
42703 
42704     # remove trailing .exe if any
42705     new_path="${new_path/%.exe/}"
42706 
42707     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42708     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42709   fi
42710 
42711     else
42712       # We're on a unix platform. Hooray! :)
42713       # First separate the path from the arguments. This will split at the first
42714       # space.
42715       complete="$OBJDUMP"
42716       path="${complete%% *}"
42717       tmp="$complete EOL"
42718       arguments="${tmp#* }"
42719 
42720       # Cannot rely on the command "which" here since it doesn't always work.
42721       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42722       if test -z "$is_absolute_path"; then
42723         # Path to executable is not absolute. Find it.
42724         IFS_save="$IFS"
42725         IFS=:
42726         for p in $PATH; do
42727           if test -f "$p/$path" && test -x "$p/$path"; then
42728             new_path="$p/$path"
42729             break
42730           fi
42731         done
42732         IFS="$IFS_save"
42733       else
42734         # This is an absolute path, we can use it without further modifications.
42735         new_path="$path"
42736       fi
42737 
42738       if test "x$new_path" = x; then
42739         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42740 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42741         has_space=`$ECHO "$complete" | $GREP " "`
42742         if test "x$has_space" != x; then
42743           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42744 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42745         fi
42746         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42747       fi
42748     fi
42749 
42750     # Now join together the path and the arguments once again
42751     if test "x$arguments" != xEOL; then
42752       new_complete="$new_path ${arguments% *}"
42753     else
42754       new_complete="$new_path"
42755     fi
42756 
42757     if test "x$complete" != "x$new_complete"; then
42758       OBJDUMP="$new_complete"
42759       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42760 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42761     fi
42762   fi
42763 
42764   fi
42765 
42766 
42767   # Restore old path.
42768   PATH="$OLD_PATH"
42769 
42770   # Restore the flags to the user specified values.
42771   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42772   CFLAGS="$ORG_CFLAGS"
42773   CXXFLAGS="$ORG_CXXFLAGS"
42774 
42775 
42776 # Finally do some processing after the detection phase
42777 
42778   if test "x$COMPILE_TYPE" = "xcross"; then
42779     # Now we need to find a C/C++ compiler that can build executables for the
42780     # build platform. We can't use the AC_PROG_CC macro, since it can only be
42781     # used once. Also, we need to do this without adding a tools dir to the
42782     # path, otherwise we might pick up cross-compilers which don't use standard
42783     # naming.
42784 
42785     OLDPATH="$PATH"
42786 
42787 
42788 # Check whether --with-build-devkit was given.
42789 if test "${with_build_devkit+set}" = set; then :
42790   withval=$with_build_devkit;
42791 fi
42792 
42793     if test "x$with_build_devkit" = "xyes"; then
42794       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42795     elif test -n "$with_build_devkit"; then
42796       if test ! -d "$with_build_devkit"; then
42797         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42798       else
42799 
42800   # Only process if variable expands to non-empty
42801 
42802   if test "x$with_build_devkit" != x; then
42803     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42804 
42805   # Input might be given as Windows format, start by converting to
42806   # unix format.
42807   path="$with_build_devkit"
42808   new_path=`$CYGPATH -u "$path"`
42809 
42810   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42811   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42812   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42813   # "foo.exe" is OK but "foo" is an error.
42814   #
42815   # This test is therefore slightly more accurate than "test -f" to check for file precense.
42816   # It is also a way to make sure we got the proper file name for the real test later on.
42817   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42818   if test "x$test_shortpath" = x; then
42819     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42820 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42821     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42822   fi
42823 
42824   # Call helper function which possibly converts this using DOS-style short mode.
42825   # If so, the updated path is stored in $new_path.
42826 
42827   input_path="$new_path"
42828   # Check if we need to convert this using DOS-style short mode. If the path
42829   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42830   # take no chances and rewrite it.
42831   # Note: m4 eats our [], so we need to use [ and ] instead.
42832   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42833   if test "x$has_forbidden_chars" != x; then
42834     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42835     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42836     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42837     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42838       # Going to short mode and back again did indeed matter. Since short mode is
42839       # case insensitive, let's make it lowercase to improve readability.
42840       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42841       # Now convert it back to Unix-style (cygpath)
42842       input_path=`$CYGPATH -u "$shortmode_path"`
42843       new_path="$input_path"
42844     fi
42845   fi
42846 
42847   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42848   if test "x$test_cygdrive_prefix" = x; then
42849     # As a simple fix, exclude /usr/bin since it's not a real path.
42850     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42851       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42852       # a path prefixed by /cygdrive for fixpath to work.
42853       new_path="$CYGWIN_ROOT_PATH$input_path"
42854     fi
42855   fi
42856 
42857 
42858   if test "x$path" != "x$new_path"; then
42859     with_build_devkit="$new_path"
42860     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42861 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42862   fi
42863 
42864     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42865 
42866   path="$with_build_devkit"
42867   has_colon=`$ECHO $path | $GREP ^.:`
42868   new_path="$path"
42869   if test "x$has_colon" = x; then
42870     # Not in mixed or Windows style, start by that.
42871     new_path=`cmd //c echo $path`
42872   fi
42873 
42874 
42875   input_path="$new_path"
42876   # Check if we need to convert this using DOS-style short mode. If the path
42877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42878   # take no chances and rewrite it.
42879   # Note: m4 eats our [], so we need to use [ and ] instead.
42880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42881   if test "x$has_forbidden_chars" != x; then
42882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42883     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42884   fi
42885 
42886 
42887   windows_path="$new_path"
42888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42889     unix_path=`$CYGPATH -u "$windows_path"`
42890     new_path="$unix_path"
42891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42892     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42893     new_path="$unix_path"
42894   fi
42895 
42896   if test "x$path" != "x$new_path"; then
42897     with_build_devkit="$new_path"
42898     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42899 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42900   fi
42901 
42902   # Save the first 10 bytes of this path to the storage, so fixpath can work.
42903   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42904 
42905     else
42906       # We're on a unix platform. Hooray! :)
42907       path="$with_build_devkit"
42908       has_space=`$ECHO "$path" | $GREP " "`
42909       if test "x$has_space" != x; then
42910         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42911 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42912         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42913       fi
42914 
42915       # Use eval to expand a potential ~
42916       eval path="$path"
42917       if test ! -f "$path" && test ! -d "$path"; then
42918         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42919       fi
42920 
42921       with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42922     fi
42923   fi
42924 
42925         BUILD_DEVKIT_ROOT="$with_build_devkit"
42926         # Check for a meta data info file in the root of the devkit
42927         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42928           # Process devkit.info so that existing devkit variables are not
42929           # modified by this
42930           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42931               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42932               -e "s/\$host/\$build/g" \
42933               $BUILD_DEVKIT_ROOT/devkit.info \
42934               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42935           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42936           # This potentially sets the following:
42937           # A descriptive name of the devkit
42938 
42939   if test "x$BUILD_DEVKIT_NAME" = x; then
42940     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42941   fi
42942 
42943           # Corresponds to --with-extra-path
42944 
42945   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42946     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42947   fi
42948 
42949           # Corresponds to --with-toolchain-path
42950 
42951   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42952     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42953   fi
42954 
42955           # Corresponds to --with-sysroot
42956 
42957   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42958     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42959   fi
42960 
42961           # Skip the Window specific parts
42962         fi
42963 
42964         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42965 $as_echo_n "checking for build platform devkit... " >&6; }
42966         if test "x$BUILD_DEVKIT_NAME" != x; then
42967           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42968 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42969         else
42970           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42971 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42972         fi
42973 
42974         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42975 
42976   if test "x$BUILD_SYSROOT" != "x"; then
42977     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42978       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42979         # Solaris Studio does not have a concept of sysroot. Instead we must
42980         # make sure the default include and lib dirs are appended to each
42981         # compile and link command line.
42982         BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42983         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42984             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42985             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42986       fi
42987     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42988       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42989       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42990     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42991       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42992       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42993     fi
42994     # Propagate the sysroot args to hotspot
42995     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42996     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42997     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42998     # The global CFLAGS and LDFLAGS variables need these for configure to function
42999     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43000     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43001     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43002     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43003   fi
43004 
43005   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43006     # We also need -iframework<path>/System/Library/Frameworks
43007     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43008     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43009     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43010     # set this here so it doesn't have to be peppered throughout the forest
43011     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43012     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43013   fi
43014 
43015 
43016 
43017 
43018 
43019          # Fallback default of just /bin if DEVKIT_PATH is not defined
43020         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43021           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43022         fi
43023         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43024       fi
43025     fi
43026 
43027     # FIXME: we should list the discovered compilers as an exclude pattern!
43028     # If we do that, we can do this detection before POST_DETECTION, and still
43029     # find the build compilers in the tools dir, if needed.
43030 
43031 
43032 
43033   # Publish this variable in the help.
43034 
43035 
43036   if [ -z "${BUILD_CC+x}" ]; then
43037     # The variable is not set by user, try to locate tool using the code snippet
43038     for ac_prog in cl cc gcc
43039 do
43040   # Extract the first word of "$ac_prog", so it can be a program name with args.
43041 set dummy $ac_prog; ac_word=$2
43042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43043 $as_echo_n "checking for $ac_word... " >&6; }
43044 if ${ac_cv_path_BUILD_CC+:} false; then :
43045   $as_echo_n "(cached) " >&6
43046 else
43047   case $BUILD_CC in
43048   [\\/]* | ?:[\\/]*)
43049   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43050   ;;
43051   *)
43052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43053 for as_dir in $PATH
43054 do
43055   IFS=$as_save_IFS
43056   test -z "$as_dir" && as_dir=.
43057     for ac_exec_ext in '' $ac_executable_extensions; do
43058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43059     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43061     break 2
43062   fi
43063 done
43064   done
43065 IFS=$as_save_IFS
43066 
43067   ;;
43068 esac
43069 fi
43070 BUILD_CC=$ac_cv_path_BUILD_CC
43071 if test -n "$BUILD_CC"; then
43072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43073 $as_echo "$BUILD_CC" >&6; }
43074 else
43075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43076 $as_echo "no" >&6; }
43077 fi
43078 
43079 
43080   test -n "$BUILD_CC" && break
43081 done
43082 
43083   else
43084     # The variable is set, but is it from the command line or the environment?
43085 
43086     # Try to remove the string !BUILD_CC! from our list.
43087     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43088     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43089       # If it failed, the variable was not from the command line. Ignore it,
43090       # but warn the user (except for BASH, which is always set by the calling BASH).
43091       if test "xBUILD_CC" != xBASH; then
43092         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43093 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43094       fi
43095       # Try to locate tool using the code snippet
43096       for ac_prog in cl cc gcc
43097 do
43098   # Extract the first word of "$ac_prog", so it can be a program name with args.
43099 set dummy $ac_prog; ac_word=$2
43100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43101 $as_echo_n "checking for $ac_word... " >&6; }
43102 if ${ac_cv_path_BUILD_CC+:} false; then :
43103   $as_echo_n "(cached) " >&6
43104 else
43105   case $BUILD_CC in
43106   [\\/]* | ?:[\\/]*)
43107   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43108   ;;
43109   *)
43110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43111 for as_dir in $PATH
43112 do
43113   IFS=$as_save_IFS
43114   test -z "$as_dir" && as_dir=.
43115     for ac_exec_ext in '' $ac_executable_extensions; do
43116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43117     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43119     break 2
43120   fi
43121 done
43122   done
43123 IFS=$as_save_IFS
43124 
43125   ;;
43126 esac
43127 fi
43128 BUILD_CC=$ac_cv_path_BUILD_CC
43129 if test -n "$BUILD_CC"; then
43130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43131 $as_echo "$BUILD_CC" >&6; }
43132 else
43133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43134 $as_echo "no" >&6; }
43135 fi
43136 
43137 
43138   test -n "$BUILD_CC" && break
43139 done
43140 
43141     else
43142       # If it succeeded, then it was overridden by the user. We will use it
43143       # for the tool.
43144 
43145       # First remove it from the list of overridden variables, so we can test
43146       # for unknown variables in the end.
43147       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43148 
43149       # Check if we try to supply an empty value
43150       if test "x$BUILD_CC" = x; then
43151         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43152 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43153         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43154 $as_echo_n "checking for BUILD_CC... " >&6; }
43155         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43156 $as_echo "disabled" >&6; }
43157       else
43158         # Check if the provided tool contains a complete path.
43159         tool_specified="$BUILD_CC"
43160         tool_basename="${tool_specified##*/}"
43161         if test "x$tool_basename" = "x$tool_specified"; then
43162           # A command without a complete path is provided, search $PATH.
43163           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43164 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43165           # Extract the first word of "$tool_basename", so it can be a program name with args.
43166 set dummy $tool_basename; ac_word=$2
43167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43168 $as_echo_n "checking for $ac_word... " >&6; }
43169 if ${ac_cv_path_BUILD_CC+:} false; then :
43170   $as_echo_n "(cached) " >&6
43171 else
43172   case $BUILD_CC in
43173   [\\/]* | ?:[\\/]*)
43174   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43175   ;;
43176   *)
43177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43178 for as_dir in $PATH
43179 do
43180   IFS=$as_save_IFS
43181   test -z "$as_dir" && as_dir=.
43182     for ac_exec_ext in '' $ac_executable_extensions; do
43183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43184     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43186     break 2
43187   fi
43188 done
43189   done
43190 IFS=$as_save_IFS
43191 
43192   ;;
43193 esac
43194 fi
43195 BUILD_CC=$ac_cv_path_BUILD_CC
43196 if test -n "$BUILD_CC"; then
43197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43198 $as_echo "$BUILD_CC" >&6; }
43199 else
43200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43201 $as_echo "no" >&6; }
43202 fi
43203 
43204 
43205           if test "x$BUILD_CC" = x; then
43206             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43207           fi
43208         else
43209           # Otherwise we believe it is a complete path. Use it as it is.
43210           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43211 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43212           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43213 $as_echo_n "checking for BUILD_CC... " >&6; }
43214           if test ! -x "$tool_specified"; then
43215             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43216 $as_echo "not found" >&6; }
43217             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43218           fi
43219           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43220 $as_echo "$tool_specified" >&6; }
43221         fi
43222       fi
43223     fi
43224 
43225   fi
43226 
43227 
43228 
43229   if test "x$BUILD_CC" = x; then
43230     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43231   fi
43232 
43233 
43234 
43235   # Only process if variable expands to non-empty
43236 
43237   if test "x$BUILD_CC" != x; then
43238     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43239 
43240   # First separate the path from the arguments. This will split at the first
43241   # space.
43242   complete="$BUILD_CC"
43243   path="${complete%% *}"
43244   tmp="$complete EOL"
43245   arguments="${tmp#* }"
43246 
43247   # Input might be given as Windows format, start by converting to
43248   # unix format.
43249   new_path=`$CYGPATH -u "$path"`
43250 
43251   # Now try to locate executable using which
43252   new_path=`$WHICH "$new_path" 2> /dev/null`
43253   # bat and cmd files are not always considered executable in cygwin causing which
43254   # to not find them
43255   if test "x$new_path" = x \
43256       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43257       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43258     new_path=`$CYGPATH -u "$path"`
43259   fi
43260   if test "x$new_path" = x; then
43261     # Oops. Which didn't find the executable.
43262     # The splitting of arguments from the executable at a space might have been incorrect,
43263     # since paths with space are more likely in Windows. Give it another try with the whole
43264     # argument.
43265     path="$complete"
43266     arguments="EOL"
43267     new_path=`$CYGPATH -u "$path"`
43268     new_path=`$WHICH "$new_path" 2> /dev/null`
43269     # bat and cmd files are not always considered executable in cygwin causing which
43270     # to not find them
43271     if test "x$new_path" = x \
43272         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43273         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43274       new_path=`$CYGPATH -u "$path"`
43275     fi
43276     if test "x$new_path" = x; then
43277       # It's still not found. Now this is an unrecoverable error.
43278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43279 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43280       has_space=`$ECHO "$complete" | $GREP " "`
43281       if test "x$has_space" != x; then
43282         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43283 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43284       fi
43285       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43286     fi
43287   fi
43288 
43289   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43290   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43291   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43292   # "foo.exe" is OK but "foo" is an error.
43293   #
43294   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43295   # It is also a way to make sure we got the proper file name for the real test later on.
43296   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43297   if test "x$test_shortpath" = x; then
43298     # Short path failed, file does not exist as specified.
43299     # Try adding .exe or .cmd
43300     if test -f "${new_path}.exe"; then
43301       input_to_shortpath="${new_path}.exe"
43302     elif test -f "${new_path}.cmd"; then
43303       input_to_shortpath="${new_path}.cmd"
43304     else
43305       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43306 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43307       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43308 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43309       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43310     fi
43311   else
43312     input_to_shortpath="$new_path"
43313   fi
43314 
43315   # Call helper function which possibly converts this using DOS-style short mode.
43316   # If so, the updated path is stored in $new_path.
43317   new_path="$input_to_shortpath"
43318 
43319   input_path="$input_to_shortpath"
43320   # Check if we need to convert this using DOS-style short mode. If the path
43321   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43322   # take no chances and rewrite it.
43323   # Note: m4 eats our [], so we need to use [ and ] instead.
43324   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43325   if test "x$has_forbidden_chars" != x; then
43326     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43327     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43328     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43329     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43330       # Going to short mode and back again did indeed matter. Since short mode is
43331       # case insensitive, let's make it lowercase to improve readability.
43332       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43333       # Now convert it back to Unix-style (cygpath)
43334       input_path=`$CYGPATH -u "$shortmode_path"`
43335       new_path="$input_path"
43336     fi
43337   fi
43338 
43339   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43340   if test "x$test_cygdrive_prefix" = x; then
43341     # As a simple fix, exclude /usr/bin since it's not a real path.
43342     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43343       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43344       # a path prefixed by /cygdrive for fixpath to work.
43345       new_path="$CYGWIN_ROOT_PATH$input_path"
43346     fi
43347   fi
43348 
43349   # remove trailing .exe if any
43350   new_path="${new_path/%.exe/}"
43351 
43352     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43353 
43354   # First separate the path from the arguments. This will split at the first
43355   # space.
43356   complete="$BUILD_CC"
43357   path="${complete%% *}"
43358   tmp="$complete EOL"
43359   arguments="${tmp#* }"
43360 
43361   # Input might be given as Windows format, start by converting to
43362   # unix format.
43363   new_path="$path"
43364 
43365   windows_path="$new_path"
43366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43367     unix_path=`$CYGPATH -u "$windows_path"`
43368     new_path="$unix_path"
43369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43370     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43371     new_path="$unix_path"
43372   fi
43373 
43374 
43375   # Now try to locate executable using which
43376   new_path=`$WHICH "$new_path" 2> /dev/null`
43377 
43378   if test "x$new_path" = x; then
43379     # Oops. Which didn't find the executable.
43380     # The splitting of arguments from the executable at a space might have been incorrect,
43381     # since paths with space are more likely in Windows. Give it another try with the whole
43382     # argument.
43383     path="$complete"
43384     arguments="EOL"
43385     new_path="$path"
43386 
43387   windows_path="$new_path"
43388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43389     unix_path=`$CYGPATH -u "$windows_path"`
43390     new_path="$unix_path"
43391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43393     new_path="$unix_path"
43394   fi
43395 
43396 
43397     new_path=`$WHICH "$new_path" 2> /dev/null`
43398     # bat and cmd files are not always considered executable in MSYS causing which
43399     # to not find them
43400     if test "x$new_path" = x \
43401         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43402         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43403       new_path="$path"
43404 
43405   windows_path="$new_path"
43406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43407     unix_path=`$CYGPATH -u "$windows_path"`
43408     new_path="$unix_path"
43409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43411     new_path="$unix_path"
43412   fi
43413 
43414     fi
43415 
43416     if test "x$new_path" = x; then
43417       # It's still not found. Now this is an unrecoverable error.
43418       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43419 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43420       has_space=`$ECHO "$complete" | $GREP " "`
43421       if test "x$has_space" != x; then
43422         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43423 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43424       fi
43425       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43426     fi
43427   fi
43428 
43429   # Now new_path has a complete unix path to the binary
43430   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43431     # Keep paths in /bin as-is, but remove trailing .exe if any
43432     new_path="${new_path/%.exe/}"
43433     # Do not save /bin paths to all_fixpath_prefixes!
43434   else
43435     # Not in mixed or Windows style, start by that.
43436     new_path=`cmd //c echo $new_path`
43437 
43438   input_path="$new_path"
43439   # Check if we need to convert this using DOS-style short mode. If the path
43440   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43441   # take no chances and rewrite it.
43442   # Note: m4 eats our [], so we need to use [ and ] instead.
43443   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43444   if test "x$has_forbidden_chars" != x; then
43445     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43446     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43447   fi
43448 
43449     # Output is in $new_path
43450 
43451   windows_path="$new_path"
43452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43453     unix_path=`$CYGPATH -u "$windows_path"`
43454     new_path="$unix_path"
43455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43457     new_path="$unix_path"
43458   fi
43459 
43460     # remove trailing .exe if any
43461     new_path="${new_path/%.exe/}"
43462 
43463     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43464     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43465   fi
43466 
43467     else
43468       # We're on a unix platform. Hooray! :)
43469       # First separate the path from the arguments. This will split at the first
43470       # space.
43471       complete="$BUILD_CC"
43472       path="${complete%% *}"
43473       tmp="$complete EOL"
43474       arguments="${tmp#* }"
43475 
43476       # Cannot rely on the command "which" here since it doesn't always work.
43477       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43478       if test -z "$is_absolute_path"; then
43479         # Path to executable is not absolute. Find it.
43480         IFS_save="$IFS"
43481         IFS=:
43482         for p in $PATH; do
43483           if test -f "$p/$path" && test -x "$p/$path"; then
43484             new_path="$p/$path"
43485             break
43486           fi
43487         done
43488         IFS="$IFS_save"
43489       else
43490         # This is an absolute path, we can use it without further modifications.
43491         new_path="$path"
43492       fi
43493 
43494       if test "x$new_path" = x; then
43495         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43496 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43497         has_space=`$ECHO "$complete" | $GREP " "`
43498         if test "x$has_space" != x; then
43499           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43500 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43501         fi
43502         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43503       fi
43504     fi
43505 
43506     # Now join together the path and the arguments once again
43507     if test "x$arguments" != xEOL; then
43508       new_complete="$new_path ${arguments% *}"
43509     else
43510       new_complete="$new_path"
43511     fi
43512 
43513     if test "x$complete" != "x$new_complete"; then
43514       BUILD_CC="$new_complete"
43515       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43516 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43517     fi
43518   fi
43519 
43520 
43521 
43522 
43523   # Publish this variable in the help.
43524 
43525 
43526   if [ -z "${BUILD_CXX+x}" ]; then
43527     # The variable is not set by user, try to locate tool using the code snippet
43528     for ac_prog in cl CC g++
43529 do
43530   # Extract the first word of "$ac_prog", so it can be a program name with args.
43531 set dummy $ac_prog; ac_word=$2
43532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43533 $as_echo_n "checking for $ac_word... " >&6; }
43534 if ${ac_cv_path_BUILD_CXX+:} false; then :
43535   $as_echo_n "(cached) " >&6
43536 else
43537   case $BUILD_CXX in
43538   [\\/]* | ?:[\\/]*)
43539   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43540   ;;
43541   *)
43542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43543 for as_dir in $PATH
43544 do
43545   IFS=$as_save_IFS
43546   test -z "$as_dir" && as_dir=.
43547     for ac_exec_ext in '' $ac_executable_extensions; do
43548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43549     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43551     break 2
43552   fi
43553 done
43554   done
43555 IFS=$as_save_IFS
43556 
43557   ;;
43558 esac
43559 fi
43560 BUILD_CXX=$ac_cv_path_BUILD_CXX
43561 if test -n "$BUILD_CXX"; then
43562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43563 $as_echo "$BUILD_CXX" >&6; }
43564 else
43565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43566 $as_echo "no" >&6; }
43567 fi
43568 
43569 
43570   test -n "$BUILD_CXX" && break
43571 done
43572 
43573   else
43574     # The variable is set, but is it from the command line or the environment?
43575 
43576     # Try to remove the string !BUILD_CXX! from our list.
43577     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43578     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43579       # If it failed, the variable was not from the command line. Ignore it,
43580       # but warn the user (except for BASH, which is always set by the calling BASH).
43581       if test "xBUILD_CXX" != xBASH; then
43582         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43583 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43584       fi
43585       # Try to locate tool using the code snippet
43586       for ac_prog in cl CC g++
43587 do
43588   # Extract the first word of "$ac_prog", so it can be a program name with args.
43589 set dummy $ac_prog; ac_word=$2
43590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43591 $as_echo_n "checking for $ac_word... " >&6; }
43592 if ${ac_cv_path_BUILD_CXX+:} false; then :
43593   $as_echo_n "(cached) " >&6
43594 else
43595   case $BUILD_CXX in
43596   [\\/]* | ?:[\\/]*)
43597   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43598   ;;
43599   *)
43600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43601 for as_dir in $PATH
43602 do
43603   IFS=$as_save_IFS
43604   test -z "$as_dir" && as_dir=.
43605     for ac_exec_ext in '' $ac_executable_extensions; do
43606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43607     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43609     break 2
43610   fi
43611 done
43612   done
43613 IFS=$as_save_IFS
43614 
43615   ;;
43616 esac
43617 fi
43618 BUILD_CXX=$ac_cv_path_BUILD_CXX
43619 if test -n "$BUILD_CXX"; then
43620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43621 $as_echo "$BUILD_CXX" >&6; }
43622 else
43623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43624 $as_echo "no" >&6; }
43625 fi
43626 
43627 
43628   test -n "$BUILD_CXX" && break
43629 done
43630 
43631     else
43632       # If it succeeded, then it was overridden by the user. We will use it
43633       # for the tool.
43634 
43635       # First remove it from the list of overridden variables, so we can test
43636       # for unknown variables in the end.
43637       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43638 
43639       # Check if we try to supply an empty value
43640       if test "x$BUILD_CXX" = x; then
43641         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43642 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43643         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43644 $as_echo_n "checking for BUILD_CXX... " >&6; }
43645         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43646 $as_echo "disabled" >&6; }
43647       else
43648         # Check if the provided tool contains a complete path.
43649         tool_specified="$BUILD_CXX"
43650         tool_basename="${tool_specified##*/}"
43651         if test "x$tool_basename" = "x$tool_specified"; then
43652           # A command without a complete path is provided, search $PATH.
43653           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43654 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43655           # Extract the first word of "$tool_basename", so it can be a program name with args.
43656 set dummy $tool_basename; ac_word=$2
43657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43658 $as_echo_n "checking for $ac_word... " >&6; }
43659 if ${ac_cv_path_BUILD_CXX+:} false; then :
43660   $as_echo_n "(cached) " >&6
43661 else
43662   case $BUILD_CXX in
43663   [\\/]* | ?:[\\/]*)
43664   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43665   ;;
43666   *)
43667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43668 for as_dir in $PATH
43669 do
43670   IFS=$as_save_IFS
43671   test -z "$as_dir" && as_dir=.
43672     for ac_exec_ext in '' $ac_executable_extensions; do
43673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43674     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43676     break 2
43677   fi
43678 done
43679   done
43680 IFS=$as_save_IFS
43681 
43682   ;;
43683 esac
43684 fi
43685 BUILD_CXX=$ac_cv_path_BUILD_CXX
43686 if test -n "$BUILD_CXX"; then
43687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43688 $as_echo "$BUILD_CXX" >&6; }
43689 else
43690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43691 $as_echo "no" >&6; }
43692 fi
43693 
43694 
43695           if test "x$BUILD_CXX" = x; then
43696             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43697           fi
43698         else
43699           # Otherwise we believe it is a complete path. Use it as it is.
43700           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43701 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43702           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43703 $as_echo_n "checking for BUILD_CXX... " >&6; }
43704           if test ! -x "$tool_specified"; then
43705             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43706 $as_echo "not found" >&6; }
43707             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43708           fi
43709           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43710 $as_echo "$tool_specified" >&6; }
43711         fi
43712       fi
43713     fi
43714 
43715   fi
43716 
43717 
43718 
43719   if test "x$BUILD_CXX" = x; then
43720     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43721   fi
43722 
43723 
43724 
43725   # Only process if variable expands to non-empty
43726 
43727   if test "x$BUILD_CXX" != x; then
43728     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43729 
43730   # First separate the path from the arguments. This will split at the first
43731   # space.
43732   complete="$BUILD_CXX"
43733   path="${complete%% *}"
43734   tmp="$complete EOL"
43735   arguments="${tmp#* }"
43736 
43737   # Input might be given as Windows format, start by converting to
43738   # unix format.
43739   new_path=`$CYGPATH -u "$path"`
43740 
43741   # Now try to locate executable using which
43742   new_path=`$WHICH "$new_path" 2> /dev/null`
43743   # bat and cmd files are not always considered executable in cygwin causing which
43744   # to not find them
43745   if test "x$new_path" = x \
43746       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43747       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43748     new_path=`$CYGPATH -u "$path"`
43749   fi
43750   if test "x$new_path" = x; then
43751     # Oops. Which didn't find the executable.
43752     # The splitting of arguments from the executable at a space might have been incorrect,
43753     # since paths with space are more likely in Windows. Give it another try with the whole
43754     # argument.
43755     path="$complete"
43756     arguments="EOL"
43757     new_path=`$CYGPATH -u "$path"`
43758     new_path=`$WHICH "$new_path" 2> /dev/null`
43759     # bat and cmd files are not always considered executable in cygwin causing which
43760     # to not find them
43761     if test "x$new_path" = x \
43762         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43763         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43764       new_path=`$CYGPATH -u "$path"`
43765     fi
43766     if test "x$new_path" = x; then
43767       # It's still not found. Now this is an unrecoverable error.
43768       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43769 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43770       has_space=`$ECHO "$complete" | $GREP " "`
43771       if test "x$has_space" != x; then
43772         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43773 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43774       fi
43775       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43776     fi
43777   fi
43778 
43779   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43780   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43781   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43782   # "foo.exe" is OK but "foo" is an error.
43783   #
43784   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43785   # It is also a way to make sure we got the proper file name for the real test later on.
43786   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43787   if test "x$test_shortpath" = x; then
43788     # Short path failed, file does not exist as specified.
43789     # Try adding .exe or .cmd
43790     if test -f "${new_path}.exe"; then
43791       input_to_shortpath="${new_path}.exe"
43792     elif test -f "${new_path}.cmd"; then
43793       input_to_shortpath="${new_path}.cmd"
43794     else
43795       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43796 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43797       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43798 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43799       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43800     fi
43801   else
43802     input_to_shortpath="$new_path"
43803   fi
43804 
43805   # Call helper function which possibly converts this using DOS-style short mode.
43806   # If so, the updated path is stored in $new_path.
43807   new_path="$input_to_shortpath"
43808 
43809   input_path="$input_to_shortpath"
43810   # Check if we need to convert this using DOS-style short mode. If the path
43811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43812   # take no chances and rewrite it.
43813   # Note: m4 eats our [], so we need to use [ and ] instead.
43814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43815   if test "x$has_forbidden_chars" != x; then
43816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43817     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43818     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43819     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43820       # Going to short mode and back again did indeed matter. Since short mode is
43821       # case insensitive, let's make it lowercase to improve readability.
43822       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43823       # Now convert it back to Unix-style (cygpath)
43824       input_path=`$CYGPATH -u "$shortmode_path"`
43825       new_path="$input_path"
43826     fi
43827   fi
43828 
43829   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43830   if test "x$test_cygdrive_prefix" = x; then
43831     # As a simple fix, exclude /usr/bin since it's not a real path.
43832     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43833       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43834       # a path prefixed by /cygdrive for fixpath to work.
43835       new_path="$CYGWIN_ROOT_PATH$input_path"
43836     fi
43837   fi
43838 
43839   # remove trailing .exe if any
43840   new_path="${new_path/%.exe/}"
43841 
43842     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43843 
43844   # First separate the path from the arguments. This will split at the first
43845   # space.
43846   complete="$BUILD_CXX"
43847   path="${complete%% *}"
43848   tmp="$complete EOL"
43849   arguments="${tmp#* }"
43850 
43851   # Input might be given as Windows format, start by converting to
43852   # unix format.
43853   new_path="$path"
43854 
43855   windows_path="$new_path"
43856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43857     unix_path=`$CYGPATH -u "$windows_path"`
43858     new_path="$unix_path"
43859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43860     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43861     new_path="$unix_path"
43862   fi
43863 
43864 
43865   # Now try to locate executable using which
43866   new_path=`$WHICH "$new_path" 2> /dev/null`
43867 
43868   if test "x$new_path" = x; then
43869     # Oops. Which didn't find the executable.
43870     # The splitting of arguments from the executable at a space might have been incorrect,
43871     # since paths with space are more likely in Windows. Give it another try with the whole
43872     # argument.
43873     path="$complete"
43874     arguments="EOL"
43875     new_path="$path"
43876 
43877   windows_path="$new_path"
43878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43879     unix_path=`$CYGPATH -u "$windows_path"`
43880     new_path="$unix_path"
43881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43883     new_path="$unix_path"
43884   fi
43885 
43886 
43887     new_path=`$WHICH "$new_path" 2> /dev/null`
43888     # bat and cmd files are not always considered executable in MSYS causing which
43889     # to not find them
43890     if test "x$new_path" = x \
43891         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43892         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43893       new_path="$path"
43894 
43895   windows_path="$new_path"
43896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43897     unix_path=`$CYGPATH -u "$windows_path"`
43898     new_path="$unix_path"
43899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43901     new_path="$unix_path"
43902   fi
43903 
43904     fi
43905 
43906     if test "x$new_path" = x; then
43907       # It's still not found. Now this is an unrecoverable error.
43908       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43909 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43910       has_space=`$ECHO "$complete" | $GREP " "`
43911       if test "x$has_space" != x; then
43912         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43913 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43914       fi
43915       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43916     fi
43917   fi
43918 
43919   # Now new_path has a complete unix path to the binary
43920   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43921     # Keep paths in /bin as-is, but remove trailing .exe if any
43922     new_path="${new_path/%.exe/}"
43923     # Do not save /bin paths to all_fixpath_prefixes!
43924   else
43925     # Not in mixed or Windows style, start by that.
43926     new_path=`cmd //c echo $new_path`
43927 
43928   input_path="$new_path"
43929   # Check if we need to convert this using DOS-style short mode. If the path
43930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43931   # take no chances and rewrite it.
43932   # Note: m4 eats our [], so we need to use [ and ] instead.
43933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43934   if test "x$has_forbidden_chars" != x; then
43935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43936     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43937   fi
43938 
43939     # Output is in $new_path
43940 
43941   windows_path="$new_path"
43942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43943     unix_path=`$CYGPATH -u "$windows_path"`
43944     new_path="$unix_path"
43945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43947     new_path="$unix_path"
43948   fi
43949 
43950     # remove trailing .exe if any
43951     new_path="${new_path/%.exe/}"
43952 
43953     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43954     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43955   fi
43956 
43957     else
43958       # We're on a unix platform. Hooray! :)
43959       # First separate the path from the arguments. This will split at the first
43960       # space.
43961       complete="$BUILD_CXX"
43962       path="${complete%% *}"
43963       tmp="$complete EOL"
43964       arguments="${tmp#* }"
43965 
43966       # Cannot rely on the command "which" here since it doesn't always work.
43967       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43968       if test -z "$is_absolute_path"; then
43969         # Path to executable is not absolute. Find it.
43970         IFS_save="$IFS"
43971         IFS=:
43972         for p in $PATH; do
43973           if test -f "$p/$path" && test -x "$p/$path"; then
43974             new_path="$p/$path"
43975             break
43976           fi
43977         done
43978         IFS="$IFS_save"
43979       else
43980         # This is an absolute path, we can use it without further modifications.
43981         new_path="$path"
43982       fi
43983 
43984       if test "x$new_path" = x; then
43985         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43986 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43987         has_space=`$ECHO "$complete" | $GREP " "`
43988         if test "x$has_space" != x; then
43989           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43990 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43991         fi
43992         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43993       fi
43994     fi
43995 
43996     # Now join together the path and the arguments once again
43997     if test "x$arguments" != xEOL; then
43998       new_complete="$new_path ${arguments% *}"
43999     else
44000       new_complete="$new_path"
44001     fi
44002 
44003     if test "x$complete" != "x$new_complete"; then
44004       BUILD_CXX="$new_complete"
44005       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44006 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44007     fi
44008   fi
44009 
44010 
44011 
44012   # Publish this variable in the help.
44013 
44014 
44015   if [ -z "${BUILD_NM+x}" ]; then
44016     # The variable is not set by user, try to locate tool using the code snippet
44017     for ac_prog in nm gcc-nm
44018 do
44019   # Extract the first word of "$ac_prog", so it can be a program name with args.
44020 set dummy $ac_prog; ac_word=$2
44021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44022 $as_echo_n "checking for $ac_word... " >&6; }
44023 if ${ac_cv_path_BUILD_NM+:} false; then :
44024   $as_echo_n "(cached) " >&6
44025 else
44026   case $BUILD_NM in
44027   [\\/]* | ?:[\\/]*)
44028   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44029   ;;
44030   *)
44031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44032 for as_dir in $PATH
44033 do
44034   IFS=$as_save_IFS
44035   test -z "$as_dir" && as_dir=.
44036     for ac_exec_ext in '' $ac_executable_extensions; do
44037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44038     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44040     break 2
44041   fi
44042 done
44043   done
44044 IFS=$as_save_IFS
44045 
44046   ;;
44047 esac
44048 fi
44049 BUILD_NM=$ac_cv_path_BUILD_NM
44050 if test -n "$BUILD_NM"; then
44051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44052 $as_echo "$BUILD_NM" >&6; }
44053 else
44054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44055 $as_echo "no" >&6; }
44056 fi
44057 
44058 
44059   test -n "$BUILD_NM" && break
44060 done
44061 
44062   else
44063     # The variable is set, but is it from the command line or the environment?
44064 
44065     # Try to remove the string !BUILD_NM! from our list.
44066     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44067     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44068       # If it failed, the variable was not from the command line. Ignore it,
44069       # but warn the user (except for BASH, which is always set by the calling BASH).
44070       if test "xBUILD_NM" != xBASH; then
44071         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44072 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44073       fi
44074       # Try to locate tool using the code snippet
44075       for ac_prog in nm gcc-nm
44076 do
44077   # Extract the first word of "$ac_prog", so it can be a program name with args.
44078 set dummy $ac_prog; ac_word=$2
44079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44080 $as_echo_n "checking for $ac_word... " >&6; }
44081 if ${ac_cv_path_BUILD_NM+:} false; then :
44082   $as_echo_n "(cached) " >&6
44083 else
44084   case $BUILD_NM in
44085   [\\/]* | ?:[\\/]*)
44086   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44087   ;;
44088   *)
44089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44090 for as_dir in $PATH
44091 do
44092   IFS=$as_save_IFS
44093   test -z "$as_dir" && as_dir=.
44094     for ac_exec_ext in '' $ac_executable_extensions; do
44095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44096     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44098     break 2
44099   fi
44100 done
44101   done
44102 IFS=$as_save_IFS
44103 
44104   ;;
44105 esac
44106 fi
44107 BUILD_NM=$ac_cv_path_BUILD_NM
44108 if test -n "$BUILD_NM"; then
44109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44110 $as_echo "$BUILD_NM" >&6; }
44111 else
44112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44113 $as_echo "no" >&6; }
44114 fi
44115 
44116 
44117   test -n "$BUILD_NM" && break
44118 done
44119 
44120     else
44121       # If it succeeded, then it was overridden by the user. We will use it
44122       # for the tool.
44123 
44124       # First remove it from the list of overridden variables, so we can test
44125       # for unknown variables in the end.
44126       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44127 
44128       # Check if we try to supply an empty value
44129       if test "x$BUILD_NM" = x; then
44130         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44131 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44132         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44133 $as_echo_n "checking for BUILD_NM... " >&6; }
44134         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44135 $as_echo "disabled" >&6; }
44136       else
44137         # Check if the provided tool contains a complete path.
44138         tool_specified="$BUILD_NM"
44139         tool_basename="${tool_specified##*/}"
44140         if test "x$tool_basename" = "x$tool_specified"; then
44141           # A command without a complete path is provided, search $PATH.
44142           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44143 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44144           # Extract the first word of "$tool_basename", so it can be a program name with args.
44145 set dummy $tool_basename; ac_word=$2
44146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44147 $as_echo_n "checking for $ac_word... " >&6; }
44148 if ${ac_cv_path_BUILD_NM+:} false; then :
44149   $as_echo_n "(cached) " >&6
44150 else
44151   case $BUILD_NM in
44152   [\\/]* | ?:[\\/]*)
44153   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44154   ;;
44155   *)
44156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44157 for as_dir in $PATH
44158 do
44159   IFS=$as_save_IFS
44160   test -z "$as_dir" && as_dir=.
44161     for ac_exec_ext in '' $ac_executable_extensions; do
44162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44163     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44165     break 2
44166   fi
44167 done
44168   done
44169 IFS=$as_save_IFS
44170 
44171   ;;
44172 esac
44173 fi
44174 BUILD_NM=$ac_cv_path_BUILD_NM
44175 if test -n "$BUILD_NM"; then
44176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44177 $as_echo "$BUILD_NM" >&6; }
44178 else
44179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44180 $as_echo "no" >&6; }
44181 fi
44182 
44183 
44184           if test "x$BUILD_NM" = x; then
44185             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44186           fi
44187         else
44188           # Otherwise we believe it is a complete path. Use it as it is.
44189           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44190 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44191           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44192 $as_echo_n "checking for BUILD_NM... " >&6; }
44193           if test ! -x "$tool_specified"; then
44194             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44195 $as_echo "not found" >&6; }
44196             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44197           fi
44198           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44199 $as_echo "$tool_specified" >&6; }
44200         fi
44201       fi
44202     fi
44203 
44204   fi
44205 
44206 
44207 
44208   # Only process if variable expands to non-empty
44209 
44210   if test "x$BUILD_NM" != x; then
44211     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44212 
44213   # First separate the path from the arguments. This will split at the first
44214   # space.
44215   complete="$BUILD_NM"
44216   path="${complete%% *}"
44217   tmp="$complete EOL"
44218   arguments="${tmp#* }"
44219 
44220   # Input might be given as Windows format, start by converting to
44221   # unix format.
44222   new_path=`$CYGPATH -u "$path"`
44223 
44224   # Now try to locate executable using which
44225   new_path=`$WHICH "$new_path" 2> /dev/null`
44226   # bat and cmd files are not always considered executable in cygwin causing which
44227   # to not find them
44228   if test "x$new_path" = x \
44229       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44230       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44231     new_path=`$CYGPATH -u "$path"`
44232   fi
44233   if test "x$new_path" = x; then
44234     # Oops. Which didn't find the executable.
44235     # The splitting of arguments from the executable at a space might have been incorrect,
44236     # since paths with space are more likely in Windows. Give it another try with the whole
44237     # argument.
44238     path="$complete"
44239     arguments="EOL"
44240     new_path=`$CYGPATH -u "$path"`
44241     new_path=`$WHICH "$new_path" 2> /dev/null`
44242     # bat and cmd files are not always considered executable in cygwin causing which
44243     # to not find them
44244     if test "x$new_path" = x \
44245         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44246         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44247       new_path=`$CYGPATH -u "$path"`
44248     fi
44249     if test "x$new_path" = x; then
44250       # It's still not found. Now this is an unrecoverable error.
44251       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44252 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44253       has_space=`$ECHO "$complete" | $GREP " "`
44254       if test "x$has_space" != x; then
44255         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44256 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44257       fi
44258       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44259     fi
44260   fi
44261 
44262   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44263   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44264   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44265   # "foo.exe" is OK but "foo" is an error.
44266   #
44267   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44268   # It is also a way to make sure we got the proper file name for the real test later on.
44269   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44270   if test "x$test_shortpath" = x; then
44271     # Short path failed, file does not exist as specified.
44272     # Try adding .exe or .cmd
44273     if test -f "${new_path}.exe"; then
44274       input_to_shortpath="${new_path}.exe"
44275     elif test -f "${new_path}.cmd"; then
44276       input_to_shortpath="${new_path}.cmd"
44277     else
44278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44279 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44280       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44281 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44282       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44283     fi
44284   else
44285     input_to_shortpath="$new_path"
44286   fi
44287 
44288   # Call helper function which possibly converts this using DOS-style short mode.
44289   # If so, the updated path is stored in $new_path.
44290   new_path="$input_to_shortpath"
44291 
44292   input_path="$input_to_shortpath"
44293   # Check if we need to convert this using DOS-style short mode. If the path
44294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44295   # take no chances and rewrite it.
44296   # Note: m4 eats our [], so we need to use [ and ] instead.
44297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44298   if test "x$has_forbidden_chars" != x; then
44299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44300     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44301     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44302     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44303       # Going to short mode and back again did indeed matter. Since short mode is
44304       # case insensitive, let's make it lowercase to improve readability.
44305       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44306       # Now convert it back to Unix-style (cygpath)
44307       input_path=`$CYGPATH -u "$shortmode_path"`
44308       new_path="$input_path"
44309     fi
44310   fi
44311 
44312   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44313   if test "x$test_cygdrive_prefix" = x; then
44314     # As a simple fix, exclude /usr/bin since it's not a real path.
44315     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44316       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44317       # a path prefixed by /cygdrive for fixpath to work.
44318       new_path="$CYGWIN_ROOT_PATH$input_path"
44319     fi
44320   fi
44321 
44322   # remove trailing .exe if any
44323   new_path="${new_path/%.exe/}"
44324 
44325     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44326 
44327   # First separate the path from the arguments. This will split at the first
44328   # space.
44329   complete="$BUILD_NM"
44330   path="${complete%% *}"
44331   tmp="$complete EOL"
44332   arguments="${tmp#* }"
44333 
44334   # Input might be given as Windows format, start by converting to
44335   # unix format.
44336   new_path="$path"
44337 
44338   windows_path="$new_path"
44339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44340     unix_path=`$CYGPATH -u "$windows_path"`
44341     new_path="$unix_path"
44342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44344     new_path="$unix_path"
44345   fi
44346 
44347 
44348   # Now try to locate executable using which
44349   new_path=`$WHICH "$new_path" 2> /dev/null`
44350 
44351   if test "x$new_path" = x; then
44352     # Oops. Which didn't find the executable.
44353     # The splitting of arguments from the executable at a space might have been incorrect,
44354     # since paths with space are more likely in Windows. Give it another try with the whole
44355     # argument.
44356     path="$complete"
44357     arguments="EOL"
44358     new_path="$path"
44359 
44360   windows_path="$new_path"
44361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44362     unix_path=`$CYGPATH -u "$windows_path"`
44363     new_path="$unix_path"
44364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44366     new_path="$unix_path"
44367   fi
44368 
44369 
44370     new_path=`$WHICH "$new_path" 2> /dev/null`
44371     # bat and cmd files are not always considered executable in MSYS causing which
44372     # to not find them
44373     if test "x$new_path" = x \
44374         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44375         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44376       new_path="$path"
44377 
44378   windows_path="$new_path"
44379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44380     unix_path=`$CYGPATH -u "$windows_path"`
44381     new_path="$unix_path"
44382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44384     new_path="$unix_path"
44385   fi
44386 
44387     fi
44388 
44389     if test "x$new_path" = x; then
44390       # It's still not found. Now this is an unrecoverable error.
44391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44392 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44393       has_space=`$ECHO "$complete" | $GREP " "`
44394       if test "x$has_space" != x; then
44395         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44396 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44397       fi
44398       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44399     fi
44400   fi
44401 
44402   # Now new_path has a complete unix path to the binary
44403   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44404     # Keep paths in /bin as-is, but remove trailing .exe if any
44405     new_path="${new_path/%.exe/}"
44406     # Do not save /bin paths to all_fixpath_prefixes!
44407   else
44408     # Not in mixed or Windows style, start by that.
44409     new_path=`cmd //c echo $new_path`
44410 
44411   input_path="$new_path"
44412   # Check if we need to convert this using DOS-style short mode. If the path
44413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44414   # take no chances and rewrite it.
44415   # Note: m4 eats our [], so we need to use [ and ] instead.
44416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44417   if test "x$has_forbidden_chars" != x; then
44418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44419     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44420   fi
44421 
44422     # Output is in $new_path
44423 
44424   windows_path="$new_path"
44425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44426     unix_path=`$CYGPATH -u "$windows_path"`
44427     new_path="$unix_path"
44428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44430     new_path="$unix_path"
44431   fi
44432 
44433     # remove trailing .exe if any
44434     new_path="${new_path/%.exe/}"
44435 
44436     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44437     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44438   fi
44439 
44440     else
44441       # We're on a unix platform. Hooray! :)
44442       # First separate the path from the arguments. This will split at the first
44443       # space.
44444       complete="$BUILD_NM"
44445       path="${complete%% *}"
44446       tmp="$complete EOL"
44447       arguments="${tmp#* }"
44448 
44449       # Cannot rely on the command "which" here since it doesn't always work.
44450       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44451       if test -z "$is_absolute_path"; then
44452         # Path to executable is not absolute. Find it.
44453         IFS_save="$IFS"
44454         IFS=:
44455         for p in $PATH; do
44456           if test -f "$p/$path" && test -x "$p/$path"; then
44457             new_path="$p/$path"
44458             break
44459           fi
44460         done
44461         IFS="$IFS_save"
44462       else
44463         # This is an absolute path, we can use it without further modifications.
44464         new_path="$path"
44465       fi
44466 
44467       if test "x$new_path" = x; then
44468         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44469 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44470         has_space=`$ECHO "$complete" | $GREP " "`
44471         if test "x$has_space" != x; then
44472           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44473 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44474         fi
44475         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44476       fi
44477     fi
44478 
44479     # Now join together the path and the arguments once again
44480     if test "x$arguments" != xEOL; then
44481       new_complete="$new_path ${arguments% *}"
44482     else
44483       new_complete="$new_path"
44484     fi
44485 
44486     if test "x$complete" != "x$new_complete"; then
44487       BUILD_NM="$new_complete"
44488       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44489 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44490     fi
44491   fi
44492 
44493 
44494 
44495   # Publish this variable in the help.
44496 
44497 
44498   if [ -z "${BUILD_AR+x}" ]; then
44499     # The variable is not set by user, try to locate tool using the code snippet
44500     for ac_prog in ar gcc-ar
44501 do
44502   # Extract the first word of "$ac_prog", so it can be a program name with args.
44503 set dummy $ac_prog; ac_word=$2
44504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44505 $as_echo_n "checking for $ac_word... " >&6; }
44506 if ${ac_cv_path_BUILD_AR+:} false; then :
44507   $as_echo_n "(cached) " >&6
44508 else
44509   case $BUILD_AR in
44510   [\\/]* | ?:[\\/]*)
44511   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44512   ;;
44513   *)
44514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44515 for as_dir in $PATH
44516 do
44517   IFS=$as_save_IFS
44518   test -z "$as_dir" && as_dir=.
44519     for ac_exec_ext in '' $ac_executable_extensions; do
44520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44521     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44523     break 2
44524   fi
44525 done
44526   done
44527 IFS=$as_save_IFS
44528 
44529   ;;
44530 esac
44531 fi
44532 BUILD_AR=$ac_cv_path_BUILD_AR
44533 if test -n "$BUILD_AR"; then
44534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44535 $as_echo "$BUILD_AR" >&6; }
44536 else
44537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44538 $as_echo "no" >&6; }
44539 fi
44540 
44541 
44542   test -n "$BUILD_AR" && break
44543 done
44544 
44545   else
44546     # The variable is set, but is it from the command line or the environment?
44547 
44548     # Try to remove the string !BUILD_AR! from our list.
44549     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44550     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44551       # If it failed, the variable was not from the command line. Ignore it,
44552       # but warn the user (except for BASH, which is always set by the calling BASH).
44553       if test "xBUILD_AR" != xBASH; then
44554         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44555 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44556       fi
44557       # Try to locate tool using the code snippet
44558       for ac_prog in ar gcc-ar
44559 do
44560   # Extract the first word of "$ac_prog", so it can be a program name with args.
44561 set dummy $ac_prog; ac_word=$2
44562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44563 $as_echo_n "checking for $ac_word... " >&6; }
44564 if ${ac_cv_path_BUILD_AR+:} false; then :
44565   $as_echo_n "(cached) " >&6
44566 else
44567   case $BUILD_AR in
44568   [\\/]* | ?:[\\/]*)
44569   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44570   ;;
44571   *)
44572   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44573 for as_dir in $PATH
44574 do
44575   IFS=$as_save_IFS
44576   test -z "$as_dir" && as_dir=.
44577     for ac_exec_ext in '' $ac_executable_extensions; do
44578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44579     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44581     break 2
44582   fi
44583 done
44584   done
44585 IFS=$as_save_IFS
44586 
44587   ;;
44588 esac
44589 fi
44590 BUILD_AR=$ac_cv_path_BUILD_AR
44591 if test -n "$BUILD_AR"; then
44592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44593 $as_echo "$BUILD_AR" >&6; }
44594 else
44595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44596 $as_echo "no" >&6; }
44597 fi
44598 
44599 
44600   test -n "$BUILD_AR" && break
44601 done
44602 
44603     else
44604       # If it succeeded, then it was overridden by the user. We will use it
44605       # for the tool.
44606 
44607       # First remove it from the list of overridden variables, so we can test
44608       # for unknown variables in the end.
44609       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44610 
44611       # Check if we try to supply an empty value
44612       if test "x$BUILD_AR" = x; then
44613         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44614 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44615         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44616 $as_echo_n "checking for BUILD_AR... " >&6; }
44617         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44618 $as_echo "disabled" >&6; }
44619       else
44620         # Check if the provided tool contains a complete path.
44621         tool_specified="$BUILD_AR"
44622         tool_basename="${tool_specified##*/}"
44623         if test "x$tool_basename" = "x$tool_specified"; then
44624           # A command without a complete path is provided, search $PATH.
44625           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44626 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44627           # Extract the first word of "$tool_basename", so it can be a program name with args.
44628 set dummy $tool_basename; ac_word=$2
44629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44630 $as_echo_n "checking for $ac_word... " >&6; }
44631 if ${ac_cv_path_BUILD_AR+:} false; then :
44632   $as_echo_n "(cached) " >&6
44633 else
44634   case $BUILD_AR in
44635   [\\/]* | ?:[\\/]*)
44636   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44637   ;;
44638   *)
44639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44640 for as_dir in $PATH
44641 do
44642   IFS=$as_save_IFS
44643   test -z "$as_dir" && as_dir=.
44644     for ac_exec_ext in '' $ac_executable_extensions; do
44645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44646     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44648     break 2
44649   fi
44650 done
44651   done
44652 IFS=$as_save_IFS
44653 
44654   ;;
44655 esac
44656 fi
44657 BUILD_AR=$ac_cv_path_BUILD_AR
44658 if test -n "$BUILD_AR"; then
44659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44660 $as_echo "$BUILD_AR" >&6; }
44661 else
44662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44663 $as_echo "no" >&6; }
44664 fi
44665 
44666 
44667           if test "x$BUILD_AR" = x; then
44668             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44669           fi
44670         else
44671           # Otherwise we believe it is a complete path. Use it as it is.
44672           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44673 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44674           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44675 $as_echo_n "checking for BUILD_AR... " >&6; }
44676           if test ! -x "$tool_specified"; then
44677             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44678 $as_echo "not found" >&6; }
44679             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44680           fi
44681           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44682 $as_echo "$tool_specified" >&6; }
44683         fi
44684       fi
44685     fi
44686 
44687   fi
44688 
44689 
44690 
44691   # Only process if variable expands to non-empty
44692 
44693   if test "x$BUILD_AR" != x; then
44694     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44695 
44696   # First separate the path from the arguments. This will split at the first
44697   # space.
44698   complete="$BUILD_AR"
44699   path="${complete%% *}"
44700   tmp="$complete EOL"
44701   arguments="${tmp#* }"
44702 
44703   # Input might be given as Windows format, start by converting to
44704   # unix format.
44705   new_path=`$CYGPATH -u "$path"`
44706 
44707   # Now try to locate executable using which
44708   new_path=`$WHICH "$new_path" 2> /dev/null`
44709   # bat and cmd files are not always considered executable in cygwin causing which
44710   # to not find them
44711   if test "x$new_path" = x \
44712       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44713       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44714     new_path=`$CYGPATH -u "$path"`
44715   fi
44716   if test "x$new_path" = x; then
44717     # Oops. Which didn't find the executable.
44718     # The splitting of arguments from the executable at a space might have been incorrect,
44719     # since paths with space are more likely in Windows. Give it another try with the whole
44720     # argument.
44721     path="$complete"
44722     arguments="EOL"
44723     new_path=`$CYGPATH -u "$path"`
44724     new_path=`$WHICH "$new_path" 2> /dev/null`
44725     # bat and cmd files are not always considered executable in cygwin causing which
44726     # to not find them
44727     if test "x$new_path" = x \
44728         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44729         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44730       new_path=`$CYGPATH -u "$path"`
44731     fi
44732     if test "x$new_path" = x; then
44733       # It's still not found. Now this is an unrecoverable error.
44734       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44735 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44736       has_space=`$ECHO "$complete" | $GREP " "`
44737       if test "x$has_space" != x; then
44738         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44739 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44740       fi
44741       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44742     fi
44743   fi
44744 
44745   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44746   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44747   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44748   # "foo.exe" is OK but "foo" is an error.
44749   #
44750   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44751   # It is also a way to make sure we got the proper file name for the real test later on.
44752   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44753   if test "x$test_shortpath" = x; then
44754     # Short path failed, file does not exist as specified.
44755     # Try adding .exe or .cmd
44756     if test -f "${new_path}.exe"; then
44757       input_to_shortpath="${new_path}.exe"
44758     elif test -f "${new_path}.cmd"; then
44759       input_to_shortpath="${new_path}.cmd"
44760     else
44761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44762 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44763       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44764 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44765       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44766     fi
44767   else
44768     input_to_shortpath="$new_path"
44769   fi
44770 
44771   # Call helper function which possibly converts this using DOS-style short mode.
44772   # If so, the updated path is stored in $new_path.
44773   new_path="$input_to_shortpath"
44774 
44775   input_path="$input_to_shortpath"
44776   # Check if we need to convert this using DOS-style short mode. If the path
44777   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44778   # take no chances and rewrite it.
44779   # Note: m4 eats our [], so we need to use [ and ] instead.
44780   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44781   if test "x$has_forbidden_chars" != x; then
44782     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44783     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44784     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44785     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44786       # Going to short mode and back again did indeed matter. Since short mode is
44787       # case insensitive, let's make it lowercase to improve readability.
44788       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44789       # Now convert it back to Unix-style (cygpath)
44790       input_path=`$CYGPATH -u "$shortmode_path"`
44791       new_path="$input_path"
44792     fi
44793   fi
44794 
44795   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44796   if test "x$test_cygdrive_prefix" = x; then
44797     # As a simple fix, exclude /usr/bin since it's not a real path.
44798     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44799       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44800       # a path prefixed by /cygdrive for fixpath to work.
44801       new_path="$CYGWIN_ROOT_PATH$input_path"
44802     fi
44803   fi
44804 
44805   # remove trailing .exe if any
44806   new_path="${new_path/%.exe/}"
44807 
44808     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44809 
44810   # First separate the path from the arguments. This will split at the first
44811   # space.
44812   complete="$BUILD_AR"
44813   path="${complete%% *}"
44814   tmp="$complete EOL"
44815   arguments="${tmp#* }"
44816 
44817   # Input might be given as Windows format, start by converting to
44818   # unix format.
44819   new_path="$path"
44820 
44821   windows_path="$new_path"
44822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44823     unix_path=`$CYGPATH -u "$windows_path"`
44824     new_path="$unix_path"
44825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44827     new_path="$unix_path"
44828   fi
44829 
44830 
44831   # Now try to locate executable using which
44832   new_path=`$WHICH "$new_path" 2> /dev/null`
44833 
44834   if test "x$new_path" = x; then
44835     # Oops. Which didn't find the executable.
44836     # The splitting of arguments from the executable at a space might have been incorrect,
44837     # since paths with space are more likely in Windows. Give it another try with the whole
44838     # argument.
44839     path="$complete"
44840     arguments="EOL"
44841     new_path="$path"
44842 
44843   windows_path="$new_path"
44844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44845     unix_path=`$CYGPATH -u "$windows_path"`
44846     new_path="$unix_path"
44847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44848     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44849     new_path="$unix_path"
44850   fi
44851 
44852 
44853     new_path=`$WHICH "$new_path" 2> /dev/null`
44854     # bat and cmd files are not always considered executable in MSYS causing which
44855     # to not find them
44856     if test "x$new_path" = x \
44857         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44858         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44859       new_path="$path"
44860 
44861   windows_path="$new_path"
44862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44863     unix_path=`$CYGPATH -u "$windows_path"`
44864     new_path="$unix_path"
44865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44867     new_path="$unix_path"
44868   fi
44869 
44870     fi
44871 
44872     if test "x$new_path" = x; then
44873       # It's still not found. Now this is an unrecoverable error.
44874       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44875 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44876       has_space=`$ECHO "$complete" | $GREP " "`
44877       if test "x$has_space" != x; then
44878         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44879 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44880       fi
44881       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44882     fi
44883   fi
44884 
44885   # Now new_path has a complete unix path to the binary
44886   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44887     # Keep paths in /bin as-is, but remove trailing .exe if any
44888     new_path="${new_path/%.exe/}"
44889     # Do not save /bin paths to all_fixpath_prefixes!
44890   else
44891     # Not in mixed or Windows style, start by that.
44892     new_path=`cmd //c echo $new_path`
44893 
44894   input_path="$new_path"
44895   # Check if we need to convert this using DOS-style short mode. If the path
44896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44897   # take no chances and rewrite it.
44898   # Note: m4 eats our [], so we need to use [ and ] instead.
44899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44900   if test "x$has_forbidden_chars" != x; then
44901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44902     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44903   fi
44904 
44905     # Output is in $new_path
44906 
44907   windows_path="$new_path"
44908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44909     unix_path=`$CYGPATH -u "$windows_path"`
44910     new_path="$unix_path"
44911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44913     new_path="$unix_path"
44914   fi
44915 
44916     # remove trailing .exe if any
44917     new_path="${new_path/%.exe/}"
44918 
44919     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44920     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44921   fi
44922 
44923     else
44924       # We're on a unix platform. Hooray! :)
44925       # First separate the path from the arguments. This will split at the first
44926       # space.
44927       complete="$BUILD_AR"
44928       path="${complete%% *}"
44929       tmp="$complete EOL"
44930       arguments="${tmp#* }"
44931 
44932       # Cannot rely on the command "which" here since it doesn't always work.
44933       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44934       if test -z "$is_absolute_path"; then
44935         # Path to executable is not absolute. Find it.
44936         IFS_save="$IFS"
44937         IFS=:
44938         for p in $PATH; do
44939           if test -f "$p/$path" && test -x "$p/$path"; then
44940             new_path="$p/$path"
44941             break
44942           fi
44943         done
44944         IFS="$IFS_save"
44945       else
44946         # This is an absolute path, we can use it without further modifications.
44947         new_path="$path"
44948       fi
44949 
44950       if test "x$new_path" = x; then
44951         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44952 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44953         has_space=`$ECHO "$complete" | $GREP " "`
44954         if test "x$has_space" != x; then
44955           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44956 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44957         fi
44958         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44959       fi
44960     fi
44961 
44962     # Now join together the path and the arguments once again
44963     if test "x$arguments" != xEOL; then
44964       new_complete="$new_path ${arguments% *}"
44965     else
44966       new_complete="$new_path"
44967     fi
44968 
44969     if test "x$complete" != "x$new_complete"; then
44970       BUILD_AR="$new_complete"
44971       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44972 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44973     fi
44974   fi
44975 
44976     # Assume the C compiler is the assembler
44977     BUILD_AS="$BUILD_CC -c"
44978     # Just like for the target compiler, use the compiler as linker
44979     BUILD_LD="$BUILD_CC"
44980 
44981     PATH="$OLDPATH"
44982   else
44983     # If we are not cross compiling, use the normal target compilers for
44984     # building the build platform executables.
44985     BUILD_CC="$CC"
44986     BUILD_CXX="$CXX"
44987     BUILD_LD="$LD"
44988     BUILD_NM="$NM"
44989     BUILD_AS="$AS"
44990     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44991     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44992     BUILD_AR="$AR"
44993   fi
44994 
44995 
44996 
44997 
44998 
44999 
45000 
45001 
45002 
45003 
45004 
45005   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45006     # For hotspot, we need these in Windows mixed path,
45007     # so rewrite them all. Need added .exe suffix.
45008     HOTSPOT_CXX="$CXX.exe"
45009     HOTSPOT_LD="$LD.exe"
45010     HOTSPOT_MT="$MT.exe"
45011     HOTSPOT_RC="$RC.exe"
45012 
45013   unix_path="$HOTSPOT_CXX"
45014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45015     windows_path=`$CYGPATH -m "$unix_path"`
45016     HOTSPOT_CXX="$windows_path"
45017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45018     windows_path=`cmd //c echo $unix_path`
45019     HOTSPOT_CXX="$windows_path"
45020   fi
45021 
45022 
45023   unix_path="$HOTSPOT_LD"
45024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45025     windows_path=`$CYGPATH -m "$unix_path"`
45026     HOTSPOT_LD="$windows_path"
45027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45028     windows_path=`cmd //c echo $unix_path`
45029     HOTSPOT_LD="$windows_path"
45030   fi
45031 
45032 
45033   unix_path="$HOTSPOT_MT"
45034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45035     windows_path=`$CYGPATH -m "$unix_path"`
45036     HOTSPOT_MT="$windows_path"
45037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45038     windows_path=`cmd //c echo $unix_path`
45039     HOTSPOT_MT="$windows_path"
45040   fi
45041 
45042 
45043   unix_path="$HOTSPOT_RC"
45044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45045     windows_path=`$CYGPATH -m "$unix_path"`
45046     HOTSPOT_RC="$windows_path"
45047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45048     windows_path=`cmd //c echo $unix_path`
45049     HOTSPOT_RC="$windows_path"
45050   fi
45051 
45052 
45053 
45054   else
45055     HOTSPOT_CXX="$CXX"
45056     HOTSPOT_LD="$LD"
45057   fi
45058 
45059 
45060 
45061   if test  "x$TOOLCHAIN_TYPE" = xclang; then
45062     USE_CLANG=true
45063   fi
45064 
45065 
45066 
45067 
45068 
45069   # The package path is used only on macosx?
45070   # FIXME: clean this up, and/or move it elsewhere.
45071   PACKAGE_PATH=/opt/local
45072 
45073 
45074   # Check for extra potential brokenness.
45075   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45076     # On Windows, double-check that we got the right compiler.
45077     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
45078     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
45079     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
45080       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
45081         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
45082       fi
45083     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
45084       if test "x$COMPILER_CPU_TEST" != "xx64"; then
45085         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
45086       fi
45087     fi
45088   fi
45089 
45090   if test "x$TOOLCHAIN_TYPE" = xgcc; then
45091     # If this is a --hash-style=gnu system, use --hash-style=both, why?
45092     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
45093     # This is later checked when setting flags.
45094 
45095     # "-Og" suppported for GCC 4.8 and later
45096     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
45097 
45098   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
45099 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
45100   supports=yes
45101 
45102   saved_cflags="$CFLAGS"
45103   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
45104   ac_ext=c
45105 ac_cpp='$CPP $CPPFLAGS'
45106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45109 
45110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45111 /* end confdefs.h.  */
45112 int i;
45113 _ACEOF
45114 if ac_fn_c_try_compile "$LINENO"; then :
45115 
45116 else
45117   supports=no
45118 fi
45119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45120   ac_ext=cpp
45121 ac_cpp='$CXXCPP $CPPFLAGS'
45122 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45123 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45124 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45125 
45126   CFLAGS="$saved_cflags"
45127 
45128   saved_cxxflags="$CXXFLAGS"
45129   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
45130   ac_ext=cpp
45131 ac_cpp='$CXXCPP $CPPFLAGS'
45132 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45133 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45134 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45135 
45136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45137 /* end confdefs.h.  */
45138 int i;
45139 _ACEOF
45140 if ac_fn_cxx_try_compile "$LINENO"; then :
45141 
45142 else
45143   supports=no
45144 fi
45145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45146   ac_ext=cpp
45147 ac_cpp='$CXXCPP $CPPFLAGS'
45148 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45149 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45150 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45151 
45152   CXXFLAGS="$saved_cxxflags"
45153 
45154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45155 $as_echo "$supports" >&6; }
45156   if test "x$supports" = "xyes" ; then
45157     HAS_CFLAG_OPTIMIZE_DEBUG=true
45158   else
45159     HAS_CFLAG_OPTIMIZE_DEBUG=false
45160   fi
45161 
45162 
45163     # "-z relro" supported in GNU binutils 2.17 and later
45164     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
45165 
45166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
45167 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
45168   supports=yes
45169 
45170   saved_ldflags="$LDFLAGS"
45171   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
45172   ac_ext=c
45173 ac_cpp='$CPP $CPPFLAGS'
45174 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45175 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45176 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45177 
45178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45179 /* end confdefs.h.  */
45180 
45181 int
45182 main ()
45183 {
45184 
45185   ;
45186   return 0;
45187 }
45188 _ACEOF
45189 if ac_fn_c_try_link "$LINENO"; then :
45190 
45191 else
45192   supports=no
45193 fi
45194 rm -f core conftest.err conftest.$ac_objext \
45195     conftest$ac_exeext conftest.$ac_ext
45196   ac_ext=cpp
45197 ac_cpp='$CXXCPP $CPPFLAGS'
45198 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45199 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45200 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45201 
45202   LDFLAGS="$saved_ldflags"
45203 
45204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45205 $as_echo "$supports" >&6; }
45206   if test "x$supports" = "xyes" ; then
45207     HAS_LINKER_RELRO=true
45208   else
45209     HAS_LINKER_RELRO=false
45210   fi
45211 
45212 
45213     # "-z now" supported in GNU binutils 2.11 and later
45214     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
45215 
45216   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
45217 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
45218   supports=yes
45219 
45220   saved_ldflags="$LDFLAGS"
45221   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
45222   ac_ext=c
45223 ac_cpp='$CPP $CPPFLAGS'
45224 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45225 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45226 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45227 
45228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45229 /* end confdefs.h.  */
45230 
45231 int
45232 main ()
45233 {
45234 
45235   ;
45236   return 0;
45237 }
45238 _ACEOF
45239 if ac_fn_c_try_link "$LINENO"; then :
45240 
45241 else
45242   supports=no
45243 fi
45244 rm -f core conftest.err conftest.$ac_objext \
45245     conftest$ac_exeext conftest.$ac_ext
45246   ac_ext=cpp
45247 ac_cpp='$CXXCPP $CPPFLAGS'
45248 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45249 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45250 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45251 
45252   LDFLAGS="$saved_ldflags"
45253 
45254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45255 $as_echo "$supports" >&6; }
45256   if test "x$supports" = "xyes" ; then
45257     HAS_LINKER_NOW=true
45258   else
45259     HAS_LINKER_NOW=false
45260   fi
45261 
45262   fi
45263 
45264   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
45265   # in executable.'
45266   USING_BROKEN_SUSE_LD=no
45267   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
45268     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
45269 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
45270     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
45271     $ECHO "int main() { }" > main.c
45272     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
45273       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45274 $as_echo "no" >&6; }
45275       USING_BROKEN_SUSE_LD=no
45276     else
45277       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45278 $as_echo "yes" >&6; }
45279       USING_BROKEN_SUSE_LD=yes
45280     fi
45281     rm -rf version-script.map main.c a.out
45282   fi
45283 
45284 
45285 
45286 # Setup the JTReg Regression Test Harness.
45287 
45288 
45289 # Check whether --with-jtreg was given.
45290 if test "${with_jtreg+set}" = set; then :
45291   withval=$with_jtreg;
45292 else
45293   with_jtreg=no
45294 fi
45295 
45296 
45297   if test "x$with_jtreg" = xno; then
45298     # jtreg disabled
45299     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45300 $as_echo_n "checking for jtreg... " >&6; }
45301     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45302 $as_echo "no" >&6; }
45303   else
45304     if test "x$with_jtreg" != xyes; then
45305       # with path specified.
45306       JT_HOME="$with_jtreg"
45307     fi
45308 
45309     if test "x$JT_HOME" != x; then
45310       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45311 $as_echo_n "checking for jtreg... " >&6; }
45312 
45313       # use JT_HOME enviroment var.
45314 
45315   # Only process if variable expands to non-empty
45316 
45317   if test "x$JT_HOME" != x; then
45318     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45319 
45320   # Input might be given as Windows format, start by converting to
45321   # unix format.
45322   path="$JT_HOME"
45323   new_path=`$CYGPATH -u "$path"`
45324 
45325   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45326   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45327   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45328   # "foo.exe" is OK but "foo" is an error.
45329   #
45330   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45331   # It is also a way to make sure we got the proper file name for the real test later on.
45332   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45333   if test "x$test_shortpath" = x; then
45334     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45335 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45336     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45337   fi
45338 
45339   # Call helper function which possibly converts this using DOS-style short mode.
45340   # If so, the updated path is stored in $new_path.
45341 
45342   input_path="$new_path"
45343   # Check if we need to convert this using DOS-style short mode. If the path
45344   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45345   # take no chances and rewrite it.
45346   # Note: m4 eats our [], so we need to use [ and ] instead.
45347   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45348   if test "x$has_forbidden_chars" != x; then
45349     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45350     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45351     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45352     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45353       # Going to short mode and back again did indeed matter. Since short mode is
45354       # case insensitive, let's make it lowercase to improve readability.
45355       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45356       # Now convert it back to Unix-style (cygpath)
45357       input_path=`$CYGPATH -u "$shortmode_path"`
45358       new_path="$input_path"
45359     fi
45360   fi
45361 
45362   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45363   if test "x$test_cygdrive_prefix" = x; then
45364     # As a simple fix, exclude /usr/bin since it's not a real path.
45365     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45366       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45367       # a path prefixed by /cygdrive for fixpath to work.
45368       new_path="$CYGWIN_ROOT_PATH$input_path"
45369     fi
45370   fi
45371 
45372 
45373   if test "x$path" != "x$new_path"; then
45374     JT_HOME="$new_path"
45375     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45376 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45377   fi
45378 
45379     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45380 
45381   path="$JT_HOME"
45382   has_colon=`$ECHO $path | $GREP ^.:`
45383   new_path="$path"
45384   if test "x$has_colon" = x; then
45385     # Not in mixed or Windows style, start by that.
45386     new_path=`cmd //c echo $path`
45387   fi
45388 
45389 
45390   input_path="$new_path"
45391   # Check if we need to convert this using DOS-style short mode. If the path
45392   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45393   # take no chances and rewrite it.
45394   # Note: m4 eats our [], so we need to use [ and ] instead.
45395   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45396   if test "x$has_forbidden_chars" != x; then
45397     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45398     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45399   fi
45400 
45401 
45402   windows_path="$new_path"
45403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45404     unix_path=`$CYGPATH -u "$windows_path"`
45405     new_path="$unix_path"
45406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45407     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45408     new_path="$unix_path"
45409   fi
45410 
45411   if test "x$path" != "x$new_path"; then
45412     JT_HOME="$new_path"
45413     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45414 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45415   fi
45416 
45417   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45418   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45419 
45420     else
45421       # We're on a unix platform. Hooray! :)
45422       path="$JT_HOME"
45423       has_space=`$ECHO "$path" | $GREP " "`
45424       if test "x$has_space" != x; then
45425         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45426 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45427         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45428       fi
45429 
45430       # Use eval to expand a potential ~
45431       eval path="$path"
45432       if test ! -f "$path" && test ! -d "$path"; then
45433         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45434       fi
45435 
45436       JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45437     fi
45438   fi
45439 
45440 
45441       # jtreg win32 script works for everybody
45442       JTREGEXE="$JT_HOME/bin/jtreg"
45443 
45444       if test ! -f "$JTREGEXE"; then
45445         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45446       fi
45447 
45448       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45449 $as_echo "$JTREGEXE" >&6; }
45450     else
45451       # try to find jtreg on path
45452 
45453 
45454 
45455   # Publish this variable in the help.
45456 
45457 
45458   if [ -z "${JTREGEXE+x}" ]; then
45459     # The variable is not set by user, try to locate tool using the code snippet
45460     for ac_prog in jtreg
45461 do
45462   # Extract the first word of "$ac_prog", so it can be a program name with args.
45463 set dummy $ac_prog; ac_word=$2
45464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45465 $as_echo_n "checking for $ac_word... " >&6; }
45466 if ${ac_cv_path_JTREGEXE+:} false; then :
45467   $as_echo_n "(cached) " >&6
45468 else
45469   case $JTREGEXE in
45470   [\\/]* | ?:[\\/]*)
45471   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45472   ;;
45473   *)
45474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45475 for as_dir in $PATH
45476 do
45477   IFS=$as_save_IFS
45478   test -z "$as_dir" && as_dir=.
45479     for ac_exec_ext in '' $ac_executable_extensions; do
45480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45481     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45483     break 2
45484   fi
45485 done
45486   done
45487 IFS=$as_save_IFS
45488 
45489   ;;
45490 esac
45491 fi
45492 JTREGEXE=$ac_cv_path_JTREGEXE
45493 if test -n "$JTREGEXE"; then
45494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45495 $as_echo "$JTREGEXE" >&6; }
45496 else
45497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45498 $as_echo "no" >&6; }
45499 fi
45500 
45501 
45502   test -n "$JTREGEXE" && break
45503 done
45504 
45505   else
45506     # The variable is set, but is it from the command line or the environment?
45507 
45508     # Try to remove the string !JTREGEXE! from our list.
45509     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45510     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45511       # If it failed, the variable was not from the command line. Ignore it,
45512       # but warn the user (except for BASH, which is always set by the calling BASH).
45513       if test "xJTREGEXE" != xBASH; then
45514         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45515 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45516       fi
45517       # Try to locate tool using the code snippet
45518       for ac_prog in jtreg
45519 do
45520   # Extract the first word of "$ac_prog", so it can be a program name with args.
45521 set dummy $ac_prog; ac_word=$2
45522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45523 $as_echo_n "checking for $ac_word... " >&6; }
45524 if ${ac_cv_path_JTREGEXE+:} false; then :
45525   $as_echo_n "(cached) " >&6
45526 else
45527   case $JTREGEXE in
45528   [\\/]* | ?:[\\/]*)
45529   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45530   ;;
45531   *)
45532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45533 for as_dir in $PATH
45534 do
45535   IFS=$as_save_IFS
45536   test -z "$as_dir" && as_dir=.
45537     for ac_exec_ext in '' $ac_executable_extensions; do
45538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45539     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45541     break 2
45542   fi
45543 done
45544   done
45545 IFS=$as_save_IFS
45546 
45547   ;;
45548 esac
45549 fi
45550 JTREGEXE=$ac_cv_path_JTREGEXE
45551 if test -n "$JTREGEXE"; then
45552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45553 $as_echo "$JTREGEXE" >&6; }
45554 else
45555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45556 $as_echo "no" >&6; }
45557 fi
45558 
45559 
45560   test -n "$JTREGEXE" && break
45561 done
45562 
45563     else
45564       # If it succeeded, then it was overridden by the user. We will use it
45565       # for the tool.
45566 
45567       # First remove it from the list of overridden variables, so we can test
45568       # for unknown variables in the end.
45569       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45570 
45571       # Check if we try to supply an empty value
45572       if test "x$JTREGEXE" = x; then
45573         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45574 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45575         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45576 $as_echo_n "checking for JTREGEXE... " >&6; }
45577         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45578 $as_echo "disabled" >&6; }
45579       else
45580         # Check if the provided tool contains a complete path.
45581         tool_specified="$JTREGEXE"
45582         tool_basename="${tool_specified##*/}"
45583         if test "x$tool_basename" = "x$tool_specified"; then
45584           # A command without a complete path is provided, search $PATH.
45585           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45586 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45587           # Extract the first word of "$tool_basename", so it can be a program name with args.
45588 set dummy $tool_basename; ac_word=$2
45589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45590 $as_echo_n "checking for $ac_word... " >&6; }
45591 if ${ac_cv_path_JTREGEXE+:} false; then :
45592   $as_echo_n "(cached) " >&6
45593 else
45594   case $JTREGEXE in
45595   [\\/]* | ?:[\\/]*)
45596   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45597   ;;
45598   *)
45599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45600 for as_dir in $PATH
45601 do
45602   IFS=$as_save_IFS
45603   test -z "$as_dir" && as_dir=.
45604     for ac_exec_ext in '' $ac_executable_extensions; do
45605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45606     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45608     break 2
45609   fi
45610 done
45611   done
45612 IFS=$as_save_IFS
45613 
45614   ;;
45615 esac
45616 fi
45617 JTREGEXE=$ac_cv_path_JTREGEXE
45618 if test -n "$JTREGEXE"; then
45619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45620 $as_echo "$JTREGEXE" >&6; }
45621 else
45622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45623 $as_echo "no" >&6; }
45624 fi
45625 
45626 
45627           if test "x$JTREGEXE" = x; then
45628             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45629           fi
45630         else
45631           # Otherwise we believe it is a complete path. Use it as it is.
45632           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45633 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45634           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45635 $as_echo_n "checking for JTREGEXE... " >&6; }
45636           if test ! -x "$tool_specified"; then
45637             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45638 $as_echo "not found" >&6; }
45639             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45640           fi
45641           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45642 $as_echo "$tool_specified" >&6; }
45643         fi
45644       fi
45645     fi
45646 
45647   fi
45648 
45649 
45650 
45651   if test "x$JTREGEXE" = x; then
45652     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45653   fi
45654 
45655 
45656       JT_HOME="`$DIRNAME $JTREGEXE`"
45657     fi
45658   fi
45659 
45660 
45661 
45662 
45663 
45664 
45665   # Option used to tell the compiler whether to create 32- or 64-bit executables
45666   if test "x$TOOLCHAIN_TYPE" = xxlc; then
45667     COMPILER_TARGET_BITS_FLAG="-q"
45668   else
45669     COMPILER_TARGET_BITS_FLAG="-m"
45670   fi
45671 
45672 
45673   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45674   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45675     ARFLAGS="-r"
45676   elif test "x$OPENJDK_TARGET_OS" = xaix; then
45677     ARFLAGS="-X64"
45678   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45679     # lib.exe is used as AR to create static libraries.
45680     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45681   else
45682     ARFLAGS=""
45683   fi
45684 
45685 
45686   ## Setup strip.
45687   # FIXME: should this really be per platform, or should it be per toolchain type?
45688   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45689   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45690   if test "x$OPENJDK_TARGET_OS" = xlinux; then
45691     STRIPFLAGS="-g"
45692   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45693     STRIPFLAGS="-x"
45694   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45695     STRIPFLAGS="-S"
45696   elif test "x$OPENJDK_TARGET_OS" = xaix; then
45697     STRIPFLAGS="-X32_64"
45698   fi
45699 
45700 
45701 
45702   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45703     CC_OUT_OPTION=-Fo
45704     EXE_OUT_OPTION=-out:
45705     LD_OUT_OPTION=-out:
45706     AR_OUT_OPTION=-out:
45707   else
45708     # The option used to specify the target .o,.a or .so file.
45709     # When compiling, how to specify the to be created object file.
45710     CC_OUT_OPTION='-o$(SPACE)'
45711     # When linking, how to specify the to be created executable.
45712     EXE_OUT_OPTION='-o$(SPACE)'
45713     # When linking, how to specify the to be created dynamically linkable library.
45714     LD_OUT_OPTION='-o$(SPACE)'
45715     # When archiving, how to specify the to be create static archive for object files.
45716     AR_OUT_OPTION='rcs$(SPACE)'
45717   fi
45718 
45719 
45720 
45721 
45722 
45723   # On Windows, we need to set RC flags.
45724   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45725     RC_FLAGS="-nologo -l0x409"
45726     if test "x$VARIANT" = xOPT; then
45727       RC_FLAGS="$RC_FLAGS -DNDEBUG"
45728     fi
45729 
45730     # The version variables used to create RC_FLAGS may be overridden
45731     # in a custom configure script, or possibly the command line.
45732     # Let those variables be expanded at make time in spec.gmk.
45733     # The \$ are escaped to the shell, and the $(...) variables
45734     # are evaluated by make.
45735     RC_FLAGS="$RC_FLAGS \
45736         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
45737         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45738         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45739         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
45740         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45741         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
45742         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
45743   fi
45744 
45745 
45746   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45747     # silence copyright notice and other headers.
45748     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45749   fi
45750 
45751 
45752 # FIXME: Currently we must test this after toolchain but before flags. Fix!
45753 
45754 # Now we can test some aspects on the target using configure macros.
45755 
45756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45757 $as_echo_n "checking for ANSI C header files... " >&6; }
45758 if ${ac_cv_header_stdc+:} false; then :
45759   $as_echo_n "(cached) " >&6
45760 else
45761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45762 /* end confdefs.h.  */
45763 #include <stdlib.h>
45764 #include <stdarg.h>
45765 #include <string.h>
45766 #include <float.h>
45767 
45768 int
45769 main ()
45770 {
45771 
45772   ;
45773   return 0;
45774 }
45775 _ACEOF
45776 if ac_fn_cxx_try_compile "$LINENO"; then :
45777   ac_cv_header_stdc=yes
45778 else
45779   ac_cv_header_stdc=no
45780 fi
45781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45782 
45783 if test $ac_cv_header_stdc = yes; then
45784   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45785   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45786 /* end confdefs.h.  */
45787 #include <string.h>
45788 
45789 _ACEOF
45790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45791   $EGREP "memchr" >/dev/null 2>&1; then :
45792 
45793 else
45794   ac_cv_header_stdc=no
45795 fi
45796 rm -f conftest*
45797 
45798 fi
45799 
45800 if test $ac_cv_header_stdc = yes; then
45801   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45802   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45803 /* end confdefs.h.  */
45804 #include <stdlib.h>
45805 
45806 _ACEOF
45807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45808   $EGREP "free" >/dev/null 2>&1; then :
45809 
45810 else
45811   ac_cv_header_stdc=no
45812 fi
45813 rm -f conftest*
45814 
45815 fi
45816 
45817 if test $ac_cv_header_stdc = yes; then
45818   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45819   if test "$cross_compiling" = yes; then :
45820   :
45821 else
45822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45823 /* end confdefs.h.  */
45824 #include <ctype.h>
45825 #include <stdlib.h>
45826 #if ((' ' & 0x0FF) == 0x020)
45827 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45828 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45829 #else
45830 # define ISLOWER(c) \
45831                    (('a' <= (c) && (c) <= 'i') \
45832                      || ('j' <= (c) && (c) <= 'r') \
45833                      || ('s' <= (c) && (c) <= 'z'))
45834 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45835 #endif
45836 
45837 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45838 int
45839 main ()
45840 {
45841   int i;
45842   for (i = 0; i < 256; i++)
45843     if (XOR (islower (i), ISLOWER (i))
45844         || toupper (i) != TOUPPER (i))
45845       return 2;
45846   return 0;
45847 }
45848 _ACEOF
45849 if ac_fn_cxx_try_run "$LINENO"; then :
45850 
45851 else
45852   ac_cv_header_stdc=no
45853 fi
45854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45855   conftest.$ac_objext conftest.beam conftest.$ac_ext
45856 fi
45857 
45858 fi
45859 fi
45860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45861 $as_echo "$ac_cv_header_stdc" >&6; }
45862 if test $ac_cv_header_stdc = yes; then
45863 
45864 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
45865 
45866 fi
45867 
45868 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
45869 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45870                   inttypes.h stdint.h unistd.h
45871 do :
45872   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45873 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45874 "
45875 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45876   cat >>confdefs.h <<_ACEOF
45877 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45878 _ACEOF
45879 
45880 fi
45881 
45882 done
45883 
45884 
45885 
45886   ###############################################################################
45887   #
45888   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45889   # (The JVM can use 32 or 64 bit Java pointers but that decision
45890   # is made at runtime.)
45891   #
45892 
45893   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45894     # Always specify -m flag on Solaris
45895     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45896 
45897   # When we add flags to the "official" CFLAGS etc, we need to
45898   # keep track of these additions in ADDED_CFLAGS etc. These
45899   # will later be checked to make sure only controlled additions
45900   # have been made to CFLAGS etc.
45901   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45902   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45903   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45904 
45905   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45906   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45907   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45908 
45909   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45910   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45911   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45912 
45913   elif test "x$COMPILE_TYPE" = xreduced; then
45914     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45915       # Specify -m if running reduced on unix platforms
45916 
45917   # When we add flags to the "official" CFLAGS etc, we need to
45918   # keep track of these additions in ADDED_CFLAGS etc. These
45919   # will later be checked to make sure only controlled additions
45920   # have been made to CFLAGS etc.
45921   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45922   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45923   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45924 
45925   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45926   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45927   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45928 
45929   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45930   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45931   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45932 
45933     fi
45934   fi
45935 
45936   # Make compilation sanity check
45937   for ac_header in stdio.h
45938 do :
45939   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45940 if test "x$ac_cv_header_stdio_h" = xyes; then :
45941   cat >>confdefs.h <<_ACEOF
45942 #define HAVE_STDIO_H 1
45943 _ACEOF
45944 
45945 else
45946 
45947     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45948 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45949     if test "x$COMPILE_TYPE" = xreduced; then
45950 
45951   # Print a helpful message on how to acquire the necessary build dependency.
45952   # reduced is the help tag: freetype, cups, alsa etc
45953   MISSING_DEPENDENCY=reduced
45954 
45955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45956     cygwin_help $MISSING_DEPENDENCY
45957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45958     msys_help $MISSING_DEPENDENCY
45959   else
45960     PKGHANDLER_COMMAND=
45961 
45962     case $PKGHANDLER in
45963       apt-get)
45964         apt_help     $MISSING_DEPENDENCY ;;
45965       yum)
45966         yum_help     $MISSING_DEPENDENCY ;;
45967       port)
45968         port_help    $MISSING_DEPENDENCY ;;
45969       pkgutil)
45970         pkgutil_help $MISSING_DEPENDENCY ;;
45971       pkgadd)
45972         pkgadd_help  $MISSING_DEPENDENCY ;;
45973     esac
45974 
45975     if test "x$PKGHANDLER_COMMAND" != x; then
45976       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45977     fi
45978   fi
45979 
45980       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45981 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45982     elif test "x$COMPILE_TYPE" = xcross; then
45983       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45984 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45985     fi
45986     as_fn_error $? "Cannot continue." "$LINENO" 5
45987 
45988 fi
45989 
45990 done
45991 
45992 
45993   # The cast to long int works around a bug in the HP C Compiler
45994 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45995 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45996 # This bug is HP SR number 8606223364.
45997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45998 $as_echo_n "checking size of int *... " >&6; }
45999 if ${ac_cv_sizeof_int_p+:} false; then :
46000   $as_echo_n "(cached) " >&6
46001 else
46002   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46003 
46004 else
46005   if test "$ac_cv_type_int_p" = yes; then
46006      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46007 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46008 as_fn_error 77 "cannot compute sizeof (int *)
46009 See \`config.log' for more details" "$LINENO" 5; }
46010    else
46011      ac_cv_sizeof_int_p=0
46012    fi
46013 fi
46014 
46015 fi
46016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46017 $as_echo "$ac_cv_sizeof_int_p" >&6; }
46018 
46019 
46020 
46021 cat >>confdefs.h <<_ACEOF
46022 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
46023 _ACEOF
46024 
46025 
46026 
46027   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
46028   if test "x$ac_cv_sizeof_int_p" = x; then
46029     # The test failed, lets stick to the assumed value.
46030     { $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
46031 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
46032   else
46033     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46034 
46035     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46036       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
46037       # Let's try to implicitely set the compilers target architecture and retry the test
46038       { $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
46039 $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;}
46040       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
46041 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
46042 
46043   # When we add flags to the "official" CFLAGS etc, we need to
46044   # keep track of these additions in ADDED_CFLAGS etc. These
46045   # will later be checked to make sure only controlled additions
46046   # have been made to CFLAGS etc.
46047   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46048   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46049   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46050 
46051   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46052   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46053   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46054 
46055   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46056   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46057   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46058 
46059 
46060       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
46061       unset ac_cv_sizeof_int_p
46062       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
46063       cat >>confdefs.h <<_ACEOF
46064 #undef SIZEOF_INT_P
46065 _ACEOF
46066 
46067       # The cast to long int works around a bug in the HP C Compiler
46068 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46069 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46070 # This bug is HP SR number 8606223364.
46071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46072 $as_echo_n "checking size of int *... " >&6; }
46073 if ${ac_cv_sizeof_int_p+:} false; then :
46074   $as_echo_n "(cached) " >&6
46075 else
46076   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46077 
46078 else
46079   if test "$ac_cv_type_int_p" = yes; then
46080      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46081 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46082 as_fn_error 77 "cannot compute sizeof (int *)
46083 See \`config.log' for more details" "$LINENO" 5; }
46084    else
46085      ac_cv_sizeof_int_p=0
46086    fi
46087 fi
46088 
46089 fi
46090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46091 $as_echo "$ac_cv_sizeof_int_p" >&6; }
46092 
46093 
46094 
46095 cat >>confdefs.h <<_ACEOF
46096 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
46097 _ACEOF
46098 
46099 
46100 
46101       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46102 
46103       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46104         { $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
46105 $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;}
46106         if test "x$COMPILE_TYPE" = xreduced; then
46107 
46108   # Print a helpful message on how to acquire the necessary build dependency.
46109   # reduced is the help tag: freetype, cups, alsa etc
46110   MISSING_DEPENDENCY=reduced
46111 
46112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46113     cygwin_help $MISSING_DEPENDENCY
46114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46115     msys_help $MISSING_DEPENDENCY
46116   else
46117     PKGHANDLER_COMMAND=
46118 
46119     case $PKGHANDLER in
46120       apt-get)
46121         apt_help     $MISSING_DEPENDENCY ;;
46122       yum)
46123         yum_help     $MISSING_DEPENDENCY ;;
46124       port)
46125         port_help    $MISSING_DEPENDENCY ;;
46126       pkgutil)
46127         pkgutil_help $MISSING_DEPENDENCY ;;
46128       pkgadd)
46129         pkgadd_help  $MISSING_DEPENDENCY ;;
46130     esac
46131 
46132     if test "x$PKGHANDLER_COMMAND" != x; then
46133       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46134     fi
46135   fi
46136 
46137           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46138 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46139         elif test "x$COMPILE_TYPE" = xcross; then
46140           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46141 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46142         fi
46143         as_fn_error $? "Cannot continue." "$LINENO" 5
46144       fi
46145     fi
46146   fi
46147 
46148   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
46149 $as_echo_n "checking for target address size... " >&6; }
46150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
46151 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
46152 
46153 
46154   ###############################################################################
46155   #
46156   # Is the target little of big endian?
46157   #
46158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
46159 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
46160 if ${ac_cv_c_bigendian+:} false; then :
46161   $as_echo_n "(cached) " >&6
46162 else
46163   ac_cv_c_bigendian=unknown
46164     # See if we're dealing with a universal compiler.
46165     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46166 /* end confdefs.h.  */
46167 #ifndef __APPLE_CC__
46168                not a universal capable compiler
46169              #endif
46170              typedef int dummy;
46171 
46172 _ACEOF
46173 if ac_fn_cxx_try_compile "$LINENO"; then :
46174 
46175         # Check for potential -arch flags.  It is not universal unless
46176         # there are at least two -arch flags with different values.
46177         ac_arch=
46178         ac_prev=
46179         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
46180          if test -n "$ac_prev"; then
46181            case $ac_word in
46182              i?86 | x86_64 | ppc | ppc64)
46183                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
46184                  ac_arch=$ac_word
46185                else
46186                  ac_cv_c_bigendian=universal
46187                  break
46188                fi
46189                ;;
46190            esac
46191            ac_prev=
46192          elif test "x$ac_word" = "x-arch"; then
46193            ac_prev=arch
46194          fi
46195        done
46196 fi
46197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46198     if test $ac_cv_c_bigendian = unknown; then
46199       # See if sys/param.h defines the BYTE_ORDER macro.
46200       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46201 /* end confdefs.h.  */
46202 #include <sys/types.h>
46203              #include <sys/param.h>
46204 
46205 int
46206 main ()
46207 {
46208 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
46209                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
46210                      && LITTLE_ENDIAN)
46211               bogus endian macros
46212              #endif
46213 
46214   ;
46215   return 0;
46216 }
46217 _ACEOF
46218 if ac_fn_cxx_try_compile "$LINENO"; then :
46219   # It does; now see whether it defined to BIG_ENDIAN or not.
46220          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46221 /* end confdefs.h.  */
46222 #include <sys/types.h>
46223                 #include <sys/param.h>
46224 
46225 int
46226 main ()
46227 {
46228 #if BYTE_ORDER != BIG_ENDIAN
46229                  not big endian
46230                 #endif
46231 
46232   ;
46233   return 0;
46234 }
46235 _ACEOF
46236 if ac_fn_cxx_try_compile "$LINENO"; then :
46237   ac_cv_c_bigendian=yes
46238 else
46239   ac_cv_c_bigendian=no
46240 fi
46241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46242 fi
46243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46244     fi
46245     if test $ac_cv_c_bigendian = unknown; then
46246       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46247       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46248 /* end confdefs.h.  */
46249 #include <limits.h>
46250 
46251 int
46252 main ()
46253 {
46254 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46255               bogus endian macros
46256              #endif
46257 
46258   ;
46259   return 0;
46260 }
46261 _ACEOF
46262 if ac_fn_cxx_try_compile "$LINENO"; then :
46263   # It does; now see whether it defined to _BIG_ENDIAN or not.
46264          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46265 /* end confdefs.h.  */
46266 #include <limits.h>
46267 
46268 int
46269 main ()
46270 {
46271 #ifndef _BIG_ENDIAN
46272                  not big endian
46273                 #endif
46274 
46275   ;
46276   return 0;
46277 }
46278 _ACEOF
46279 if ac_fn_cxx_try_compile "$LINENO"; then :
46280   ac_cv_c_bigendian=yes
46281 else
46282   ac_cv_c_bigendian=no
46283 fi
46284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46285 fi
46286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46287     fi
46288     if test $ac_cv_c_bigendian = unknown; then
46289       # Compile a test program.
46290       if test "$cross_compiling" = yes; then :
46291   # Try to guess by grepping values from an object file.
46292          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46293 /* end confdefs.h.  */
46294 short int ascii_mm[] =
46295                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46296                 short int ascii_ii[] =
46297                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46298                 int use_ascii (int i) {
46299                   return ascii_mm[i] + ascii_ii[i];
46300                 }
46301                 short int ebcdic_ii[] =
46302                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46303                 short int ebcdic_mm[] =
46304                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46305                 int use_ebcdic (int i) {
46306                   return ebcdic_mm[i] + ebcdic_ii[i];
46307                 }
46308                 extern int foo;
46309 
46310 int
46311 main ()
46312 {
46313 return use_ascii (foo) == use_ebcdic (foo);
46314   ;
46315   return 0;
46316 }
46317 _ACEOF
46318 if ac_fn_cxx_try_compile "$LINENO"; then :
46319   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46320               ac_cv_c_bigendian=yes
46321             fi
46322             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46323               if test "$ac_cv_c_bigendian" = unknown; then
46324                 ac_cv_c_bigendian=no
46325               else
46326                 # finding both strings is unlikely to happen, but who knows?
46327                 ac_cv_c_bigendian=unknown
46328               fi
46329             fi
46330 fi
46331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46332 else
46333   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46334 /* end confdefs.h.  */
46335 $ac_includes_default
46336 int
46337 main ()
46338 {
46339 
46340              /* Are we little or big endian?  From Harbison&Steele.  */
46341              union
46342              {
46343                long int l;
46344                char c[sizeof (long int)];
46345              } u;
46346              u.l = 1;
46347              return u.c[sizeof (long int) - 1] == 1;
46348 
46349   ;
46350   return 0;
46351 }
46352 _ACEOF
46353 if ac_fn_cxx_try_run "$LINENO"; then :
46354   ac_cv_c_bigendian=no
46355 else
46356   ac_cv_c_bigendian=yes
46357 fi
46358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46359   conftest.$ac_objext conftest.beam conftest.$ac_ext
46360 fi
46361 
46362     fi
46363 fi
46364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46365 $as_echo "$ac_cv_c_bigendian" >&6; }
46366  case $ac_cv_c_bigendian in #(
46367    yes)
46368      ENDIAN="big";; #(
46369    no)
46370      ENDIAN="little" ;; #(
46371    universal)
46372      ENDIAN="universal_endianness"
46373      ;; #(
46374    *)
46375      ENDIAN="unknown" ;;
46376  esac
46377 
46378 
46379   if test "x$ENDIAN" = xuniversal_endianness; then
46380     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46381   fi
46382   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46383     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
46384   fi
46385 
46386 
46387 # Configure flags for the tools
46388 
46389   ###############################################################################
46390   #
46391   # How to compile shared libraries.
46392   #
46393 
46394   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46395     PICFLAG="-fPIC"
46396     C_FLAG_REORDER=''
46397     CXX_FLAG_REORDER=''
46398 
46399     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46400       # Linking is different on MacOSX
46401       if test "x$STATIC_BUILD" = xtrue; then
46402         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46403       else
46404         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46405       fi
46406       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46407       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46408       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46409       SET_SHARED_LIBRARY_MAPFILE=''
46410     else
46411       # Default works for linux, might work on other platforms as well.
46412       SHARED_LIBRARY_FLAGS='-shared'
46413       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46414       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46415       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46416       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46417     fi
46418   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46419     PICFLAG=''
46420     C_FLAG_REORDER=''
46421     CXX_FLAG_REORDER=''
46422 
46423     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46424       # Linking is different on MacOSX
46425       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46426       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46427       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46428       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46429       SET_SHARED_LIBRARY_MAPFILE=''
46430     else
46431       # Default works for linux, might work on other platforms as well.
46432       SHARED_LIBRARY_FLAGS='-shared'
46433       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46434       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46435       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46436       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46437     fi
46438   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46439     PICFLAG="-KPIC"
46440     C_FLAG_REORDER='-xF'
46441     CXX_FLAG_REORDER='-xF'
46442     SHARED_LIBRARY_FLAGS="-G"
46443     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46444     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46445     SET_SHARED_LIBRARY_NAME=''
46446     SET_SHARED_LIBRARY_MAPFILE='-M$1'
46447   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46448     PICFLAG="-qpic=large"
46449     C_FLAG_REORDER=''
46450     CXX_FLAG_REORDER=''
46451     SHARED_LIBRARY_FLAGS="-qmkshrobj"
46452     SET_EXECUTABLE_ORIGIN=""
46453     SET_SHARED_LIBRARY_ORIGIN=''
46454     SET_SHARED_LIBRARY_NAME=''
46455     SET_SHARED_LIBRARY_MAPFILE=''
46456   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46457     PICFLAG=""
46458     C_FLAG_REORDER=''
46459     CXX_FLAG_REORDER=''
46460     SHARED_LIBRARY_FLAGS="-LD"
46461     SET_EXECUTABLE_ORIGIN=''
46462     SET_SHARED_LIBRARY_ORIGIN=''
46463     SET_SHARED_LIBRARY_NAME=''
46464     SET_SHARED_LIBRARY_MAPFILE=''
46465   fi
46466 
46467 
46468 
46469 
46470 
46471 
46472 
46473 
46474   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46475     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46476     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46477     CFLAGS_JDKLIB_EXTRA='-xstrconst'
46478   fi
46479   # The (cross) compiler is now configured, we can now test capabilities
46480   # of the target platform.
46481 
46482 
46483 
46484   ###############################################################################
46485   #
46486   # Setup the opt flags for different compilers
46487   # and different operating systems.
46488   #
46489 
46490   # FIXME: this was indirectly the old default, but just inherited.
46491   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46492   #   C_FLAG_DEPS="-MMD -MF"
46493   # fi
46494 
46495   # Generate make dependency files
46496   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46497     C_FLAG_DEPS="-MMD -MF"
46498   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46499     C_FLAG_DEPS="-MMD -MF"
46500   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46501     C_FLAG_DEPS="-xMMD -xMF"
46502   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46503     C_FLAG_DEPS="-qmakedep=gcc -MF"
46504   fi
46505   CXX_FLAG_DEPS="$C_FLAG_DEPS"
46506 
46507 
46508 
46509   # Debug symbols
46510   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46511     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46512       # reduce from default "-g2" option to save space
46513       CFLAGS_DEBUG_SYMBOLS="-g1"
46514       CXXFLAGS_DEBUG_SYMBOLS="-g1"
46515     else
46516       CFLAGS_DEBUG_SYMBOLS="-g"
46517       CXXFLAGS_DEBUG_SYMBOLS="-g"
46518     fi
46519   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46520     CFLAGS_DEBUG_SYMBOLS="-g"
46521     CXXFLAGS_DEBUG_SYMBOLS="-g"
46522   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46523     CFLAGS_DEBUG_SYMBOLS="-g -xs"
46524     # FIXME: likely a bug, this disables debug symbols rather than enables them
46525     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46526   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46527     CFLAGS_DEBUG_SYMBOLS="-g"
46528     CXXFLAGS_DEBUG_SYMBOLS="-g"
46529   fi
46530 
46531 
46532 
46533   # bounds, memory and behavior checking options
46534   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46535     case $DEBUG_LEVEL in
46536     release )
46537       # no adjustment
46538       ;;
46539     fastdebug )
46540       # no adjustment
46541       ;;
46542     slowdebug )
46543       # Add runtime stack smashing and undefined behavior checks.
46544       # Not all versions of gcc support -fstack-protector
46545       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46546 
46547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46548 $as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46549   supports=yes
46550 
46551   saved_cflags="$CFLAGS"
46552   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46553   ac_ext=c
46554 ac_cpp='$CPP $CPPFLAGS'
46555 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46556 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46557 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46558 
46559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46560 /* end confdefs.h.  */
46561 int i;
46562 _ACEOF
46563 if ac_fn_c_try_compile "$LINENO"; then :
46564 
46565 else
46566   supports=no
46567 fi
46568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46569   ac_ext=cpp
46570 ac_cpp='$CXXCPP $CPPFLAGS'
46571 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46572 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46573 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46574 
46575   CFLAGS="$saved_cflags"
46576 
46577   saved_cxxflags="$CXXFLAGS"
46578   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46579   ac_ext=cpp
46580 ac_cpp='$CXXCPP $CPPFLAGS'
46581 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46582 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46583 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46584 
46585   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46586 /* end confdefs.h.  */
46587 int i;
46588 _ACEOF
46589 if ac_fn_cxx_try_compile "$LINENO"; then :
46590 
46591 else
46592   supports=no
46593 fi
46594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46595   ac_ext=cpp
46596 ac_cpp='$CXXCPP $CPPFLAGS'
46597 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46598 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46599 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46600 
46601   CXXFLAGS="$saved_cxxflags"
46602 
46603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46604 $as_echo "$supports" >&6; }
46605   if test "x$supports" = "xyes" ; then
46606     :
46607   else
46608     STACK_PROTECTOR_CFLAG=""
46609   fi
46610 
46611 
46612       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46613       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46614       ;;
46615     esac
46616   fi
46617 
46618   # Optimization levels
46619   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46620     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46621 
46622     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46623       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46624       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46625       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46626       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46627       C_O_FLAG_DEBUG="-xregs=no%frameptr"
46628       C_O_FLAG_NONE="-xregs=no%frameptr"
46629       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46630       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46631       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46632       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46633       CXX_O_FLAG_NONE="-xregs=no%frameptr"
46634       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46635         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46636         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46637       fi
46638     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46639       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46640       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46641       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46642       C_O_FLAG_DEBUG=""
46643       C_O_FLAG_NONE=""
46644       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46645       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46646       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46647       C_O_FLAG_DEBUG=""
46648       CXX_O_FLAG_NONE=""
46649     fi
46650   else
46651     # The remaining toolchains share opt flags between CC and CXX;
46652     # setup for C and duplicate afterwards.
46653     if test "x$TOOLCHAIN_TYPE" = xgcc; then
46654       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46655         # On MacOSX we optimize for size, something
46656         # we should do for all platforms?
46657         C_O_FLAG_HIGHEST="-Os"
46658         C_O_FLAG_HI="-Os"
46659         C_O_FLAG_NORM="-Os"
46660       else
46661         C_O_FLAG_HIGHEST="-O3"
46662         C_O_FLAG_HI="-O3"
46663         C_O_FLAG_NORM="-O2"
46664       fi
46665       C_O_FLAG_DEBUG="-O0"
46666       C_O_FLAG_NONE="-O0"
46667     elif test "x$TOOLCHAIN_TYPE" = xclang; then
46668       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46669         # On MacOSX we optimize for size, something
46670         # we should do for all platforms?
46671         C_O_FLAG_HIGHEST="-Os"
46672         C_O_FLAG_HI="-Os"
46673         C_O_FLAG_NORM="-Os"
46674       else
46675         C_O_FLAG_HIGHEST="-O3"
46676         C_O_FLAG_HI="-O3"
46677         C_O_FLAG_NORM="-O2"
46678       fi
46679       C_O_FLAG_DEBUG="-O0"
46680       C_O_FLAG_NONE="-O0"
46681     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46682       C_O_FLAG_HIGHEST="-O3"
46683       C_O_FLAG_HI="-O3 -qstrict"
46684       C_O_FLAG_NORM="-O2"
46685       C_O_FLAG_DEBUG="-qnoopt"
46686       C_O_FLAG_NONE="-qnoop"
46687     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46688       C_O_FLAG_HIGHEST="-O2"
46689       C_O_FLAG_HI="-O1"
46690       C_O_FLAG_NORM="-O1"
46691       C_O_FLAG_DEBUG="-Od"
46692       C_O_FLAG_NONE="-Od"
46693     fi
46694     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46695     CXX_O_FLAG_HI="$C_O_FLAG_HI"
46696     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46697     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46698     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46699   fi
46700 
46701   # Adjust optimization flags according to debug level.
46702   case $DEBUG_LEVEL in
46703     release )
46704       # no adjustment
46705       ;;
46706     fastdebug )
46707       # Not quite so much optimization
46708       C_O_FLAG_HI="$C_O_FLAG_NORM"
46709       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46710       ;;
46711     slowdebug )
46712       # Disable optimization
46713       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46714       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46715       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46716       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46717       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46718       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46719       ;;
46720   esac
46721 
46722 
46723 
46724 
46725 
46726 
46727 
46728 
46729 
46730 
46731 
46732 
46733 
46734   # Special extras...
46735   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46736     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46737       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46738       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46739     fi
46740     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46741     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46742   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46743     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46744     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46745   fi
46746 
46747   CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46748   CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46749   LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46750 
46751   ###############################################################################
46752   #
46753   # Now setup the CFLAGS and LDFLAGS for the JDK build.
46754   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46755   #
46756 
46757   # Setup compiler/platform specific flags into
46758   #    CFLAGS_JDK    - C Compiler flags
46759   #    CXXFLAGS_JDK  - C++ Compiler flags
46760   #    COMMON_CCXXFLAGS_JDK - common to C and C++
46761   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46762     if test "x$OPENJDK_TARGET_CPU" = xx86; then
46763       # Force compatibility with i586 on 32 bit intel platforms.
46764       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46765     fi
46766     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46767         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46768     case $OPENJDK_TARGET_CPU_ARCH in
46769       arm )
46770         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46771         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46772         ;;
46773       ppc )
46774         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46775         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46776         ;;
46777       * )
46778         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46779         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46780         ;;
46781     esac
46782   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46783     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46784     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46785       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46786     fi
46787 
46788     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46789     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46790   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46791     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46792     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46793   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46794     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46795         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
46796         -DWIN32_LEAN_AND_MEAN \
46797         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46798         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46799         -DWIN32 -DIAL"
46800     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46801       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46802     else
46803       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46804     fi
46805     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46806     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46807     # studio.
46808     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46809       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46810           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46811     fi
46812   fi
46813 
46814   ###############################################################################
46815 
46816   # Adjust flags according to debug level.
46817   case $DEBUG_LEVEL in
46818     fastdebug | slowdebug )
46819       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46820       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46821       JAVAC_FLAGS="$JAVAC_FLAGS -g"
46822       ;;
46823     release )
46824       ;;
46825     * )
46826       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46827       ;;
46828   esac
46829 
46830   # Setup LP64
46831   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46832 
46833   # Set some common defines. These works for all compilers, but assume
46834   # -D is universally accepted.
46835 
46836   # Setup endianness
46837   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46838     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46839     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46840     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46841     #   Note: -Dmacro         is the same as    #define macro 1
46842     #         -Dmacro=        is the same as    #define macro
46843     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46844       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46845     else
46846       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46847     fi
46848   else
46849     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46850     # are defined in the system?
46851     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46852       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46853     else
46854       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46855     fi
46856   fi
46857 
46858   # Setup target OS define. Use OS target name but in upper case.
46859   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46860   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46861 
46862   # Setup target CPU
46863   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46864 
46865   # Setup debug/release defines
46866   if test "x$DEBUG_LEVEL" = xrelease; then
46867     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46868     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46869       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46870     fi
46871   else
46872     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46873   fi
46874 
46875   # Set some additional per-OS defines.
46876   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46877     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46878   elif test "x$OPENJDK_TARGET_OS" = xaix; then
46879     # FIXME: PPC64 should not be here.
46880     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
46881   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46882     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46883   fi
46884 
46885   # Additional macosx handling
46886   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46887     # Setting these parameters makes it an error to link to macosx APIs that are
46888     # newer than the given OS version and makes the linked binaries compatible
46889     # even if built on a newer version of the OS.
46890     # The expected format is X.Y.Z
46891     MACOSX_VERSION_MIN=10.7.0
46892 
46893 
46894     # The macro takes the version with no dots, ex: 1070
46895     # Let the flags variables get resolved in make for easier override on make
46896     # command line.
46897     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46898     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46899   fi
46900 
46901   # Setup some hard coded includes
46902   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46903       -I${JDK_TOPDIR}/src/java.base/share/native/include \
46904       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46905       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46906       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46907       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46908 
46909   # The shared libraries are compiled using the picflag.
46910   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46911   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46912 
46913   # Executable flags
46914   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46915   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46916 
46917 
46918 
46919 
46920 
46921 
46922   # Flags for compiling test libraries
46923   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46924   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46925 
46926   # Flags for compiling test executables
46927   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46928   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46929 
46930 
46931 
46932 
46933 
46934 
46935   # Setup LDFLAGS et al.
46936   #
46937 
46938   # Now this is odd. The JDK native libraries have to link against libjvm.so
46939   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
46940   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
46941   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
46942   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
46943   # libraries will link to whatever is in memory. Yuck.
46944   #
46945   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
46946   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46947     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
46948     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46949       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
46950     fi
46951     # TODO: make -debug optional "--disable-full-debug-symbols"
46952     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
46953   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46954     # If this is a --hash-style=gnu system, use --hash-style=both, why?
46955     # We have previously set HAS_GNU_HASH if this is the case
46956     if test -n "$HAS_GNU_HASH"; then
46957       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
46958     fi
46959     if test "x$OPENJDK_TARGET_OS" = xlinux; then
46960       # And since we now know that the linker is gnu, then add -z defs, to forbid
46961       # undefined symbols in object files.
46962       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
46963       case $DEBUG_LEVEL in
46964         release )
46965           # tell linker to optimize libraries.
46966           # Should this be supplied to the OSS linker as well?
46967           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
46968           ;;
46969         slowdebug )
46970           if test "x$HAS_LINKER_NOW" = "xtrue"; then
46971             # do relocations at load
46972             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46973             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46974           fi
46975           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46976             # mark relocations read only
46977             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46978             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46979           fi
46980           ;;
46981         fastdebug )
46982           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46983             # mark relocations read only
46984             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46985             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46986           fi
46987           ;;
46988         * )
46989           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46990           ;;
46991         esac
46992     fi
46993   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46994     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
46995     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
46996   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46997     LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
46998   fi
46999 
47000   # Customize LDFLAGS for executables
47001 
47002   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
47003 
47004   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47005     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
47006       LDFLAGS_STACK_SIZE=1048576
47007     else
47008       LDFLAGS_STACK_SIZE=327680
47009     fi
47010     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
47011   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
47012     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
47013   fi
47014 
47015   # Customize LDFLAGS for libs
47016   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
47017 
47018   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47019     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
47020     JDKLIB_LIBS=""
47021   else
47022     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
47023         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
47024 
47025     # On some platforms (mac) the linker warns about non existing -L dirs.
47026     # Add server first if available. Linking aginst client does not always produce the same results.
47027     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
47028     # Default to server for other variants.
47029     if test "x$JVM_VARIANT_SERVER" = xtrue; then
47030       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47031     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
47032       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
47033     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
47034       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
47035     else
47036       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47037     fi
47038 
47039     JDKLIB_LIBS="-ljava -ljvm"
47040     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47041       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
47042     fi
47043   fi
47044 
47045 
47046 
47047 
47048 
47049 
47050 
47051   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
47052   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
47053 
47054 
47055 
47056 
47057 
47058   # Some Zero and Shark settings.
47059   # ZERO_ARCHFLAG tells the compiler which mode to build for
47060   case "${OPENJDK_TARGET_CPU}" in
47061     s390)
47062       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
47063       ;;
47064     *)
47065       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47066   esac
47067 
47068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
47069 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
47070   supports=yes
47071 
47072   saved_cflags="$CFLAGS"
47073   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
47074   ac_ext=c
47075 ac_cpp='$CPP $CPPFLAGS'
47076 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47077 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47078 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47079 
47080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47081 /* end confdefs.h.  */
47082 int i;
47083 _ACEOF
47084 if ac_fn_c_try_compile "$LINENO"; then :
47085 
47086 else
47087   supports=no
47088 fi
47089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47090   ac_ext=cpp
47091 ac_cpp='$CXXCPP $CPPFLAGS'
47092 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47093 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47094 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47095 
47096   CFLAGS="$saved_cflags"
47097 
47098   saved_cxxflags="$CXXFLAGS"
47099   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
47100   ac_ext=cpp
47101 ac_cpp='$CXXCPP $CPPFLAGS'
47102 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47103 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47104 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47105 
47106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47107 /* end confdefs.h.  */
47108 int i;
47109 _ACEOF
47110 if ac_fn_cxx_try_compile "$LINENO"; then :
47111 
47112 else
47113   supports=no
47114 fi
47115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47116   ac_ext=cpp
47117 ac_cpp='$CXXCPP $CPPFLAGS'
47118 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47119 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47120 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47121 
47122   CXXFLAGS="$saved_cxxflags"
47123 
47124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47125 $as_echo "$supports" >&6; }
47126   if test "x$supports" = "xyes" ; then
47127     :
47128   else
47129     ZERO_ARCHFLAG=""
47130   fi
47131 
47132 
47133 
47134   # Check that the compiler supports -mX (or -qX on AIX) flags
47135   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47136 
47137   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47138 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47139   supports=yes
47140 
47141   saved_cflags="$CFLAGS"
47142   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47143   ac_ext=c
47144 ac_cpp='$CPP $CPPFLAGS'
47145 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47146 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47147 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47148 
47149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47150 /* end confdefs.h.  */
47151 int i;
47152 _ACEOF
47153 if ac_fn_c_try_compile "$LINENO"; then :
47154 
47155 else
47156   supports=no
47157 fi
47158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47159   ac_ext=cpp
47160 ac_cpp='$CXXCPP $CPPFLAGS'
47161 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47162 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47163 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47164 
47165   CFLAGS="$saved_cflags"
47166 
47167   saved_cxxflags="$CXXFLAGS"
47168   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47169   ac_ext=cpp
47170 ac_cpp='$CXXCPP $CPPFLAGS'
47171 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47172 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47173 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47174 
47175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47176 /* end confdefs.h.  */
47177 int i;
47178 _ACEOF
47179 if ac_fn_cxx_try_compile "$LINENO"; then :
47180 
47181 else
47182   supports=no
47183 fi
47184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47185   ac_ext=cpp
47186 ac_cpp='$CXXCPP $CPPFLAGS'
47187 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47188 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47189 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47190 
47191   CXXFLAGS="$saved_cxxflags"
47192 
47193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47194 $as_echo "$supports" >&6; }
47195   if test "x$supports" = "xyes" ; then
47196     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47197   else
47198     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47199   fi
47200 
47201 
47202 
47203   # Check whether --enable-warnings-as-errors was given.
47204 if test "${enable_warnings_as_errors+set}" = set; then :
47205   enableval=$enable_warnings_as_errors;
47206 fi
47207 
47208 
47209   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47210 $as_echo_n "checking if native warnings are errors... " >&6; }
47211   if test "x$enable_warnings_as_errors" = "xyes"; then
47212     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47213 $as_echo "yes (explicitely set)" >&6; }
47214     WARNINGS_AS_ERRORS=true
47215   elif test "x$enable_warnings_as_errors" = "xno"; then
47216     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47217 $as_echo "no" >&6; }
47218     WARNINGS_AS_ERRORS=false
47219   elif test "x$enable_warnings_as_errors" = "x"; then
47220     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47221 $as_echo "yes (default)" >&6; }
47222     WARNINGS_AS_ERRORS=true
47223   else
47224     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47225   fi
47226 
47227   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47228     # Set legacy hotspot variable
47229     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47230   else
47231     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47232   fi
47233 
47234 
47235 
47236 
47237   case "${TOOLCHAIN_TYPE}" in
47238     microsoft)
47239       DISABLE_WARNING_PREFIX="-wd"
47240       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47241       ;;
47242     solstudio)
47243       DISABLE_WARNING_PREFIX="-erroff="
47244       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47245       ;;
47246     gcc)
47247       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47248 
47249   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47250 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47251   supports=yes
47252 
47253   saved_cflags="$CFLAGS"
47254   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47255   ac_ext=c
47256 ac_cpp='$CPP $CPPFLAGS'
47257 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47258 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47259 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47260 
47261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47262 /* end confdefs.h.  */
47263 int i;
47264 _ACEOF
47265 if ac_fn_c_try_compile "$LINENO"; then :
47266 
47267 else
47268   supports=no
47269 fi
47270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47271   ac_ext=cpp
47272 ac_cpp='$CXXCPP $CPPFLAGS'
47273 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47274 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47275 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47276 
47277   CFLAGS="$saved_cflags"
47278 
47279   saved_cxxflags="$CXXFLAGS"
47280   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47281   ac_ext=cpp
47282 ac_cpp='$CXXCPP $CPPFLAGS'
47283 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47284 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47285 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47286 
47287   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47288 /* end confdefs.h.  */
47289 int i;
47290 _ACEOF
47291 if ac_fn_cxx_try_compile "$LINENO"; then :
47292 
47293 else
47294   supports=no
47295 fi
47296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47297   ac_ext=cpp
47298 ac_cpp='$CXXCPP $CPPFLAGS'
47299 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47300 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47301 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47302 
47303   CXXFLAGS="$saved_cxxflags"
47304 
47305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47306 $as_echo "$supports" >&6; }
47307   if test "x$supports" = "xyes" ; then
47308     GCC_CAN_DISABLE_WARNINGS=true
47309   else
47310     GCC_CAN_DISABLE_WARNINGS=false
47311 
47312   fi
47313 
47314       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47315         DISABLE_WARNING_PREFIX="-Wno-"
47316       else
47317         DISABLE_WARNING_PREFIX=
47318       fi
47319       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47320       # Repeate the check for the BUILD_CC
47321       CC_OLD="$CC"
47322       CC="$BUILD_CC"
47323 
47324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47325 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47326   supports=yes
47327 
47328   saved_cflags="$CFLAGS"
47329   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47330   ac_ext=c
47331 ac_cpp='$CPP $CPPFLAGS'
47332 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47333 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47334 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47335 
47336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47337 /* end confdefs.h.  */
47338 int i;
47339 _ACEOF
47340 if ac_fn_c_try_compile "$LINENO"; then :
47341 
47342 else
47343   supports=no
47344 fi
47345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47346   ac_ext=cpp
47347 ac_cpp='$CXXCPP $CPPFLAGS'
47348 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47349 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47350 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47351 
47352   CFLAGS="$saved_cflags"
47353 
47354   saved_cxxflags="$CXXFLAGS"
47355   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47356   ac_ext=cpp
47357 ac_cpp='$CXXCPP $CPPFLAGS'
47358 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47359 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47360 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47361 
47362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47363 /* end confdefs.h.  */
47364 int i;
47365 _ACEOF
47366 if ac_fn_cxx_try_compile "$LINENO"; then :
47367 
47368 else
47369   supports=no
47370 fi
47371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47372   ac_ext=cpp
47373 ac_cpp='$CXXCPP $CPPFLAGS'
47374 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47375 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47376 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47377 
47378   CXXFLAGS="$saved_cxxflags"
47379 
47380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47381 $as_echo "$supports" >&6; }
47382   if test "x$supports" = "xyes" ; then
47383     BUILD_CC_CAN_DISABLE_WARNINGS=true
47384   else
47385     BUILD_CC_CAN_DISABLE_WARNINGS=false
47386 
47387   fi
47388 
47389       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47390         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47391       else
47392         BUILD_CC_DISABLE_WARNING_PREFIX=
47393       fi
47394       CC="$CC_OLD"
47395       ;;
47396     clang)
47397       DISABLE_WARNING_PREFIX="-Wno-"
47398       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47399       ;;
47400   esac
47401 
47402 
47403 
47404 
47405 # Setup debug symbols (need objcopy from the toolchain for that)
47406 
47407   #
47408   # ENABLE_DEBUG_SYMBOLS
47409   # This must be done after the toolchain is setup, since we're looking at objcopy.
47410   #
47411   # Check whether --enable-debug-symbols was given.
47412 if test "${enable_debug_symbols+set}" = set; then :
47413   enableval=$enable_debug_symbols;
47414 fi
47415 
47416 
47417   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
47418 $as_echo_n "checking if we should generate debug symbols... " >&6; }
47419 
47420   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
47421     # explicit enabling of enable-debug-symbols and can't find objcopy
47422     #   this is an error
47423     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
47424   fi
47425 
47426   if test "x$enable_debug_symbols" = "xyes"; then
47427     ENABLE_DEBUG_SYMBOLS=true
47428   elif test "x$enable_debug_symbols" = "xno"; then
47429     ENABLE_DEBUG_SYMBOLS=false
47430   else
47431     # Default is on if objcopy is found
47432     if test "x$OBJCOPY" != x; then
47433       ENABLE_DEBUG_SYMBOLS=true
47434     # MacOS X and Windows don't use objcopy but default is on for those OSes
47435     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
47436       ENABLE_DEBUG_SYMBOLS=true
47437     else
47438       ENABLE_DEBUG_SYMBOLS=false
47439     fi
47440   fi
47441 
47442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
47443 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
47444 
47445   #
47446   # ZIP_DEBUGINFO_FILES
47447   #
47448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
47449 $as_echo_n "checking if we should zip debug-info files... " >&6; }
47450   # Check whether --enable-zip-debug-info was given.
47451 if test "${enable_zip_debug_info+set}" = set; then :
47452   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
47453 else
47454   enable_zip_debug_info="yes"
47455 fi
47456 
47457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
47458 $as_echo "${enable_zip_debug_info}" >&6; }
47459 
47460   if test "x${enable_zip_debug_info}" = "xno"; then
47461     ZIP_DEBUGINFO_FILES=false
47462   else
47463     ZIP_DEBUGINFO_FILES=true
47464   fi
47465 
47466 
47467 
47468 
47469 
47470   # Check whether --enable-native-coverage was given.
47471 if test "${enable_native_coverage+set}" = set; then :
47472   enableval=$enable_native_coverage;
47473 fi
47474 
47475   GCOV_ENABLED="false"
47476   if test "x$enable_native_coverage" = "xyes"; then
47477     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47478       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47479 $as_echo_n "checking if native coverage is enabled... " >&6; }
47480       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47481 $as_echo "yes" >&6; }
47482       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47483       GCOV_LDFLAGS="-fprofile-arcs"
47484       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47485       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47486       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47487       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47488       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47489       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47490       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47491       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47492       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47493       GCOV_ENABLED="true"
47494     else
47495       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47496     fi
47497   elif test "x$enable_native_coverage" = "xno"; then
47498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47499 $as_echo_n "checking if native coverage is enabled... " >&6; }
47500     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47501 $as_echo "no" >&6; }
47502   elif test "x$enable_native_coverage" != "x"; then
47503     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47504   fi
47505 
47506 
47507 
47508 
47509 ###############################################################################
47510 #
47511 # Check dependencies for external and internal libraries.
47512 #
47513 ###############################################################################
47514 
47515 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47516 
47517   # When using cygwin or msys, we need a wrapper binary that renames
47518   # /cygdrive/c/ arguments into c:/ arguments and peeks into
47519   # @files and rewrites these too! This wrapper binary is
47520   # called fixpath.
47521   FIXPATH=
47522   if test "x$OPENJDK_BUILD_OS" = xwindows; then
47523     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47524 $as_echo_n "checking if fixpath can be created... " >&6; }
47525     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47526     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47527     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47528     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47529       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47530       FIXPATH="$FIXPATH_BIN -c"
47531     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47532       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47533       # @ was chosen as separator to minimize risk of other tools messing around with it
47534       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47535           | tr ' ' '\n' | grep '^/./' | sort | uniq`
47536       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47537       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47538     fi
47539     FIXPATH_SRC_W="$FIXPATH_SRC"
47540     FIXPATH_BIN_W="$FIXPATH_BIN"
47541 
47542   unix_path="$FIXPATH_SRC_W"
47543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47544     windows_path=`$CYGPATH -m "$unix_path"`
47545     FIXPATH_SRC_W="$windows_path"
47546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47547     windows_path=`cmd //c echo $unix_path`
47548     FIXPATH_SRC_W="$windows_path"
47549   fi
47550 
47551 
47552   unix_path="$FIXPATH_BIN_W"
47553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47554     windows_path=`$CYGPATH -m "$unix_path"`
47555     FIXPATH_BIN_W="$windows_path"
47556   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47557     windows_path=`cmd //c echo $unix_path`
47558     FIXPATH_BIN_W="$windows_path"
47559   fi
47560 
47561     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47562     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47563     cd $FIXPATH_DIR
47564     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47565     cd $CURDIR
47566 
47567     if test ! -x $FIXPATH_BIN; then
47568       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47569 $as_echo "no" >&6; }
47570       cat $FIXPATH_DIR/fixpath1.log
47571       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47572     fi
47573     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47574 $as_echo "yes" >&6; }
47575     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47576 $as_echo_n "checking if fixpath.exe works... " >&6; }
47577     cd $FIXPATH_DIR
47578     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47579         > $FIXPATH_DIR/fixpath2.log 2>&1
47580     cd $CURDIR
47581     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47582       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47583 $as_echo "no" >&6; }
47584       cat $FIXPATH_DIR/fixpath2.log
47585       as_fn_error $? "fixpath did not work!" "$LINENO" 5
47586     fi
47587     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47588 $as_echo "yes" >&6; }
47589 
47590     FIXPATH_DETACH_FLAG="--detach"
47591   fi
47592 
47593 
47594 
47595 
47596 
47597 
47598   # Check if X11 is needed
47599   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47600     # No X11 support on windows or macosx
47601     NEEDS_LIB_X11=false
47602   else
47603     if test "x$SUPPORT_HEADFUL" = xno; then
47604       # No X11 support if building headless-only
47605       NEEDS_LIB_X11=false
47606     else
47607       # All other instances need X11
47608       NEEDS_LIB_X11=true
47609     fi
47610   fi
47611 
47612   # Check if cups is needed
47613   if test "x$OPENJDK_TARGET_OS" = xwindows; then
47614     # Windows have a separate print system
47615     NEEDS_LIB_CUPS=false
47616   else
47617     NEEDS_LIB_CUPS=true
47618   fi
47619 
47620   # Check if freetype is needed
47621   if test "x$OPENJDK" = "xtrue"; then
47622     NEEDS_LIB_FREETYPE=true
47623   else
47624     NEEDS_LIB_FREETYPE=false
47625   fi
47626 
47627   # Check if alsa is needed
47628   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47629     NEEDS_LIB_ALSA=true
47630   else
47631     NEEDS_LIB_ALSA=false
47632   fi
47633 
47634   # Check if ffi is needed
47635   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47636     NEEDS_LIB_FFI=true
47637   else
47638     NEEDS_LIB_FFI=false
47639   fi
47640 
47641 
47642   # statically link libstdc++ before C++ ABI is stablized on Linux unless
47643   # dynamic build is configured on command line.
47644 
47645 # Check whether --with-stdc++lib was given.
47646 if test "${with_stdc__lib+set}" = set; then :
47647   withval=$with_stdc__lib;
47648         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47649                 && test "x$with_stdc__lib" != xdefault; then
47650           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47651         fi
47652 
47653 else
47654   with_stdc__lib=default
47655 
47656 fi
47657 
47658 
47659   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47660     # Test if -lstdc++ works.
47661     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47662 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47663     ac_ext=cpp
47664 ac_cpp='$CXXCPP $CPPFLAGS'
47665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47666 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47668 
47669     OLD_CXXFLAGS="$CXXFLAGS"
47670     CXXFLAGS="$CXXFLAGS -lstdc++"
47671     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47672 /* end confdefs.h.  */
47673 
47674 int
47675 main ()
47676 {
47677 return 0;
47678   ;
47679   return 0;
47680 }
47681 _ACEOF
47682 if ac_fn_cxx_try_link "$LINENO"; then :
47683   has_dynamic_libstdcxx=yes
47684 else
47685   has_dynamic_libstdcxx=no
47686 fi
47687 rm -f core conftest.err conftest.$ac_objext \
47688     conftest$ac_exeext conftest.$ac_ext
47689     CXXFLAGS="$OLD_CXXFLAGS"
47690     ac_ext=cpp
47691 ac_cpp='$CXXCPP $CPPFLAGS'
47692 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47693 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47694 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47695 
47696     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47697 $as_echo "$has_dynamic_libstdcxx" >&6; }
47698 
47699     # Test if stdc++ can be linked statically.
47700     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47701 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47702     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47703     ac_ext=cpp
47704 ac_cpp='$CXXCPP $CPPFLAGS'
47705 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47706 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47707 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47708 
47709     OLD_LIBS="$LIBS"
47710     OLD_CXX="$CXX"
47711     LIBS="$STATIC_STDCXX_FLAGS"
47712     CXX="$CC"
47713     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47714 /* end confdefs.h.  */
47715 
47716 int
47717 main ()
47718 {
47719 return 0;
47720   ;
47721   return 0;
47722 }
47723 _ACEOF
47724 if ac_fn_cxx_try_link "$LINENO"; then :
47725   has_static_libstdcxx=yes
47726 else
47727   has_static_libstdcxx=no
47728 fi
47729 rm -f core conftest.err conftest.$ac_objext \
47730     conftest$ac_exeext conftest.$ac_ext
47731     LIBS="$OLD_LIBS"
47732     CXX="$OLD_CXX"
47733     ac_ext=cpp
47734 ac_cpp='$CXXCPP $CPPFLAGS'
47735 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47736 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47737 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47738 
47739     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47740 $as_echo "$has_static_libstdcxx" >&6; }
47741 
47742     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47743       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47744     fi
47745 
47746     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47747       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47748     fi
47749 
47750     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47751       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47752     fi
47753 
47754     # If dynamic was requested, it's available since it would fail above otherwise.
47755     # If dynamic wasn't requested, go with static unless it isn't available.
47756     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47757 $as_echo_n "checking how to link with libstdc++... " >&6; }
47758     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47759       LIBCXX="$LIBCXX -lstdc++"
47760       LDCXX="$CXX"
47761       STATIC_CXX_SETTING="STATIC_CXX=false"
47762       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47763 $as_echo "dynamic" >&6; }
47764     else
47765       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47766       LDCXX="$CC"
47767       STATIC_CXX_SETTING="STATIC_CXX=true"
47768       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47769 $as_echo "static" >&6; }
47770     fi
47771   fi
47772 
47773 
47774   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47775   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47776     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47777   fi
47778 
47779   # TODO better (platform agnostic) test
47780   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47781     LIBCXX="-lstdc++"
47782   fi
47783 
47784 
47785   # Setup Windows runtime dlls
47786   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47787 
47788 
47789 # Check whether --with-msvcr-dll was given.
47790 if test "${with_msvcr_dll+set}" = set; then :
47791   withval=$with_msvcr_dll;
47792 fi
47793 
47794 
47795   if test "x$with_msvcr_dll" != x; then
47796     # If given explicitely by user, do not probe. If not present, fail directly.
47797 
47798   DLL_NAME="$MSVCR_NAME"
47799   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47800   METHOD="--with-msvcr-dll"
47801   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47802     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47803 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47804 
47805     # Need to check if the found msvcr is correct architecture
47806     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47807 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47808     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47809     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47810       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47811       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47812       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47813         CORRECT_MSVCR_ARCH="PE32 executable"
47814       else
47815         CORRECT_MSVCR_ARCH="PE32+ executable"
47816       fi
47817     else
47818       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47819         CORRECT_MSVCR_ARCH=386
47820       else
47821         CORRECT_MSVCR_ARCH=x86-64
47822       fi
47823     fi
47824     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47825       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47826 $as_echo "ok" >&6; }
47827       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47828 
47829   # Only process if variable expands to non-empty
47830 
47831   if test "x$MSVC_DLL" != x; then
47832     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47833 
47834   # Input might be given as Windows format, start by converting to
47835   # unix format.
47836   path="$MSVC_DLL"
47837   new_path=`$CYGPATH -u "$path"`
47838 
47839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47842   # "foo.exe" is OK but "foo" is an error.
47843   #
47844   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47845   # It is also a way to make sure we got the proper file name for the real test later on.
47846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47847   if test "x$test_shortpath" = x; then
47848     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47849 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47850     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47851   fi
47852 
47853   # Call helper function which possibly converts this using DOS-style short mode.
47854   # If so, the updated path is stored in $new_path.
47855 
47856   input_path="$new_path"
47857   # Check if we need to convert this using DOS-style short mode. If the path
47858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47859   # take no chances and rewrite it.
47860   # Note: m4 eats our [], so we need to use [ and ] instead.
47861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47862   if test "x$has_forbidden_chars" != x; then
47863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47864     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47865     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47866     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47867       # Going to short mode and back again did indeed matter. Since short mode is
47868       # case insensitive, let's make it lowercase to improve readability.
47869       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47870       # Now convert it back to Unix-style (cygpath)
47871       input_path=`$CYGPATH -u "$shortmode_path"`
47872       new_path="$input_path"
47873     fi
47874   fi
47875 
47876   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47877   if test "x$test_cygdrive_prefix" = x; then
47878     # As a simple fix, exclude /usr/bin since it's not a real path.
47879     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47880       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47881       # a path prefixed by /cygdrive for fixpath to work.
47882       new_path="$CYGWIN_ROOT_PATH$input_path"
47883     fi
47884   fi
47885 
47886 
47887   if test "x$path" != "x$new_path"; then
47888     MSVC_DLL="$new_path"
47889     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47890 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47891   fi
47892 
47893     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47894 
47895   path="$MSVC_DLL"
47896   has_colon=`$ECHO $path | $GREP ^.:`
47897   new_path="$path"
47898   if test "x$has_colon" = x; then
47899     # Not in mixed or Windows style, start by that.
47900     new_path=`cmd //c echo $path`
47901   fi
47902 
47903 
47904   input_path="$new_path"
47905   # Check if we need to convert this using DOS-style short mode. If the path
47906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47907   # take no chances and rewrite it.
47908   # Note: m4 eats our [], so we need to use [ and ] instead.
47909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47910   if test "x$has_forbidden_chars" != x; then
47911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47912     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47913   fi
47914 
47915 
47916   windows_path="$new_path"
47917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47918     unix_path=`$CYGPATH -u "$windows_path"`
47919     new_path="$unix_path"
47920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47922     new_path="$unix_path"
47923   fi
47924 
47925   if test "x$path" != "x$new_path"; then
47926     MSVC_DLL="$new_path"
47927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47928 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47929   fi
47930 
47931   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47932   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47933 
47934     else
47935       # We're on a unix platform. Hooray! :)
47936       path="$MSVC_DLL"
47937       has_space=`$ECHO "$path" | $GREP " "`
47938       if test "x$has_space" != x; then
47939         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47940 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47941         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47942       fi
47943 
47944       # Use eval to expand a potential ~
47945       eval path="$path"
47946       if test ! -f "$path" && test ! -d "$path"; then
47947         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47948       fi
47949 
47950       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47951     fi
47952   fi
47953 
47954       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47955 $as_echo_n "checking for $DLL_NAME... " >&6; }
47956       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47957 $as_echo "$MSVC_DLL" >&6; }
47958     else
47959       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47960 $as_echo "incorrect, ignoring" >&6; }
47961       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47962 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47963     fi
47964   fi
47965 
47966     if test "x$MSVC_DLL" = x; then
47967       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
47968     fi
47969     MSVCR_DLL="$MSVC_DLL"
47970   elif test "x$DEVKIT_MSVCR_DLL" != x; then
47971 
47972   DLL_NAME="$MSVCR_NAME"
47973   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
47974   METHOD="devkit"
47975   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47976     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47977 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47978 
47979     # Need to check if the found msvcr is correct architecture
47980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47981 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47982     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47983     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47984       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47985       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47986       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47987         CORRECT_MSVCR_ARCH="PE32 executable"
47988       else
47989         CORRECT_MSVCR_ARCH="PE32+ executable"
47990       fi
47991     else
47992       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47993         CORRECT_MSVCR_ARCH=386
47994       else
47995         CORRECT_MSVCR_ARCH=x86-64
47996       fi
47997     fi
47998     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47999       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48000 $as_echo "ok" >&6; }
48001       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48002 
48003   # Only process if variable expands to non-empty
48004 
48005   if test "x$MSVC_DLL" != x; then
48006     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48007 
48008   # Input might be given as Windows format, start by converting to
48009   # unix format.
48010   path="$MSVC_DLL"
48011   new_path=`$CYGPATH -u "$path"`
48012 
48013   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48014   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48015   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48016   # "foo.exe" is OK but "foo" is an error.
48017   #
48018   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48019   # It is also a way to make sure we got the proper file name for the real test later on.
48020   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48021   if test "x$test_shortpath" = x; then
48022     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48023 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48024     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48025   fi
48026 
48027   # Call helper function which possibly converts this using DOS-style short mode.
48028   # If so, the updated path is stored in $new_path.
48029 
48030   input_path="$new_path"
48031   # Check if we need to convert this using DOS-style short mode. If the path
48032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48033   # take no chances and rewrite it.
48034   # Note: m4 eats our [], so we need to use [ and ] instead.
48035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48036   if test "x$has_forbidden_chars" != x; then
48037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48038     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48039     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48040     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48041       # Going to short mode and back again did indeed matter. Since short mode is
48042       # case insensitive, let's make it lowercase to improve readability.
48043       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48044       # Now convert it back to Unix-style (cygpath)
48045       input_path=`$CYGPATH -u "$shortmode_path"`
48046       new_path="$input_path"
48047     fi
48048   fi
48049 
48050   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48051   if test "x$test_cygdrive_prefix" = x; then
48052     # As a simple fix, exclude /usr/bin since it's not a real path.
48053     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48054       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48055       # a path prefixed by /cygdrive for fixpath to work.
48056       new_path="$CYGWIN_ROOT_PATH$input_path"
48057     fi
48058   fi
48059 
48060 
48061   if test "x$path" != "x$new_path"; then
48062     MSVC_DLL="$new_path"
48063     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48064 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48065   fi
48066 
48067     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48068 
48069   path="$MSVC_DLL"
48070   has_colon=`$ECHO $path | $GREP ^.:`
48071   new_path="$path"
48072   if test "x$has_colon" = x; then
48073     # Not in mixed or Windows style, start by that.
48074     new_path=`cmd //c echo $path`
48075   fi
48076 
48077 
48078   input_path="$new_path"
48079   # Check if we need to convert this using DOS-style short mode. If the path
48080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48081   # take no chances and rewrite it.
48082   # Note: m4 eats our [], so we need to use [ and ] instead.
48083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48084   if test "x$has_forbidden_chars" != x; then
48085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48086     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48087   fi
48088 
48089 
48090   windows_path="$new_path"
48091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48092     unix_path=`$CYGPATH -u "$windows_path"`
48093     new_path="$unix_path"
48094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48096     new_path="$unix_path"
48097   fi
48098 
48099   if test "x$path" != "x$new_path"; then
48100     MSVC_DLL="$new_path"
48101     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48102 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48103   fi
48104 
48105   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48106   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48107 
48108     else
48109       # We're on a unix platform. Hooray! :)
48110       path="$MSVC_DLL"
48111       has_space=`$ECHO "$path" | $GREP " "`
48112       if test "x$has_space" != x; then
48113         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48114 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48115         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48116       fi
48117 
48118       # Use eval to expand a potential ~
48119       eval path="$path"
48120       if test ! -f "$path" && test ! -d "$path"; then
48121         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48122       fi
48123 
48124       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48125     fi
48126   fi
48127 
48128       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48129 $as_echo_n "checking for $DLL_NAME... " >&6; }
48130       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48131 $as_echo "$MSVC_DLL" >&6; }
48132     else
48133       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48134 $as_echo "incorrect, ignoring" >&6; }
48135       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48136 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48137     fi
48138   fi
48139 
48140     if test "x$MSVC_DLL" = x; then
48141       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48142     fi
48143     MSVCR_DLL="$MSVC_DLL"
48144   else
48145 
48146   DLL_NAME="${MSVCR_NAME}"
48147   MSVC_DLL=
48148 
48149   if test "x$MSVC_DLL" = x; then
48150     # Probe: Using well-known location from Visual Studio 10.0
48151     if test "x$VCINSTALLDIR" != x; then
48152       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48153 
48154   windows_path="$CYGWIN_VC_INSTALL_DIR"
48155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48156     unix_path=`$CYGPATH -u "$windows_path"`
48157     CYGWIN_VC_INSTALL_DIR="$unix_path"
48158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48160     CYGWIN_VC_INSTALL_DIR="$unix_path"
48161   fi
48162 
48163       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48164         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48165       else
48166         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48167       fi
48168       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48169 
48170   DLL_NAME="$DLL_NAME"
48171   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48172   METHOD="well-known location in VCINSTALLDIR"
48173   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48174     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48175 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48176 
48177     # Need to check if the found msvcr is correct architecture
48178     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48179 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48180     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48181     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48182       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48183       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48184       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48185         CORRECT_MSVCR_ARCH="PE32 executable"
48186       else
48187         CORRECT_MSVCR_ARCH="PE32+ executable"
48188       fi
48189     else
48190       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48191         CORRECT_MSVCR_ARCH=386
48192       else
48193         CORRECT_MSVCR_ARCH=x86-64
48194       fi
48195     fi
48196     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48197       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48198 $as_echo "ok" >&6; }
48199       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48200 
48201   # Only process if variable expands to non-empty
48202 
48203   if test "x$MSVC_DLL" != x; then
48204     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48205 
48206   # Input might be given as Windows format, start by converting to
48207   # unix format.
48208   path="$MSVC_DLL"
48209   new_path=`$CYGPATH -u "$path"`
48210 
48211   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48212   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48213   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48214   # "foo.exe" is OK but "foo" is an error.
48215   #
48216   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48217   # It is also a way to make sure we got the proper file name for the real test later on.
48218   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48219   if test "x$test_shortpath" = x; then
48220     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48221 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48222     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48223   fi
48224 
48225   # Call helper function which possibly converts this using DOS-style short mode.
48226   # If so, the updated path is stored in $new_path.
48227 
48228   input_path="$new_path"
48229   # Check if we need to convert this using DOS-style short mode. If the path
48230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48231   # take no chances and rewrite it.
48232   # Note: m4 eats our [], so we need to use [ and ] instead.
48233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48234   if test "x$has_forbidden_chars" != x; then
48235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48236     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48237     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48238     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48239       # Going to short mode and back again did indeed matter. Since short mode is
48240       # case insensitive, let's make it lowercase to improve readability.
48241       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48242       # Now convert it back to Unix-style (cygpath)
48243       input_path=`$CYGPATH -u "$shortmode_path"`
48244       new_path="$input_path"
48245     fi
48246   fi
48247 
48248   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48249   if test "x$test_cygdrive_prefix" = x; then
48250     # As a simple fix, exclude /usr/bin since it's not a real path.
48251     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48252       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48253       # a path prefixed by /cygdrive for fixpath to work.
48254       new_path="$CYGWIN_ROOT_PATH$input_path"
48255     fi
48256   fi
48257 
48258 
48259   if test "x$path" != "x$new_path"; then
48260     MSVC_DLL="$new_path"
48261     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48262 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48263   fi
48264 
48265     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48266 
48267   path="$MSVC_DLL"
48268   has_colon=`$ECHO $path | $GREP ^.:`
48269   new_path="$path"
48270   if test "x$has_colon" = x; then
48271     # Not in mixed or Windows style, start by that.
48272     new_path=`cmd //c echo $path`
48273   fi
48274 
48275 
48276   input_path="$new_path"
48277   # Check if we need to convert this using DOS-style short mode. If the path
48278   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48279   # take no chances and rewrite it.
48280   # Note: m4 eats our [], so we need to use [ and ] instead.
48281   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48282   if test "x$has_forbidden_chars" != x; then
48283     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48284     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48285   fi
48286 
48287 
48288   windows_path="$new_path"
48289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48290     unix_path=`$CYGPATH -u "$windows_path"`
48291     new_path="$unix_path"
48292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48294     new_path="$unix_path"
48295   fi
48296 
48297   if test "x$path" != "x$new_path"; then
48298     MSVC_DLL="$new_path"
48299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48300 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48301   fi
48302 
48303   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48304   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48305 
48306     else
48307       # We're on a unix platform. Hooray! :)
48308       path="$MSVC_DLL"
48309       has_space=`$ECHO "$path" | $GREP " "`
48310       if test "x$has_space" != x; then
48311         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48312 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48313         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48314       fi
48315 
48316       # Use eval to expand a potential ~
48317       eval path="$path"
48318       if test ! -f "$path" && test ! -d "$path"; then
48319         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48320       fi
48321 
48322       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48323     fi
48324   fi
48325 
48326       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48327 $as_echo_n "checking for $DLL_NAME... " >&6; }
48328       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48329 $as_echo "$MSVC_DLL" >&6; }
48330     else
48331       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48332 $as_echo "incorrect, ignoring" >&6; }
48333       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48334 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48335     fi
48336   fi
48337 
48338     fi
48339   fi
48340 
48341   if test "x$MSVC_DLL" = x; then
48342     # Probe: Check in the Boot JDK directory.
48343     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48344 
48345   DLL_NAME="$DLL_NAME"
48346   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48347   METHOD="well-known location in Boot JDK"
48348   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48349     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48350 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48351 
48352     # Need to check if the found msvcr is correct architecture
48353     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48354 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48355     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48356     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48357       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48358       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48359       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48360         CORRECT_MSVCR_ARCH="PE32 executable"
48361       else
48362         CORRECT_MSVCR_ARCH="PE32+ executable"
48363       fi
48364     else
48365       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48366         CORRECT_MSVCR_ARCH=386
48367       else
48368         CORRECT_MSVCR_ARCH=x86-64
48369       fi
48370     fi
48371     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48372       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48373 $as_echo "ok" >&6; }
48374       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48375 
48376   # Only process if variable expands to non-empty
48377 
48378   if test "x$MSVC_DLL" != x; then
48379     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48380 
48381   # Input might be given as Windows format, start by converting to
48382   # unix format.
48383   path="$MSVC_DLL"
48384   new_path=`$CYGPATH -u "$path"`
48385 
48386   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48387   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48388   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48389   # "foo.exe" is OK but "foo" is an error.
48390   #
48391   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48392   # It is also a way to make sure we got the proper file name for the real test later on.
48393   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48394   if test "x$test_shortpath" = x; then
48395     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48396 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48397     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48398   fi
48399 
48400   # Call helper function which possibly converts this using DOS-style short mode.
48401   # If so, the updated path is stored in $new_path.
48402 
48403   input_path="$new_path"
48404   # Check if we need to convert this using DOS-style short mode. If the path
48405   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48406   # take no chances and rewrite it.
48407   # Note: m4 eats our [], so we need to use [ and ] instead.
48408   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48409   if test "x$has_forbidden_chars" != x; then
48410     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48411     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48412     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48413     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48414       # Going to short mode and back again did indeed matter. Since short mode is
48415       # case insensitive, let's make it lowercase to improve readability.
48416       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48417       # Now convert it back to Unix-style (cygpath)
48418       input_path=`$CYGPATH -u "$shortmode_path"`
48419       new_path="$input_path"
48420     fi
48421   fi
48422 
48423   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48424   if test "x$test_cygdrive_prefix" = x; then
48425     # As a simple fix, exclude /usr/bin since it's not a real path.
48426     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48427       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48428       # a path prefixed by /cygdrive for fixpath to work.
48429       new_path="$CYGWIN_ROOT_PATH$input_path"
48430     fi
48431   fi
48432 
48433 
48434   if test "x$path" != "x$new_path"; then
48435     MSVC_DLL="$new_path"
48436     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48437 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48438   fi
48439 
48440     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48441 
48442   path="$MSVC_DLL"
48443   has_colon=`$ECHO $path | $GREP ^.:`
48444   new_path="$path"
48445   if test "x$has_colon" = x; then
48446     # Not in mixed or Windows style, start by that.
48447     new_path=`cmd //c echo $path`
48448   fi
48449 
48450 
48451   input_path="$new_path"
48452   # Check if we need to convert this using DOS-style short mode. If the path
48453   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48454   # take no chances and rewrite it.
48455   # Note: m4 eats our [], so we need to use [ and ] instead.
48456   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48457   if test "x$has_forbidden_chars" != x; then
48458     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48459     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48460   fi
48461 
48462 
48463   windows_path="$new_path"
48464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48465     unix_path=`$CYGPATH -u "$windows_path"`
48466     new_path="$unix_path"
48467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48469     new_path="$unix_path"
48470   fi
48471 
48472   if test "x$path" != "x$new_path"; then
48473     MSVC_DLL="$new_path"
48474     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48475 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48476   fi
48477 
48478   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48479   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48480 
48481     else
48482       # We're on a unix platform. Hooray! :)
48483       path="$MSVC_DLL"
48484       has_space=`$ECHO "$path" | $GREP " "`
48485       if test "x$has_space" != x; then
48486         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48487 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48488         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48489       fi
48490 
48491       # Use eval to expand a potential ~
48492       eval path="$path"
48493       if test ! -f "$path" && test ! -d "$path"; then
48494         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48495       fi
48496 
48497       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48498     fi
48499   fi
48500 
48501       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48502 $as_echo_n "checking for $DLL_NAME... " >&6; }
48503       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48504 $as_echo "$MSVC_DLL" >&6; }
48505     else
48506       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48507 $as_echo "incorrect, ignoring" >&6; }
48508       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48509 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48510     fi
48511   fi
48512 
48513   fi
48514 
48515   if test "x$MSVC_DLL" = x; then
48516     # Probe: Look in the Windows system32 directory
48517     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48518 
48519   windows_path="$CYGWIN_SYSTEMROOT"
48520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48521     unix_path=`$CYGPATH -u "$windows_path"`
48522     CYGWIN_SYSTEMROOT="$unix_path"
48523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48525     CYGWIN_SYSTEMROOT="$unix_path"
48526   fi
48527 
48528     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48529 
48530   DLL_NAME="$DLL_NAME"
48531   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48532   METHOD="well-known location in SYSTEMROOT"
48533   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48534     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48535 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48536 
48537     # Need to check if the found msvcr is correct architecture
48538     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48539 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48540     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48541     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48542       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48543       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48544       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48545         CORRECT_MSVCR_ARCH="PE32 executable"
48546       else
48547         CORRECT_MSVCR_ARCH="PE32+ executable"
48548       fi
48549     else
48550       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48551         CORRECT_MSVCR_ARCH=386
48552       else
48553         CORRECT_MSVCR_ARCH=x86-64
48554       fi
48555     fi
48556     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48557       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48558 $as_echo "ok" >&6; }
48559       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48560 
48561   # Only process if variable expands to non-empty
48562 
48563   if test "x$MSVC_DLL" != x; then
48564     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48565 
48566   # Input might be given as Windows format, start by converting to
48567   # unix format.
48568   path="$MSVC_DLL"
48569   new_path=`$CYGPATH -u "$path"`
48570 
48571   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48572   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48573   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48574   # "foo.exe" is OK but "foo" is an error.
48575   #
48576   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48577   # It is also a way to make sure we got the proper file name for the real test later on.
48578   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48579   if test "x$test_shortpath" = x; then
48580     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48581 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48582     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48583   fi
48584 
48585   # Call helper function which possibly converts this using DOS-style short mode.
48586   # If so, the updated path is stored in $new_path.
48587 
48588   input_path="$new_path"
48589   # Check if we need to convert this using DOS-style short mode. If the path
48590   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48591   # take no chances and rewrite it.
48592   # Note: m4 eats our [], so we need to use [ and ] instead.
48593   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48594   if test "x$has_forbidden_chars" != x; then
48595     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48596     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48597     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48598     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48599       # Going to short mode and back again did indeed matter. Since short mode is
48600       # case insensitive, let's make it lowercase to improve readability.
48601       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48602       # Now convert it back to Unix-style (cygpath)
48603       input_path=`$CYGPATH -u "$shortmode_path"`
48604       new_path="$input_path"
48605     fi
48606   fi
48607 
48608   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48609   if test "x$test_cygdrive_prefix" = x; then
48610     # As a simple fix, exclude /usr/bin since it's not a real path.
48611     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48612       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48613       # a path prefixed by /cygdrive for fixpath to work.
48614       new_path="$CYGWIN_ROOT_PATH$input_path"
48615     fi
48616   fi
48617 
48618 
48619   if test "x$path" != "x$new_path"; then
48620     MSVC_DLL="$new_path"
48621     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48622 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48623   fi
48624 
48625     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48626 
48627   path="$MSVC_DLL"
48628   has_colon=`$ECHO $path | $GREP ^.:`
48629   new_path="$path"
48630   if test "x$has_colon" = x; then
48631     # Not in mixed or Windows style, start by that.
48632     new_path=`cmd //c echo $path`
48633   fi
48634 
48635 
48636   input_path="$new_path"
48637   # Check if we need to convert this using DOS-style short mode. If the path
48638   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48639   # take no chances and rewrite it.
48640   # Note: m4 eats our [], so we need to use [ and ] instead.
48641   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48642   if test "x$has_forbidden_chars" != x; then
48643     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48644     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48645   fi
48646 
48647 
48648   windows_path="$new_path"
48649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48650     unix_path=`$CYGPATH -u "$windows_path"`
48651     new_path="$unix_path"
48652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48654     new_path="$unix_path"
48655   fi
48656 
48657   if test "x$path" != "x$new_path"; then
48658     MSVC_DLL="$new_path"
48659     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48660 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48661   fi
48662 
48663   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48664   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48665 
48666     else
48667       # We're on a unix platform. Hooray! :)
48668       path="$MSVC_DLL"
48669       has_space=`$ECHO "$path" | $GREP " "`
48670       if test "x$has_space" != x; then
48671         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48672 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48673         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48674       fi
48675 
48676       # Use eval to expand a potential ~
48677       eval path="$path"
48678       if test ! -f "$path" && test ! -d "$path"; then
48679         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48680       fi
48681 
48682       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48683     fi
48684   fi
48685 
48686       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48687 $as_echo_n "checking for $DLL_NAME... " >&6; }
48688       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48689 $as_echo "$MSVC_DLL" >&6; }
48690     else
48691       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48692 $as_echo "incorrect, ignoring" >&6; }
48693       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48694 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48695     fi
48696   fi
48697 
48698   fi
48699 
48700   if test "x$MSVC_DLL" = x; then
48701     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48702     if test "x$VS100COMNTOOLS" != x; then
48703       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48704 
48705   windows_path="$CYGWIN_VS_TOOLS_DIR"
48706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48707     unix_path=`$CYGPATH -u "$windows_path"`
48708     CYGWIN_VS_TOOLS_DIR="$unix_path"
48709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48711     CYGWIN_VS_TOOLS_DIR="$unix_path"
48712   fi
48713 
48714       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48715         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48716             | $GREP -i /x64/ | $HEAD --lines 1`
48717       else
48718         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48719             | $GREP -i /x86/ | $HEAD --lines 1`
48720       fi
48721 
48722   DLL_NAME="$DLL_NAME"
48723   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48724   METHOD="search of VS100COMNTOOLS"
48725   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48726     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48727 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48728 
48729     # Need to check if the found msvcr is correct architecture
48730     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48731 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48732     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48733     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48734       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48735       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48736       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48737         CORRECT_MSVCR_ARCH="PE32 executable"
48738       else
48739         CORRECT_MSVCR_ARCH="PE32+ executable"
48740       fi
48741     else
48742       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48743         CORRECT_MSVCR_ARCH=386
48744       else
48745         CORRECT_MSVCR_ARCH=x86-64
48746       fi
48747     fi
48748     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48749       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48750 $as_echo "ok" >&6; }
48751       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48752 
48753   # Only process if variable expands to non-empty
48754 
48755   if test "x$MSVC_DLL" != x; then
48756     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48757 
48758   # Input might be given as Windows format, start by converting to
48759   # unix format.
48760   path="$MSVC_DLL"
48761   new_path=`$CYGPATH -u "$path"`
48762 
48763   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48764   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48765   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48766   # "foo.exe" is OK but "foo" is an error.
48767   #
48768   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48769   # It is also a way to make sure we got the proper file name for the real test later on.
48770   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48771   if test "x$test_shortpath" = x; then
48772     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48773 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48774     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48775   fi
48776 
48777   # Call helper function which possibly converts this using DOS-style short mode.
48778   # If so, the updated path is stored in $new_path.
48779 
48780   input_path="$new_path"
48781   # Check if we need to convert this using DOS-style short mode. If the path
48782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48783   # take no chances and rewrite it.
48784   # Note: m4 eats our [], so we need to use [ and ] instead.
48785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48786   if test "x$has_forbidden_chars" != x; then
48787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48791       # Going to short mode and back again did indeed matter. Since short mode is
48792       # case insensitive, let's make it lowercase to improve readability.
48793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48794       # Now convert it back to Unix-style (cygpath)
48795       input_path=`$CYGPATH -u "$shortmode_path"`
48796       new_path="$input_path"
48797     fi
48798   fi
48799 
48800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48801   if test "x$test_cygdrive_prefix" = x; then
48802     # As a simple fix, exclude /usr/bin since it's not a real path.
48803     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48805       # a path prefixed by /cygdrive for fixpath to work.
48806       new_path="$CYGWIN_ROOT_PATH$input_path"
48807     fi
48808   fi
48809 
48810 
48811   if test "x$path" != "x$new_path"; then
48812     MSVC_DLL="$new_path"
48813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48814 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48815   fi
48816 
48817     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48818 
48819   path="$MSVC_DLL"
48820   has_colon=`$ECHO $path | $GREP ^.:`
48821   new_path="$path"
48822   if test "x$has_colon" = x; then
48823     # Not in mixed or Windows style, start by that.
48824     new_path=`cmd //c echo $path`
48825   fi
48826 
48827 
48828   input_path="$new_path"
48829   # Check if we need to convert this using DOS-style short mode. If the path
48830   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48831   # take no chances and rewrite it.
48832   # Note: m4 eats our [], so we need to use [ and ] instead.
48833   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48834   if test "x$has_forbidden_chars" != x; then
48835     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48836     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48837   fi
48838 
48839 
48840   windows_path="$new_path"
48841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48842     unix_path=`$CYGPATH -u "$windows_path"`
48843     new_path="$unix_path"
48844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48846     new_path="$unix_path"
48847   fi
48848 
48849   if test "x$path" != "x$new_path"; then
48850     MSVC_DLL="$new_path"
48851     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48852 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48853   fi
48854 
48855   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48856   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48857 
48858     else
48859       # We're on a unix platform. Hooray! :)
48860       path="$MSVC_DLL"
48861       has_space=`$ECHO "$path" | $GREP " "`
48862       if test "x$has_space" != x; then
48863         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48864 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48865         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48866       fi
48867 
48868       # Use eval to expand a potential ~
48869       eval path="$path"
48870       if test ! -f "$path" && test ! -d "$path"; then
48871         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48872       fi
48873 
48874       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48875     fi
48876   fi
48877 
48878       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48879 $as_echo_n "checking for $DLL_NAME... " >&6; }
48880       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48881 $as_echo "$MSVC_DLL" >&6; }
48882     else
48883       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48884 $as_echo "incorrect, ignoring" >&6; }
48885       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48886 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48887     fi
48888   fi
48889 
48890     fi
48891   fi
48892 
48893   if test "x$MSVC_DLL" = x; then
48894     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48895     # (This was the original behaviour; kept since it might turn something up)
48896     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48897       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48898         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48899             | $GREP x64 | $HEAD --lines 1`
48900       else
48901         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48902             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48903         if test "x$POSSIBLE_MSVC_DLL" = x; then
48904           # We're grasping at straws now...
48905           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48906               | $HEAD --lines 1`
48907         fi
48908       fi
48909 
48910 
48911   DLL_NAME="$DLL_NAME"
48912   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48913   METHOD="search of VCINSTALLDIR"
48914   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48915     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48916 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48917 
48918     # Need to check if the found msvcr is correct architecture
48919     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48920 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48921     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48922     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48923       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48924       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48925       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48926         CORRECT_MSVCR_ARCH="PE32 executable"
48927       else
48928         CORRECT_MSVCR_ARCH="PE32+ executable"
48929       fi
48930     else
48931       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48932         CORRECT_MSVCR_ARCH=386
48933       else
48934         CORRECT_MSVCR_ARCH=x86-64
48935       fi
48936     fi
48937     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48938       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48939 $as_echo "ok" >&6; }
48940       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48941 
48942   # Only process if variable expands to non-empty
48943 
48944   if test "x$MSVC_DLL" != x; then
48945     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48946 
48947   # Input might be given as Windows format, start by converting to
48948   # unix format.
48949   path="$MSVC_DLL"
48950   new_path=`$CYGPATH -u "$path"`
48951 
48952   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48953   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48954   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48955   # "foo.exe" is OK but "foo" is an error.
48956   #
48957   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48958   # It is also a way to make sure we got the proper file name for the real test later on.
48959   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48960   if test "x$test_shortpath" = x; then
48961     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48962 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48963     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48964   fi
48965 
48966   # Call helper function which possibly converts this using DOS-style short mode.
48967   # If so, the updated path is stored in $new_path.
48968 
48969   input_path="$new_path"
48970   # Check if we need to convert this using DOS-style short mode. If the path
48971   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48972   # take no chances and rewrite it.
48973   # Note: m4 eats our [], so we need to use [ and ] instead.
48974   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48975   if test "x$has_forbidden_chars" != x; then
48976     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48977     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48978     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48979     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48980       # Going to short mode and back again did indeed matter. Since short mode is
48981       # case insensitive, let's make it lowercase to improve readability.
48982       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48983       # Now convert it back to Unix-style (cygpath)
48984       input_path=`$CYGPATH -u "$shortmode_path"`
48985       new_path="$input_path"
48986     fi
48987   fi
48988 
48989   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48990   if test "x$test_cygdrive_prefix" = x; then
48991     # As a simple fix, exclude /usr/bin since it's not a real path.
48992     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48993       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48994       # a path prefixed by /cygdrive for fixpath to work.
48995       new_path="$CYGWIN_ROOT_PATH$input_path"
48996     fi
48997   fi
48998 
48999 
49000   if test "x$path" != "x$new_path"; then
49001     MSVC_DLL="$new_path"
49002     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49003 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49004   fi
49005 
49006     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49007 
49008   path="$MSVC_DLL"
49009   has_colon=`$ECHO $path | $GREP ^.:`
49010   new_path="$path"
49011   if test "x$has_colon" = x; then
49012     # Not in mixed or Windows style, start by that.
49013     new_path=`cmd //c echo $path`
49014   fi
49015 
49016 
49017   input_path="$new_path"
49018   # Check if we need to convert this using DOS-style short mode. If the path
49019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49020   # take no chances and rewrite it.
49021   # Note: m4 eats our [], so we need to use [ and ] instead.
49022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49023   if test "x$has_forbidden_chars" != x; then
49024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49025     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49026   fi
49027 
49028 
49029   windows_path="$new_path"
49030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49031     unix_path=`$CYGPATH -u "$windows_path"`
49032     new_path="$unix_path"
49033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49035     new_path="$unix_path"
49036   fi
49037 
49038   if test "x$path" != "x$new_path"; then
49039     MSVC_DLL="$new_path"
49040     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49041 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49042   fi
49043 
49044   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49045   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49046 
49047     else
49048       # We're on a unix platform. Hooray! :)
49049       path="$MSVC_DLL"
49050       has_space=`$ECHO "$path" | $GREP " "`
49051       if test "x$has_space" != x; then
49052         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49053 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49054         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49055       fi
49056 
49057       # Use eval to expand a potential ~
49058       eval path="$path"
49059       if test ! -f "$path" && test ! -d "$path"; then
49060         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49061       fi
49062 
49063       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49064     fi
49065   fi
49066 
49067       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49068 $as_echo_n "checking for $DLL_NAME... " >&6; }
49069       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49070 $as_echo "$MSVC_DLL" >&6; }
49071     else
49072       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49073 $as_echo "incorrect, ignoring" >&6; }
49074       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49075 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49076     fi
49077   fi
49078 
49079     fi
49080   fi
49081 
49082   if test "x$MSVC_DLL" = x; then
49083     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49084 $as_echo_n "checking for $DLL_NAME... " >&6; }
49085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49086 $as_echo "no" >&6; }
49087     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49088   fi
49089 
49090     MSVCR_DLL="$MSVC_DLL"
49091   fi
49092 
49093 
49094 
49095 # Check whether --with-msvcp-dll was given.
49096 if test "${with_msvcp_dll+set}" = set; then :
49097   withval=$with_msvcp_dll;
49098 fi
49099 
49100 
49101   if test "x$MSVCP_NAME" != "x"; then
49102     if test "x$with_msvcp_dll" != x; then
49103       # If given explicitely by user, do not probe. If not present, fail directly.
49104 
49105   DLL_NAME="$MSVCP_NAME"
49106   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49107   METHOD="--with-msvcp-dll"
49108   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49109     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49110 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49111 
49112     # Need to check if the found msvcr is correct architecture
49113     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49114 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49115     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49116     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49117       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49118       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49119       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49120         CORRECT_MSVCR_ARCH="PE32 executable"
49121       else
49122         CORRECT_MSVCR_ARCH="PE32+ executable"
49123       fi
49124     else
49125       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49126         CORRECT_MSVCR_ARCH=386
49127       else
49128         CORRECT_MSVCR_ARCH=x86-64
49129       fi
49130     fi
49131     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49132       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49133 $as_echo "ok" >&6; }
49134       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49135 
49136   # Only process if variable expands to non-empty
49137 
49138   if test "x$MSVC_DLL" != x; then
49139     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49140 
49141   # Input might be given as Windows format, start by converting to
49142   # unix format.
49143   path="$MSVC_DLL"
49144   new_path=`$CYGPATH -u "$path"`
49145 
49146   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49147   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49148   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49149   # "foo.exe" is OK but "foo" is an error.
49150   #
49151   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49152   # It is also a way to make sure we got the proper file name for the real test later on.
49153   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49154   if test "x$test_shortpath" = x; then
49155     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49156 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49157     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49158   fi
49159 
49160   # Call helper function which possibly converts this using DOS-style short mode.
49161   # If so, the updated path is stored in $new_path.
49162 
49163   input_path="$new_path"
49164   # Check if we need to convert this using DOS-style short mode. If the path
49165   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49166   # take no chances and rewrite it.
49167   # Note: m4 eats our [], so we need to use [ and ] instead.
49168   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49169   if test "x$has_forbidden_chars" != x; then
49170     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49171     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49172     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49173     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49174       # Going to short mode and back again did indeed matter. Since short mode is
49175       # case insensitive, let's make it lowercase to improve readability.
49176       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49177       # Now convert it back to Unix-style (cygpath)
49178       input_path=`$CYGPATH -u "$shortmode_path"`
49179       new_path="$input_path"
49180     fi
49181   fi
49182 
49183   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49184   if test "x$test_cygdrive_prefix" = x; then
49185     # As a simple fix, exclude /usr/bin since it's not a real path.
49186     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49187       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49188       # a path prefixed by /cygdrive for fixpath to work.
49189       new_path="$CYGWIN_ROOT_PATH$input_path"
49190     fi
49191   fi
49192 
49193 
49194   if test "x$path" != "x$new_path"; then
49195     MSVC_DLL="$new_path"
49196     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49197 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49198   fi
49199 
49200     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49201 
49202   path="$MSVC_DLL"
49203   has_colon=`$ECHO $path | $GREP ^.:`
49204   new_path="$path"
49205   if test "x$has_colon" = x; then
49206     # Not in mixed or Windows style, start by that.
49207     new_path=`cmd //c echo $path`
49208   fi
49209 
49210 
49211   input_path="$new_path"
49212   # Check if we need to convert this using DOS-style short mode. If the path
49213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49214   # take no chances and rewrite it.
49215   # Note: m4 eats our [], so we need to use [ and ] instead.
49216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49217   if test "x$has_forbidden_chars" != x; then
49218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49219     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49220   fi
49221 
49222 
49223   windows_path="$new_path"
49224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49225     unix_path=`$CYGPATH -u "$windows_path"`
49226     new_path="$unix_path"
49227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49228     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49229     new_path="$unix_path"
49230   fi
49231 
49232   if test "x$path" != "x$new_path"; then
49233     MSVC_DLL="$new_path"
49234     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49235 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49236   fi
49237 
49238   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49239   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49240 
49241     else
49242       # We're on a unix platform. Hooray! :)
49243       path="$MSVC_DLL"
49244       has_space=`$ECHO "$path" | $GREP " "`
49245       if test "x$has_space" != x; then
49246         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49247 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49248         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49249       fi
49250 
49251       # Use eval to expand a potential ~
49252       eval path="$path"
49253       if test ! -f "$path" && test ! -d "$path"; then
49254         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49255       fi
49256 
49257       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49258     fi
49259   fi
49260 
49261       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49262 $as_echo_n "checking for $DLL_NAME... " >&6; }
49263       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49264 $as_echo "$MSVC_DLL" >&6; }
49265     else
49266       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49267 $as_echo "incorrect, ignoring" >&6; }
49268       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49269 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49270     fi
49271   fi
49272 
49273       if test "x$MSVC_DLL" = x; then
49274         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49275       fi
49276       MSVCP_DLL="$MSVC_DLL"
49277     elif test "x$DEVKIT_MSVCP_DLL" != x; then
49278 
49279   DLL_NAME="$MSVCP_NAME"
49280   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49281   METHOD="devkit"
49282   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49283     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49284 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49285 
49286     # Need to check if the found msvcr is correct architecture
49287     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49288 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49289     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49290     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49291       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49292       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49293       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49294         CORRECT_MSVCR_ARCH="PE32 executable"
49295       else
49296         CORRECT_MSVCR_ARCH="PE32+ executable"
49297       fi
49298     else
49299       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49300         CORRECT_MSVCR_ARCH=386
49301       else
49302         CORRECT_MSVCR_ARCH=x86-64
49303       fi
49304     fi
49305     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49306       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49307 $as_echo "ok" >&6; }
49308       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49309 
49310   # Only process if variable expands to non-empty
49311 
49312   if test "x$MSVC_DLL" != x; then
49313     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49314 
49315   # Input might be given as Windows format, start by converting to
49316   # unix format.
49317   path="$MSVC_DLL"
49318   new_path=`$CYGPATH -u "$path"`
49319 
49320   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49321   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49322   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49323   # "foo.exe" is OK but "foo" is an error.
49324   #
49325   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49326   # It is also a way to make sure we got the proper file name for the real test later on.
49327   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49328   if test "x$test_shortpath" = x; then
49329     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49330 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49331     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49332   fi
49333 
49334   # Call helper function which possibly converts this using DOS-style short mode.
49335   # If so, the updated path is stored in $new_path.
49336 
49337   input_path="$new_path"
49338   # Check if we need to convert this using DOS-style short mode. If the path
49339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49340   # take no chances and rewrite it.
49341   # Note: m4 eats our [], so we need to use [ and ] instead.
49342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49343   if test "x$has_forbidden_chars" != x; then
49344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49345     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49346     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49347     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49348       # Going to short mode and back again did indeed matter. Since short mode is
49349       # case insensitive, let's make it lowercase to improve readability.
49350       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49351       # Now convert it back to Unix-style (cygpath)
49352       input_path=`$CYGPATH -u "$shortmode_path"`
49353       new_path="$input_path"
49354     fi
49355   fi
49356 
49357   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49358   if test "x$test_cygdrive_prefix" = x; then
49359     # As a simple fix, exclude /usr/bin since it's not a real path.
49360     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49361       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49362       # a path prefixed by /cygdrive for fixpath to work.
49363       new_path="$CYGWIN_ROOT_PATH$input_path"
49364     fi
49365   fi
49366 
49367 
49368   if test "x$path" != "x$new_path"; then
49369     MSVC_DLL="$new_path"
49370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49371 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49372   fi
49373 
49374     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49375 
49376   path="$MSVC_DLL"
49377   has_colon=`$ECHO $path | $GREP ^.:`
49378   new_path="$path"
49379   if test "x$has_colon" = x; then
49380     # Not in mixed or Windows style, start by that.
49381     new_path=`cmd //c echo $path`
49382   fi
49383 
49384 
49385   input_path="$new_path"
49386   # Check if we need to convert this using DOS-style short mode. If the path
49387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49388   # take no chances and rewrite it.
49389   # Note: m4 eats our [], so we need to use [ and ] instead.
49390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49391   if test "x$has_forbidden_chars" != x; then
49392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49393     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49394   fi
49395 
49396 
49397   windows_path="$new_path"
49398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49399     unix_path=`$CYGPATH -u "$windows_path"`
49400     new_path="$unix_path"
49401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49403     new_path="$unix_path"
49404   fi
49405 
49406   if test "x$path" != "x$new_path"; then
49407     MSVC_DLL="$new_path"
49408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49409 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49410   fi
49411 
49412   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49413   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49414 
49415     else
49416       # We're on a unix platform. Hooray! :)
49417       path="$MSVC_DLL"
49418       has_space=`$ECHO "$path" | $GREP " "`
49419       if test "x$has_space" != x; then
49420         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49421 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49422         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49423       fi
49424 
49425       # Use eval to expand a potential ~
49426       eval path="$path"
49427       if test ! -f "$path" && test ! -d "$path"; then
49428         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49429       fi
49430 
49431       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49432     fi
49433   fi
49434 
49435       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49436 $as_echo_n "checking for $DLL_NAME... " >&6; }
49437       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49438 $as_echo "$MSVC_DLL" >&6; }
49439     else
49440       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49441 $as_echo "incorrect, ignoring" >&6; }
49442       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49443 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49444     fi
49445   fi
49446 
49447       if test "x$MSVC_DLL" = x; then
49448         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49449       fi
49450       MSVCP_DLL="$MSVC_DLL"
49451     else
49452 
49453   DLL_NAME="${MSVCP_NAME}"
49454   MSVC_DLL=
49455 
49456   if test "x$MSVC_DLL" = x; then
49457     # Probe: Using well-known location from Visual Studio 10.0
49458     if test "x$VCINSTALLDIR" != x; then
49459       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49460 
49461   windows_path="$CYGWIN_VC_INSTALL_DIR"
49462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49463     unix_path=`$CYGPATH -u "$windows_path"`
49464     CYGWIN_VC_INSTALL_DIR="$unix_path"
49465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49467     CYGWIN_VC_INSTALL_DIR="$unix_path"
49468   fi
49469 
49470       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49471         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49472       else
49473         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49474       fi
49475       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49476 
49477   DLL_NAME="$DLL_NAME"
49478   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49479   METHOD="well-known location in VCINSTALLDIR"
49480   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49481     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49482 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49483 
49484     # Need to check if the found msvcr is correct architecture
49485     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49486 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49487     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49488     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49489       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49490       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49491       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49492         CORRECT_MSVCR_ARCH="PE32 executable"
49493       else
49494         CORRECT_MSVCR_ARCH="PE32+ executable"
49495       fi
49496     else
49497       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49498         CORRECT_MSVCR_ARCH=386
49499       else
49500         CORRECT_MSVCR_ARCH=x86-64
49501       fi
49502     fi
49503     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49504       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49505 $as_echo "ok" >&6; }
49506       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49507 
49508   # Only process if variable expands to non-empty
49509 
49510   if test "x$MSVC_DLL" != x; then
49511     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49512 
49513   # Input might be given as Windows format, start by converting to
49514   # unix format.
49515   path="$MSVC_DLL"
49516   new_path=`$CYGPATH -u "$path"`
49517 
49518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49521   # "foo.exe" is OK but "foo" is an error.
49522   #
49523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49524   # It is also a way to make sure we got the proper file name for the real test later on.
49525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49526   if test "x$test_shortpath" = x; then
49527     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49528 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49529     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49530   fi
49531 
49532   # Call helper function which possibly converts this using DOS-style short mode.
49533   # If so, the updated path is stored in $new_path.
49534 
49535   input_path="$new_path"
49536   # Check if we need to convert this using DOS-style short mode. If the path
49537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49538   # take no chances and rewrite it.
49539   # Note: m4 eats our [], so we need to use [ and ] instead.
49540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49541   if test "x$has_forbidden_chars" != x; then
49542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49543     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49544     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49545     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49546       # Going to short mode and back again did indeed matter. Since short mode is
49547       # case insensitive, let's make it lowercase to improve readability.
49548       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49549       # Now convert it back to Unix-style (cygpath)
49550       input_path=`$CYGPATH -u "$shortmode_path"`
49551       new_path="$input_path"
49552     fi
49553   fi
49554 
49555   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49556   if test "x$test_cygdrive_prefix" = x; then
49557     # As a simple fix, exclude /usr/bin since it's not a real path.
49558     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49559       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49560       # a path prefixed by /cygdrive for fixpath to work.
49561       new_path="$CYGWIN_ROOT_PATH$input_path"
49562     fi
49563   fi
49564 
49565 
49566   if test "x$path" != "x$new_path"; then
49567     MSVC_DLL="$new_path"
49568     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49569 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49570   fi
49571 
49572     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49573 
49574   path="$MSVC_DLL"
49575   has_colon=`$ECHO $path | $GREP ^.:`
49576   new_path="$path"
49577   if test "x$has_colon" = x; then
49578     # Not in mixed or Windows style, start by that.
49579     new_path=`cmd //c echo $path`
49580   fi
49581 
49582 
49583   input_path="$new_path"
49584   # Check if we need to convert this using DOS-style short mode. If the path
49585   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49586   # take no chances and rewrite it.
49587   # Note: m4 eats our [], so we need to use [ and ] instead.
49588   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49589   if test "x$has_forbidden_chars" != x; then
49590     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49591     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49592   fi
49593 
49594 
49595   windows_path="$new_path"
49596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49597     unix_path=`$CYGPATH -u "$windows_path"`
49598     new_path="$unix_path"
49599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49601     new_path="$unix_path"
49602   fi
49603 
49604   if test "x$path" != "x$new_path"; then
49605     MSVC_DLL="$new_path"
49606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49607 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49608   fi
49609 
49610   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49611   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49612 
49613     else
49614       # We're on a unix platform. Hooray! :)
49615       path="$MSVC_DLL"
49616       has_space=`$ECHO "$path" | $GREP " "`
49617       if test "x$has_space" != x; then
49618         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49619 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49620         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49621       fi
49622 
49623       # Use eval to expand a potential ~
49624       eval path="$path"
49625       if test ! -f "$path" && test ! -d "$path"; then
49626         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49627       fi
49628 
49629       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49630     fi
49631   fi
49632 
49633       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49634 $as_echo_n "checking for $DLL_NAME... " >&6; }
49635       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49636 $as_echo "$MSVC_DLL" >&6; }
49637     else
49638       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49639 $as_echo "incorrect, ignoring" >&6; }
49640       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49641 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49642     fi
49643   fi
49644 
49645     fi
49646   fi
49647 
49648   if test "x$MSVC_DLL" = x; then
49649     # Probe: Check in the Boot JDK directory.
49650     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49651 
49652   DLL_NAME="$DLL_NAME"
49653   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49654   METHOD="well-known location in Boot JDK"
49655   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49656     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49657 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49658 
49659     # Need to check if the found msvcr is correct architecture
49660     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49661 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49662     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49663     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49664       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49665       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49666       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49667         CORRECT_MSVCR_ARCH="PE32 executable"
49668       else
49669         CORRECT_MSVCR_ARCH="PE32+ executable"
49670       fi
49671     else
49672       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49673         CORRECT_MSVCR_ARCH=386
49674       else
49675         CORRECT_MSVCR_ARCH=x86-64
49676       fi
49677     fi
49678     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49679       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49680 $as_echo "ok" >&6; }
49681       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49682 
49683   # Only process if variable expands to non-empty
49684 
49685   if test "x$MSVC_DLL" != x; then
49686     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49687 
49688   # Input might be given as Windows format, start by converting to
49689   # unix format.
49690   path="$MSVC_DLL"
49691   new_path=`$CYGPATH -u "$path"`
49692 
49693   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49694   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49695   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49696   # "foo.exe" is OK but "foo" is an error.
49697   #
49698   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49699   # It is also a way to make sure we got the proper file name for the real test later on.
49700   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49701   if test "x$test_shortpath" = x; then
49702     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49703 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49704     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49705   fi
49706 
49707   # Call helper function which possibly converts this using DOS-style short mode.
49708   # If so, the updated path is stored in $new_path.
49709 
49710   input_path="$new_path"
49711   # Check if we need to convert this using DOS-style short mode. If the path
49712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49713   # take no chances and rewrite it.
49714   # Note: m4 eats our [], so we need to use [ and ] instead.
49715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49716   if test "x$has_forbidden_chars" != x; then
49717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49718     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49719     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49720     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49721       # Going to short mode and back again did indeed matter. Since short mode is
49722       # case insensitive, let's make it lowercase to improve readability.
49723       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49724       # Now convert it back to Unix-style (cygpath)
49725       input_path=`$CYGPATH -u "$shortmode_path"`
49726       new_path="$input_path"
49727     fi
49728   fi
49729 
49730   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49731   if test "x$test_cygdrive_prefix" = x; then
49732     # As a simple fix, exclude /usr/bin since it's not a real path.
49733     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49734       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49735       # a path prefixed by /cygdrive for fixpath to work.
49736       new_path="$CYGWIN_ROOT_PATH$input_path"
49737     fi
49738   fi
49739 
49740 
49741   if test "x$path" != "x$new_path"; then
49742     MSVC_DLL="$new_path"
49743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49744 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49745   fi
49746 
49747     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49748 
49749   path="$MSVC_DLL"
49750   has_colon=`$ECHO $path | $GREP ^.:`
49751   new_path="$path"
49752   if test "x$has_colon" = x; then
49753     # Not in mixed or Windows style, start by that.
49754     new_path=`cmd //c echo $path`
49755   fi
49756 
49757 
49758   input_path="$new_path"
49759   # Check if we need to convert this using DOS-style short mode. If the path
49760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49761   # take no chances and rewrite it.
49762   # Note: m4 eats our [], so we need to use [ and ] instead.
49763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49764   if test "x$has_forbidden_chars" != x; then
49765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49766     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49767   fi
49768 
49769 
49770   windows_path="$new_path"
49771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49772     unix_path=`$CYGPATH -u "$windows_path"`
49773     new_path="$unix_path"
49774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49775     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49776     new_path="$unix_path"
49777   fi
49778 
49779   if test "x$path" != "x$new_path"; then
49780     MSVC_DLL="$new_path"
49781     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49782 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49783   fi
49784 
49785   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49786   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49787 
49788     else
49789       # We're on a unix platform. Hooray! :)
49790       path="$MSVC_DLL"
49791       has_space=`$ECHO "$path" | $GREP " "`
49792       if test "x$has_space" != x; then
49793         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49794 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49795         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49796       fi
49797 
49798       # Use eval to expand a potential ~
49799       eval path="$path"
49800       if test ! -f "$path" && test ! -d "$path"; then
49801         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49802       fi
49803 
49804       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49805     fi
49806   fi
49807 
49808       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49809 $as_echo_n "checking for $DLL_NAME... " >&6; }
49810       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49811 $as_echo "$MSVC_DLL" >&6; }
49812     else
49813       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49814 $as_echo "incorrect, ignoring" >&6; }
49815       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49816 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49817     fi
49818   fi
49819 
49820   fi
49821 
49822   if test "x$MSVC_DLL" = x; then
49823     # Probe: Look in the Windows system32 directory
49824     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49825 
49826   windows_path="$CYGWIN_SYSTEMROOT"
49827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49828     unix_path=`$CYGPATH -u "$windows_path"`
49829     CYGWIN_SYSTEMROOT="$unix_path"
49830   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49831     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49832     CYGWIN_SYSTEMROOT="$unix_path"
49833   fi
49834 
49835     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49836 
49837   DLL_NAME="$DLL_NAME"
49838   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49839   METHOD="well-known location in SYSTEMROOT"
49840   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49841     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49842 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49843 
49844     # Need to check if the found msvcr is correct architecture
49845     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49846 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49847     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49848     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49849       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49850       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49851       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49852         CORRECT_MSVCR_ARCH="PE32 executable"
49853       else
49854         CORRECT_MSVCR_ARCH="PE32+ executable"
49855       fi
49856     else
49857       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49858         CORRECT_MSVCR_ARCH=386
49859       else
49860         CORRECT_MSVCR_ARCH=x86-64
49861       fi
49862     fi
49863     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49864       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49865 $as_echo "ok" >&6; }
49866       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49867 
49868   # Only process if variable expands to non-empty
49869 
49870   if test "x$MSVC_DLL" != x; then
49871     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49872 
49873   # Input might be given as Windows format, start by converting to
49874   # unix format.
49875   path="$MSVC_DLL"
49876   new_path=`$CYGPATH -u "$path"`
49877 
49878   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49879   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49880   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49881   # "foo.exe" is OK but "foo" is an error.
49882   #
49883   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49884   # It is also a way to make sure we got the proper file name for the real test later on.
49885   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49886   if test "x$test_shortpath" = x; then
49887     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49888 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49889     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49890   fi
49891 
49892   # Call helper function which possibly converts this using DOS-style short mode.
49893   # If so, the updated path is stored in $new_path.
49894 
49895   input_path="$new_path"
49896   # Check if we need to convert this using DOS-style short mode. If the path
49897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49898   # take no chances and rewrite it.
49899   # Note: m4 eats our [], so we need to use [ and ] instead.
49900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49901   if test "x$has_forbidden_chars" != x; then
49902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49903     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49904     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49905     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49906       # Going to short mode and back again did indeed matter. Since short mode is
49907       # case insensitive, let's make it lowercase to improve readability.
49908       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49909       # Now convert it back to Unix-style (cygpath)
49910       input_path=`$CYGPATH -u "$shortmode_path"`
49911       new_path="$input_path"
49912     fi
49913   fi
49914 
49915   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49916   if test "x$test_cygdrive_prefix" = x; then
49917     # As a simple fix, exclude /usr/bin since it's not a real path.
49918     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49919       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49920       # a path prefixed by /cygdrive for fixpath to work.
49921       new_path="$CYGWIN_ROOT_PATH$input_path"
49922     fi
49923   fi
49924 
49925 
49926   if test "x$path" != "x$new_path"; then
49927     MSVC_DLL="$new_path"
49928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49929 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49930   fi
49931 
49932     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49933 
49934   path="$MSVC_DLL"
49935   has_colon=`$ECHO $path | $GREP ^.:`
49936   new_path="$path"
49937   if test "x$has_colon" = x; then
49938     # Not in mixed or Windows style, start by that.
49939     new_path=`cmd //c echo $path`
49940   fi
49941 
49942 
49943   input_path="$new_path"
49944   # Check if we need to convert this using DOS-style short mode. If the path
49945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49946   # take no chances and rewrite it.
49947   # Note: m4 eats our [], so we need to use [ and ] instead.
49948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49949   if test "x$has_forbidden_chars" != x; then
49950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49952   fi
49953 
49954 
49955   windows_path="$new_path"
49956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49957     unix_path=`$CYGPATH -u "$windows_path"`
49958     new_path="$unix_path"
49959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49961     new_path="$unix_path"
49962   fi
49963 
49964   if test "x$path" != "x$new_path"; then
49965     MSVC_DLL="$new_path"
49966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49967 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49968   fi
49969 
49970   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49971   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49972 
49973     else
49974       # We're on a unix platform. Hooray! :)
49975       path="$MSVC_DLL"
49976       has_space=`$ECHO "$path" | $GREP " "`
49977       if test "x$has_space" != x; then
49978         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49979 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49980         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49981       fi
49982 
49983       # Use eval to expand a potential ~
49984       eval path="$path"
49985       if test ! -f "$path" && test ! -d "$path"; then
49986         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49987       fi
49988 
49989       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49990     fi
49991   fi
49992 
49993       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49994 $as_echo_n "checking for $DLL_NAME... " >&6; }
49995       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49996 $as_echo "$MSVC_DLL" >&6; }
49997     else
49998       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49999 $as_echo "incorrect, ignoring" >&6; }
50000       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50001 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50002     fi
50003   fi
50004 
50005   fi
50006 
50007   if test "x$MSVC_DLL" = x; then
50008     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50009     if test "x$VS100COMNTOOLS" != x; then
50010       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50011 
50012   windows_path="$CYGWIN_VS_TOOLS_DIR"
50013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50014     unix_path=`$CYGPATH -u "$windows_path"`
50015     CYGWIN_VS_TOOLS_DIR="$unix_path"
50016   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50017     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50018     CYGWIN_VS_TOOLS_DIR="$unix_path"
50019   fi
50020 
50021       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50022         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50023             | $GREP -i /x64/ | $HEAD --lines 1`
50024       else
50025         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50026             | $GREP -i /x86/ | $HEAD --lines 1`
50027       fi
50028 
50029   DLL_NAME="$DLL_NAME"
50030   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50031   METHOD="search of VS100COMNTOOLS"
50032   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50033     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50034 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50035 
50036     # Need to check if the found msvcr is correct architecture
50037     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50038 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50039     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50040     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50041       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50042       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50043       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50044         CORRECT_MSVCR_ARCH="PE32 executable"
50045       else
50046         CORRECT_MSVCR_ARCH="PE32+ executable"
50047       fi
50048     else
50049       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50050         CORRECT_MSVCR_ARCH=386
50051       else
50052         CORRECT_MSVCR_ARCH=x86-64
50053       fi
50054     fi
50055     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50056       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50057 $as_echo "ok" >&6; }
50058       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50059 
50060   # Only process if variable expands to non-empty
50061 
50062   if test "x$MSVC_DLL" != x; then
50063     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50064 
50065   # Input might be given as Windows format, start by converting to
50066   # unix format.
50067   path="$MSVC_DLL"
50068   new_path=`$CYGPATH -u "$path"`
50069 
50070   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50071   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50072   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50073   # "foo.exe" is OK but "foo" is an error.
50074   #
50075   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50076   # It is also a way to make sure we got the proper file name for the real test later on.
50077   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50078   if test "x$test_shortpath" = x; then
50079     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50080 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50081     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50082   fi
50083 
50084   # Call helper function which possibly converts this using DOS-style short mode.
50085   # If so, the updated path is stored in $new_path.
50086 
50087   input_path="$new_path"
50088   # Check if we need to convert this using DOS-style short mode. If the path
50089   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50090   # take no chances and rewrite it.
50091   # Note: m4 eats our [], so we need to use [ and ] instead.
50092   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50093   if test "x$has_forbidden_chars" != x; then
50094     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50095     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50096     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50097     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50098       # Going to short mode and back again did indeed matter. Since short mode is
50099       # case insensitive, let's make it lowercase to improve readability.
50100       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50101       # Now convert it back to Unix-style (cygpath)
50102       input_path=`$CYGPATH -u "$shortmode_path"`
50103       new_path="$input_path"
50104     fi
50105   fi
50106 
50107   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50108   if test "x$test_cygdrive_prefix" = x; then
50109     # As a simple fix, exclude /usr/bin since it's not a real path.
50110     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50111       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50112       # a path prefixed by /cygdrive for fixpath to work.
50113       new_path="$CYGWIN_ROOT_PATH$input_path"
50114     fi
50115   fi
50116 
50117 
50118   if test "x$path" != "x$new_path"; then
50119     MSVC_DLL="$new_path"
50120     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50121 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50122   fi
50123 
50124     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50125 
50126   path="$MSVC_DLL"
50127   has_colon=`$ECHO $path | $GREP ^.:`
50128   new_path="$path"
50129   if test "x$has_colon" = x; then
50130     # Not in mixed or Windows style, start by that.
50131     new_path=`cmd //c echo $path`
50132   fi
50133 
50134 
50135   input_path="$new_path"
50136   # Check if we need to convert this using DOS-style short mode. If the path
50137   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50138   # take no chances and rewrite it.
50139   # Note: m4 eats our [], so we need to use [ and ] instead.
50140   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50141   if test "x$has_forbidden_chars" != x; then
50142     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50143     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50144   fi
50145 
50146 
50147   windows_path="$new_path"
50148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50149     unix_path=`$CYGPATH -u "$windows_path"`
50150     new_path="$unix_path"
50151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50153     new_path="$unix_path"
50154   fi
50155 
50156   if test "x$path" != "x$new_path"; then
50157     MSVC_DLL="$new_path"
50158     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50159 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50160   fi
50161 
50162   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50163   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50164 
50165     else
50166       # We're on a unix platform. Hooray! :)
50167       path="$MSVC_DLL"
50168       has_space=`$ECHO "$path" | $GREP " "`
50169       if test "x$has_space" != x; then
50170         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50171 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50172         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50173       fi
50174 
50175       # Use eval to expand a potential ~
50176       eval path="$path"
50177       if test ! -f "$path" && test ! -d "$path"; then
50178         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50179       fi
50180 
50181       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50182     fi
50183   fi
50184 
50185       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50186 $as_echo_n "checking for $DLL_NAME... " >&6; }
50187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50188 $as_echo "$MSVC_DLL" >&6; }
50189     else
50190       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50191 $as_echo "incorrect, ignoring" >&6; }
50192       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50193 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50194     fi
50195   fi
50196 
50197     fi
50198   fi
50199 
50200   if test "x$MSVC_DLL" = x; then
50201     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50202     # (This was the original behaviour; kept since it might turn something up)
50203     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50204       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50205         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50206             | $GREP x64 | $HEAD --lines 1`
50207       else
50208         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50209             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50210         if test "x$POSSIBLE_MSVC_DLL" = x; then
50211           # We're grasping at straws now...
50212           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50213               | $HEAD --lines 1`
50214         fi
50215       fi
50216 
50217 
50218   DLL_NAME="$DLL_NAME"
50219   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50220   METHOD="search of VCINSTALLDIR"
50221   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50222     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50223 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50224 
50225     # Need to check if the found msvcr is correct architecture
50226     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50227 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50228     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50229     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50230       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50231       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50232       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50233         CORRECT_MSVCR_ARCH="PE32 executable"
50234       else
50235         CORRECT_MSVCR_ARCH="PE32+ executable"
50236       fi
50237     else
50238       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50239         CORRECT_MSVCR_ARCH=386
50240       else
50241         CORRECT_MSVCR_ARCH=x86-64
50242       fi
50243     fi
50244     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50245       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50246 $as_echo "ok" >&6; }
50247       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50248 
50249   # Only process if variable expands to non-empty
50250 
50251   if test "x$MSVC_DLL" != x; then
50252     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50253 
50254   # Input might be given as Windows format, start by converting to
50255   # unix format.
50256   path="$MSVC_DLL"
50257   new_path=`$CYGPATH -u "$path"`
50258 
50259   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50260   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50261   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50262   # "foo.exe" is OK but "foo" is an error.
50263   #
50264   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50265   # It is also a way to make sure we got the proper file name for the real test later on.
50266   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50267   if test "x$test_shortpath" = x; then
50268     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50269 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50270     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50271   fi
50272 
50273   # Call helper function which possibly converts this using DOS-style short mode.
50274   # If so, the updated path is stored in $new_path.
50275 
50276   input_path="$new_path"
50277   # Check if we need to convert this using DOS-style short mode. If the path
50278   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50279   # take no chances and rewrite it.
50280   # Note: m4 eats our [], so we need to use [ and ] instead.
50281   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50282   if test "x$has_forbidden_chars" != x; then
50283     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50284     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50285     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50286     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50287       # Going to short mode and back again did indeed matter. Since short mode is
50288       # case insensitive, let's make it lowercase to improve readability.
50289       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50290       # Now convert it back to Unix-style (cygpath)
50291       input_path=`$CYGPATH -u "$shortmode_path"`
50292       new_path="$input_path"
50293     fi
50294   fi
50295 
50296   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50297   if test "x$test_cygdrive_prefix" = x; then
50298     # As a simple fix, exclude /usr/bin since it's not a real path.
50299     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50300       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50301       # a path prefixed by /cygdrive for fixpath to work.
50302       new_path="$CYGWIN_ROOT_PATH$input_path"
50303     fi
50304   fi
50305 
50306 
50307   if test "x$path" != "x$new_path"; then
50308     MSVC_DLL="$new_path"
50309     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50310 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50311   fi
50312 
50313     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50314 
50315   path="$MSVC_DLL"
50316   has_colon=`$ECHO $path | $GREP ^.:`
50317   new_path="$path"
50318   if test "x$has_colon" = x; then
50319     # Not in mixed or Windows style, start by that.
50320     new_path=`cmd //c echo $path`
50321   fi
50322 
50323 
50324   input_path="$new_path"
50325   # Check if we need to convert this using DOS-style short mode. If the path
50326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50327   # take no chances and rewrite it.
50328   # Note: m4 eats our [], so we need to use [ and ] instead.
50329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50330   if test "x$has_forbidden_chars" != x; then
50331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50332     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50333   fi
50334 
50335 
50336   windows_path="$new_path"
50337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50338     unix_path=`$CYGPATH -u "$windows_path"`
50339     new_path="$unix_path"
50340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50342     new_path="$unix_path"
50343   fi
50344 
50345   if test "x$path" != "x$new_path"; then
50346     MSVC_DLL="$new_path"
50347     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50348 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50349   fi
50350 
50351   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50352   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50353 
50354     else
50355       # We're on a unix platform. Hooray! :)
50356       path="$MSVC_DLL"
50357       has_space=`$ECHO "$path" | $GREP " "`
50358       if test "x$has_space" != x; then
50359         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50360 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50361         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50362       fi
50363 
50364       # Use eval to expand a potential ~
50365       eval path="$path"
50366       if test ! -f "$path" && test ! -d "$path"; then
50367         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50368       fi
50369 
50370       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50371     fi
50372   fi
50373 
50374       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50375 $as_echo_n "checking for $DLL_NAME... " >&6; }
50376       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50377 $as_echo "$MSVC_DLL" >&6; }
50378     else
50379       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50380 $as_echo "incorrect, ignoring" >&6; }
50381       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50382 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50383     fi
50384   fi
50385 
50386     fi
50387   fi
50388 
50389   if test "x$MSVC_DLL" = x; then
50390     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50391 $as_echo_n "checking for $DLL_NAME... " >&6; }
50392     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50393 $as_echo "no" >&6; }
50394     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50395   fi
50396 
50397       MSVCP_DLL="$MSVC_DLL"
50398     fi
50399 
50400   fi
50401 
50402   fi
50403 
50404 
50405   if test "x$NEEDS_LIB_X11" = xfalse; then
50406     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50407       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50408 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50409     fi
50410     X_CFLAGS=
50411     X_LIBS=
50412   else
50413 
50414     if test "x${with_x}" = xno; then
50415       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50416     fi
50417 
50418     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50419       # The user has specified a X11 base directory. Use it for includes and
50420       # libraries, unless explicitely overridden.
50421       if test "x$x_includes" = xNONE; then
50422         x_includes="${with_x}/include"
50423       fi
50424       if test "x$x_libraries" = xNONE; then
50425         x_libraries="${with_x}/lib"
50426       fi
50427     else
50428       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50429       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50430       # --x-libraries for the sysroot, if that seems to be correct.
50431       if test "x$SYSROOT" != "x"; then
50432         if test "x$x_includes" = xNONE; then
50433           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50434             x_includes="$SYSROOT/usr/X11R6/include"
50435           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50436             x_includes="$SYSROOT/usr/include"
50437           fi
50438         fi
50439         if test "x$x_libraries" = xNONE; then
50440           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50441             x_libraries="$SYSROOT/usr/X11R6/lib"
50442           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50443             x_libraries="$SYSROOT/usr/lib64"
50444           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50445             x_libraries="$SYSROOT/usr/lib"
50446           fi
50447         fi
50448       fi
50449     fi
50450 
50451     # Now let autoconf do it's magic
50452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50453 $as_echo_n "checking for X... " >&6; }
50454 
50455 
50456 # Check whether --with-x was given.
50457 if test "${with_x+set}" = set; then :
50458   withval=$with_x;
50459 fi
50460 
50461 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50462 if test "x$with_x" = xno; then
50463   # The user explicitly disabled X.
50464   have_x=disabled
50465 else
50466   case $x_includes,$x_libraries in #(
50467     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50468     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50469   $as_echo_n "(cached) " >&6
50470 else
50471   # One or both of the vars are not set, and there is no cached value.
50472 ac_x_includes=no ac_x_libraries=no
50473 rm -f -r conftest.dir
50474 if mkdir conftest.dir; then
50475   cd conftest.dir
50476   cat >Imakefile <<'_ACEOF'
50477 incroot:
50478         @echo incroot='${INCROOT}'
50479 usrlibdir:
50480         @echo usrlibdir='${USRLIBDIR}'
50481 libdir:
50482         @echo libdir='${LIBDIR}'
50483 _ACEOF
50484   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50485     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50486     for ac_var in incroot usrlibdir libdir; do
50487       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50488     done
50489     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50490     for ac_extension in a so sl dylib la dll; do
50491       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50492          test -f "$ac_im_libdir/libX11.$ac_extension"; then
50493         ac_im_usrlibdir=$ac_im_libdir; break
50494       fi
50495     done
50496     # Screen out bogus values from the imake configuration.  They are
50497     # bogus both because they are the default anyway, and because
50498     # using them would break gcc on systems where it needs fixed includes.
50499     case $ac_im_incroot in
50500         /usr/include) ac_x_includes= ;;
50501         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50502     esac
50503     case $ac_im_usrlibdir in
50504         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
50505         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50506     esac
50507   fi
50508   cd ..
50509   rm -f -r conftest.dir
50510 fi
50511 
50512 # Standard set of common directories for X headers.
50513 # Check X11 before X11Rn because it is often a symlink to the current release.
50514 ac_x_header_dirs='
50515 /usr/X11/include
50516 /usr/X11R7/include
50517 /usr/X11R6/include
50518 /usr/X11R5/include
50519 /usr/X11R4/include
50520 
50521 /usr/include/X11
50522 /usr/include/X11R7
50523 /usr/include/X11R6
50524 /usr/include/X11R5
50525 /usr/include/X11R4
50526 
50527 /usr/local/X11/include
50528 /usr/local/X11R7/include
50529 /usr/local/X11R6/include
50530 /usr/local/X11R5/include
50531 /usr/local/X11R4/include
50532 
50533 /usr/local/include/X11
50534 /usr/local/include/X11R7
50535 /usr/local/include/X11R6
50536 /usr/local/include/X11R5
50537 /usr/local/include/X11R4
50538 
50539 /usr/X386/include
50540 /usr/x386/include
50541 /usr/XFree86/include/X11
50542 
50543 /usr/include
50544 /usr/local/include
50545 /usr/unsupported/include
50546 /usr/athena/include
50547 /usr/local/x11r5/include
50548 /usr/lpp/Xamples/include
50549 
50550 /usr/openwin/include
50551 /usr/openwin/share/include'
50552 
50553 if test "$ac_x_includes" = no; then
50554   # Guess where to find include files, by looking for Xlib.h.
50555   # First, try using that file with no special directory specified.
50556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50557 /* end confdefs.h.  */
50558 #include <X11/Xlib.h>
50559 _ACEOF
50560 if ac_fn_cxx_try_cpp "$LINENO"; then :
50561   # We can compile using X headers with no special include directory.
50562 ac_x_includes=
50563 else
50564   for ac_dir in $ac_x_header_dirs; do
50565   if test -r "$ac_dir/X11/Xlib.h"; then
50566     ac_x_includes=$ac_dir
50567     break
50568   fi
50569 done
50570 fi
50571 rm -f conftest.err conftest.i conftest.$ac_ext
50572 fi # $ac_x_includes = no
50573 
50574 if test "$ac_x_libraries" = no; then
50575   # Check for the libraries.
50576   # See if we find them without any special options.
50577   # Don't add to $LIBS permanently.
50578   ac_save_LIBS=$LIBS
50579   LIBS="-lX11 $LIBS"
50580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50581 /* end confdefs.h.  */
50582 #include <X11/Xlib.h>
50583 int
50584 main ()
50585 {
50586 XrmInitialize ()
50587   ;
50588   return 0;
50589 }
50590 _ACEOF
50591 if ac_fn_cxx_try_link "$LINENO"; then :
50592   LIBS=$ac_save_LIBS
50593 # We can link X programs with no special library path.
50594 ac_x_libraries=
50595 else
50596   LIBS=$ac_save_LIBS
50597 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50598 do
50599   # Don't even attempt the hair of trying to link an X program!
50600   for ac_extension in a so sl dylib la dll; do
50601     if test -r "$ac_dir/libX11.$ac_extension"; then
50602       ac_x_libraries=$ac_dir
50603       break 2
50604     fi
50605   done
50606 done
50607 fi
50608 rm -f core conftest.err conftest.$ac_objext \
50609     conftest$ac_exeext conftest.$ac_ext
50610 fi # $ac_x_libraries = no
50611 
50612 case $ac_x_includes,$ac_x_libraries in #(
50613   no,* | *,no | *\'*)
50614     # Didn't find X, or a directory has "'" in its name.
50615     ac_cv_have_x="have_x=no";; #(
50616   *)
50617     # Record where we found X for the cache.
50618     ac_cv_have_x="have_x=yes\
50619         ac_x_includes='$ac_x_includes'\
50620         ac_x_libraries='$ac_x_libraries'"
50621 esac
50622 fi
50623 ;; #(
50624     *) have_x=yes;;
50625   esac
50626   eval "$ac_cv_have_x"
50627 fi # $with_x != no
50628 
50629 if test "$have_x" != yes; then
50630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50631 $as_echo "$have_x" >&6; }
50632   no_x=yes
50633 else
50634   # If each of the values was on the command line, it overrides each guess.
50635   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50636   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50637   # Update the cache value to reflect the command line values.
50638   ac_cv_have_x="have_x=yes\
50639         ac_x_includes='$x_includes'\
50640         ac_x_libraries='$x_libraries'"
50641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50642 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50643 fi
50644 
50645     if test "$no_x" = yes; then
50646   # Not all programs may use this symbol, but it does not hurt to define it.
50647 
50648 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50649 
50650   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50651 else
50652   if test -n "$x_includes"; then
50653     X_CFLAGS="$X_CFLAGS -I$x_includes"
50654   fi
50655 
50656   # It would also be nice to do this for all -L options, not just this one.
50657   if test -n "$x_libraries"; then
50658     X_LIBS="$X_LIBS -L$x_libraries"
50659     # For Solaris; some versions of Sun CC require a space after -R and
50660     # others require no space.  Words are not sufficient . . . .
50661     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50662 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
50663     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50664     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50665     ac_cxx_werror_flag=yes
50666     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50667 /* end confdefs.h.  */
50668 
50669 int
50670 main ()
50671 {
50672 
50673   ;
50674   return 0;
50675 }
50676 _ACEOF
50677 if ac_fn_cxx_try_link "$LINENO"; then :
50678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50679 $as_echo "no" >&6; }
50680        X_LIBS="$X_LIBS -R$x_libraries"
50681 else
50682   LIBS="$ac_xsave_LIBS -R $x_libraries"
50683        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50684 /* end confdefs.h.  */
50685 
50686 int
50687 main ()
50688 {
50689 
50690   ;
50691   return 0;
50692 }
50693 _ACEOF
50694 if ac_fn_cxx_try_link "$LINENO"; then :
50695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50696 $as_echo "yes" >&6; }
50697           X_LIBS="$X_LIBS -R $x_libraries"
50698 else
50699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50700 $as_echo "neither works" >&6; }
50701 fi
50702 rm -f core conftest.err conftest.$ac_objext \
50703     conftest$ac_exeext conftest.$ac_ext
50704 fi
50705 rm -f core conftest.err conftest.$ac_objext \
50706     conftest$ac_exeext conftest.$ac_ext
50707     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50708     LIBS=$ac_xsave_LIBS
50709   fi
50710 
50711   # Check for system-dependent libraries X programs must link with.
50712   # Do this before checking for the system-independent R6 libraries
50713   # (-lICE), since we may need -lsocket or whatever for X linking.
50714 
50715   if test "$ISC" = yes; then
50716     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50717   else
50718     # Martyn Johnson says this is needed for Ultrix, if the X
50719     # libraries were built with DECnet support.  And Karl Berry says
50720     # the Alpha needs dnet_stub (dnet does not exist).
50721     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50722     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50723 /* end confdefs.h.  */
50724 
50725 /* Override any GCC internal prototype to avoid an error.
50726    Use char because int might match the return type of a GCC
50727    builtin and then its argument prototype would still apply.  */
50728 #ifdef __cplusplus
50729 extern "C"
50730 #endif
50731 char XOpenDisplay ();
50732 int
50733 main ()
50734 {
50735 return XOpenDisplay ();
50736   ;
50737   return 0;
50738 }
50739 _ACEOF
50740 if ac_fn_cxx_try_link "$LINENO"; then :
50741 
50742 else
50743   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
50744 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
50745 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
50746   $as_echo_n "(cached) " >&6
50747 else
50748   ac_check_lib_save_LIBS=$LIBS
50749 LIBS="-ldnet  $LIBS"
50750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50751 /* end confdefs.h.  */
50752 
50753 /* Override any GCC internal prototype to avoid an error.
50754    Use char because int might match the return type of a GCC
50755    builtin and then its argument prototype would still apply.  */
50756 #ifdef __cplusplus
50757 extern "C"
50758 #endif
50759 char dnet_ntoa ();
50760 int
50761 main ()
50762 {
50763 return dnet_ntoa ();
50764   ;
50765   return 0;
50766 }
50767 _ACEOF
50768 if ac_fn_cxx_try_link "$LINENO"; then :
50769   ac_cv_lib_dnet_dnet_ntoa=yes
50770 else
50771   ac_cv_lib_dnet_dnet_ntoa=no
50772 fi
50773 rm -f core conftest.err conftest.$ac_objext \
50774     conftest$ac_exeext conftest.$ac_ext
50775 LIBS=$ac_check_lib_save_LIBS
50776 fi
50777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
50778 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
50779 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
50780   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
50781 fi
50782 
50783     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
50784       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
50785 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
50786 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
50787   $as_echo_n "(cached) " >&6
50788 else
50789   ac_check_lib_save_LIBS=$LIBS
50790 LIBS="-ldnet_stub  $LIBS"
50791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50792 /* end confdefs.h.  */
50793 
50794 /* Override any GCC internal prototype to avoid an error.
50795    Use char because int might match the return type of a GCC
50796    builtin and then its argument prototype would still apply.  */
50797 #ifdef __cplusplus
50798 extern "C"
50799 #endif
50800 char dnet_ntoa ();
50801 int
50802 main ()
50803 {
50804 return dnet_ntoa ();
50805   ;
50806   return 0;
50807 }
50808 _ACEOF
50809 if ac_fn_cxx_try_link "$LINENO"; then :
50810   ac_cv_lib_dnet_stub_dnet_ntoa=yes
50811 else
50812   ac_cv_lib_dnet_stub_dnet_ntoa=no
50813 fi
50814 rm -f core conftest.err conftest.$ac_objext \
50815     conftest$ac_exeext conftest.$ac_ext
50816 LIBS=$ac_check_lib_save_LIBS
50817 fi
50818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
50819 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
50820 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
50821   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
50822 fi
50823 
50824     fi
50825 fi
50826 rm -f core conftest.err conftest.$ac_objext \
50827     conftest$ac_exeext conftest.$ac_ext
50828     LIBS="$ac_xsave_LIBS"
50829 
50830     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
50831     # to get the SysV transport functions.
50832     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
50833     # needs -lnsl.
50834     # The nsl library prevents programs from opening the X display
50835     # on Irix 5.2, according to T.E. Dickey.
50836     # The functions gethostbyname, getservbyname, and inet_addr are
50837     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
50838     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
50839 if test "x$ac_cv_func_gethostbyname" = xyes; then :
50840 
50841 fi
50842 
50843     if test $ac_cv_func_gethostbyname = no; then
50844       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
50845 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
50846 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
50847   $as_echo_n "(cached) " >&6
50848 else
50849   ac_check_lib_save_LIBS=$LIBS
50850 LIBS="-lnsl  $LIBS"
50851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50852 /* end confdefs.h.  */
50853 
50854 /* Override any GCC internal prototype to avoid an error.
50855    Use char because int might match the return type of a GCC
50856    builtin and then its argument prototype would still apply.  */
50857 #ifdef __cplusplus
50858 extern "C"
50859 #endif
50860 char gethostbyname ();
50861 int
50862 main ()
50863 {
50864 return gethostbyname ();
50865   ;
50866   return 0;
50867 }
50868 _ACEOF
50869 if ac_fn_cxx_try_link "$LINENO"; then :
50870   ac_cv_lib_nsl_gethostbyname=yes
50871 else
50872   ac_cv_lib_nsl_gethostbyname=no
50873 fi
50874 rm -f core conftest.err conftest.$ac_objext \
50875     conftest$ac_exeext conftest.$ac_ext
50876 LIBS=$ac_check_lib_save_LIBS
50877 fi
50878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
50879 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
50880 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
50881   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
50882 fi
50883 
50884       if test $ac_cv_lib_nsl_gethostbyname = no; then
50885         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
50886 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
50887 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
50888   $as_echo_n "(cached) " >&6
50889 else
50890   ac_check_lib_save_LIBS=$LIBS
50891 LIBS="-lbsd  $LIBS"
50892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50893 /* end confdefs.h.  */
50894 
50895 /* Override any GCC internal prototype to avoid an error.
50896    Use char because int might match the return type of a GCC
50897    builtin and then its argument prototype would still apply.  */
50898 #ifdef __cplusplus
50899 extern "C"
50900 #endif
50901 char gethostbyname ();
50902 int
50903 main ()
50904 {
50905 return gethostbyname ();
50906   ;
50907   return 0;
50908 }
50909 _ACEOF
50910 if ac_fn_cxx_try_link "$LINENO"; then :
50911   ac_cv_lib_bsd_gethostbyname=yes
50912 else
50913   ac_cv_lib_bsd_gethostbyname=no
50914 fi
50915 rm -f core conftest.err conftest.$ac_objext \
50916     conftest$ac_exeext conftest.$ac_ext
50917 LIBS=$ac_check_lib_save_LIBS
50918 fi
50919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
50920 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
50921 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
50922   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
50923 fi
50924 
50925       fi
50926     fi
50927 
50928     # lieder@skyler.mavd.honeywell.com says without -lsocket,
50929     # socket/setsockopt and other routines are undefined under SCO ODT
50930     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
50931     # on later versions), says Simon Leinen: it contains gethostby*
50932     # variants that don't use the name server (or something).  -lsocket
50933     # must be given before -lnsl if both are needed.  We assume that
50934     # if connect needs -lnsl, so does gethostbyname.
50935     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
50936 if test "x$ac_cv_func_connect" = xyes; then :
50937 
50938 fi
50939 
50940     if test $ac_cv_func_connect = no; then
50941       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
50942 $as_echo_n "checking for connect in -lsocket... " >&6; }
50943 if ${ac_cv_lib_socket_connect+:} false; then :
50944   $as_echo_n "(cached) " >&6
50945 else
50946   ac_check_lib_save_LIBS=$LIBS
50947 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
50948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50949 /* end confdefs.h.  */
50950 
50951 /* Override any GCC internal prototype to avoid an error.
50952    Use char because int might match the return type of a GCC
50953    builtin and then its argument prototype would still apply.  */
50954 #ifdef __cplusplus
50955 extern "C"
50956 #endif
50957 char connect ();
50958 int
50959 main ()
50960 {
50961 return connect ();
50962   ;
50963   return 0;
50964 }
50965 _ACEOF
50966 if ac_fn_cxx_try_link "$LINENO"; then :
50967   ac_cv_lib_socket_connect=yes
50968 else
50969   ac_cv_lib_socket_connect=no
50970 fi
50971 rm -f core conftest.err conftest.$ac_objext \
50972     conftest$ac_exeext conftest.$ac_ext
50973 LIBS=$ac_check_lib_save_LIBS
50974 fi
50975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
50976 $as_echo "$ac_cv_lib_socket_connect" >&6; }
50977 if test "x$ac_cv_lib_socket_connect" = xyes; then :
50978   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
50979 fi
50980 
50981     fi
50982 
50983     # Guillermo Gomez says -lposix is necessary on A/UX.
50984     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
50985 if test "x$ac_cv_func_remove" = xyes; then :
50986 
50987 fi
50988 
50989     if test $ac_cv_func_remove = no; then
50990       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
50991 $as_echo_n "checking for remove in -lposix... " >&6; }
50992 if ${ac_cv_lib_posix_remove+:} false; then :
50993   $as_echo_n "(cached) " >&6
50994 else
50995   ac_check_lib_save_LIBS=$LIBS
50996 LIBS="-lposix  $LIBS"
50997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50998 /* end confdefs.h.  */
50999 
51000 /* Override any GCC internal prototype to avoid an error.
51001    Use char because int might match the return type of a GCC
51002    builtin and then its argument prototype would still apply.  */
51003 #ifdef __cplusplus
51004 extern "C"
51005 #endif
51006 char remove ();
51007 int
51008 main ()
51009 {
51010 return remove ();
51011   ;
51012   return 0;
51013 }
51014 _ACEOF
51015 if ac_fn_cxx_try_link "$LINENO"; then :
51016   ac_cv_lib_posix_remove=yes
51017 else
51018   ac_cv_lib_posix_remove=no
51019 fi
51020 rm -f core conftest.err conftest.$ac_objext \
51021     conftest$ac_exeext conftest.$ac_ext
51022 LIBS=$ac_check_lib_save_LIBS
51023 fi
51024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51025 $as_echo "$ac_cv_lib_posix_remove" >&6; }
51026 if test "x$ac_cv_lib_posix_remove" = xyes; then :
51027   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51028 fi
51029 
51030     fi
51031 
51032     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51033     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51034 if test "x$ac_cv_func_shmat" = xyes; then :
51035 
51036 fi
51037 
51038     if test $ac_cv_func_shmat = no; then
51039       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51040 $as_echo_n "checking for shmat in -lipc... " >&6; }
51041 if ${ac_cv_lib_ipc_shmat+:} false; then :
51042   $as_echo_n "(cached) " >&6
51043 else
51044   ac_check_lib_save_LIBS=$LIBS
51045 LIBS="-lipc  $LIBS"
51046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51047 /* end confdefs.h.  */
51048 
51049 /* Override any GCC internal prototype to avoid an error.
51050    Use char because int might match the return type of a GCC
51051    builtin and then its argument prototype would still apply.  */
51052 #ifdef __cplusplus
51053 extern "C"
51054 #endif
51055 char shmat ();
51056 int
51057 main ()
51058 {
51059 return shmat ();
51060   ;
51061   return 0;
51062 }
51063 _ACEOF
51064 if ac_fn_cxx_try_link "$LINENO"; then :
51065   ac_cv_lib_ipc_shmat=yes
51066 else
51067   ac_cv_lib_ipc_shmat=no
51068 fi
51069 rm -f core conftest.err conftest.$ac_objext \
51070     conftest$ac_exeext conftest.$ac_ext
51071 LIBS=$ac_check_lib_save_LIBS
51072 fi
51073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51074 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51075 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51076   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51077 fi
51078 
51079     fi
51080   fi
51081 
51082   # Check for libraries that X11R6 Xt/Xaw programs need.
51083   ac_save_LDFLAGS=$LDFLAGS
51084   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51085   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51086   # check for ICE first), but we must link in the order -lSM -lICE or
51087   # we get undefined symbols.  So assume we have SM if we have ICE.
51088   # These have to be linked with before -lX11, unlike the other
51089   # libraries we check for below, so use a different variable.
51090   # John Interrante, Karl Berry
51091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51092 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51093 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51094   $as_echo_n "(cached) " >&6
51095 else
51096   ac_check_lib_save_LIBS=$LIBS
51097 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51099 /* end confdefs.h.  */
51100 
51101 /* Override any GCC internal prototype to avoid an error.
51102    Use char because int might match the return type of a GCC
51103    builtin and then its argument prototype would still apply.  */
51104 #ifdef __cplusplus
51105 extern "C"
51106 #endif
51107 char IceConnectionNumber ();
51108 int
51109 main ()
51110 {
51111 return IceConnectionNumber ();
51112   ;
51113   return 0;
51114 }
51115 _ACEOF
51116 if ac_fn_cxx_try_link "$LINENO"; then :
51117   ac_cv_lib_ICE_IceConnectionNumber=yes
51118 else
51119   ac_cv_lib_ICE_IceConnectionNumber=no
51120 fi
51121 rm -f core conftest.err conftest.$ac_objext \
51122     conftest$ac_exeext conftest.$ac_ext
51123 LIBS=$ac_check_lib_save_LIBS
51124 fi
51125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51126 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51127 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51128   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51129 fi
51130 
51131   LDFLAGS=$ac_save_LDFLAGS
51132 
51133 fi
51134 
51135 
51136     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51137     # this doesn't make sense so we remove it.
51138     if test "x$COMPILE_TYPE" = xcross; then
51139       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51140     fi
51141 
51142     if test "x$no_x" = xyes; then
51143 
51144   # Print a helpful message on how to acquire the necessary build dependency.
51145   # x11 is the help tag: freetype, cups, alsa etc
51146   MISSING_DEPENDENCY=x11
51147 
51148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51149     cygwin_help $MISSING_DEPENDENCY
51150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51151     msys_help $MISSING_DEPENDENCY
51152   else
51153     PKGHANDLER_COMMAND=
51154 
51155     case $PKGHANDLER in
51156       apt-get)
51157         apt_help     $MISSING_DEPENDENCY ;;
51158       yum)
51159         yum_help     $MISSING_DEPENDENCY ;;
51160       port)
51161         port_help    $MISSING_DEPENDENCY ;;
51162       pkgutil)
51163         pkgutil_help $MISSING_DEPENDENCY ;;
51164       pkgadd)
51165         pkgadd_help  $MISSING_DEPENDENCY ;;
51166     esac
51167 
51168     if test "x$PKGHANDLER_COMMAND" != x; then
51169       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51170     fi
51171   fi
51172 
51173       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51174     fi
51175 
51176     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51177       OPENWIN_HOME="/usr/openwin"
51178       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51179       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51180           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51181           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51182           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51183     fi
51184 
51185     ac_ext=c
51186 ac_cpp='$CPP $CPPFLAGS'
51187 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51188 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51189 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51190 
51191     OLD_CFLAGS="$CFLAGS"
51192     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51193 
51194     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51195     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51196 do :
51197   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51198 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51199           # include <X11/Xlib.h>
51200           # include <X11/Xutil.h>
51201 
51202 
51203 "
51204 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51205   cat >>confdefs.h <<_ACEOF
51206 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51207 _ACEOF
51208  X11_HEADERS_OK=yes
51209 else
51210   X11_HEADERS_OK=no; break
51211 fi
51212 
51213 done
51214 
51215 
51216     if test "x$X11_HEADERS_OK" = xno; then
51217 
51218   # Print a helpful message on how to acquire the necessary build dependency.
51219   # x11 is the help tag: freetype, cups, alsa etc
51220   MISSING_DEPENDENCY=x11
51221 
51222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51223     cygwin_help $MISSING_DEPENDENCY
51224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51225     msys_help $MISSING_DEPENDENCY
51226   else
51227     PKGHANDLER_COMMAND=
51228 
51229     case $PKGHANDLER in
51230       apt-get)
51231         apt_help     $MISSING_DEPENDENCY ;;
51232       yum)
51233         yum_help     $MISSING_DEPENDENCY ;;
51234       port)
51235         port_help    $MISSING_DEPENDENCY ;;
51236       pkgutil)
51237         pkgutil_help $MISSING_DEPENDENCY ;;
51238       pkgadd)
51239         pkgadd_help  $MISSING_DEPENDENCY ;;
51240     esac
51241 
51242     if test "x$PKGHANDLER_COMMAND" != x; then
51243       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51244     fi
51245   fi
51246 
51247       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51248     fi
51249 
51250     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51251     # defined in libawt_xawt.
51252     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51253 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51254     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51255 /* end confdefs.h.  */
51256 #include <X11/extensions/Xrender.h>
51257 int
51258 main ()
51259 {
51260 XLinearGradient x;
51261   ;
51262   return 0;
51263 }
51264 _ACEOF
51265 if ac_fn_c_try_compile "$LINENO"; then :
51266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51267 $as_echo "yes" >&6; }
51268 else
51269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51270 $as_echo "no" >&6; }
51271          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51272 fi
51273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51274 
51275     CFLAGS="$OLD_CFLAGS"
51276     ac_ext=cpp
51277 ac_cpp='$CXXCPP $CPPFLAGS'
51278 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51279 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51280 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51281 
51282   fi # NEEDS_LIB_X11
51283 
51284 
51285 
51286 
51287 
51288 
51289 # Check whether --with-cups was given.
51290 if test "${with_cups+set}" = set; then :
51291   withval=$with_cups;
51292 fi
51293 
51294 
51295 # Check whether --with-cups-include was given.
51296 if test "${with_cups_include+set}" = set; then :
51297   withval=$with_cups_include;
51298 fi
51299 
51300 
51301   if test "x$NEEDS_LIB_CUPS" = xfalse; then
51302     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51303         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51304       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51305 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51306     fi
51307     CUPS_CFLAGS=
51308   else
51309     CUPS_FOUND=no
51310 
51311     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51312       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51313     fi
51314 
51315     if test "x${with_cups}" != x; then
51316       CUPS_CFLAGS="-I${with_cups}/include"
51317       CUPS_FOUND=yes
51318     fi
51319     if test "x${with_cups_include}" != x; then
51320       CUPS_CFLAGS="-I${with_cups_include}"
51321       CUPS_FOUND=yes
51322     fi
51323     if test "x$CUPS_FOUND" = xno; then
51324       # Are the cups headers installed in the default /usr/include location?
51325       for ac_header in cups/cups.h cups/ppd.h
51326 do :
51327   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51328 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51329 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51330   cat >>confdefs.h <<_ACEOF
51331 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51332 _ACEOF
51333 
51334           CUPS_FOUND=yes
51335           CUPS_CFLAGS=
51336           DEFAULT_CUPS=yes
51337 
51338 fi
51339 
51340 done
51341 
51342     fi
51343     if test "x$CUPS_FOUND" = xno; then
51344       # Getting nervous now? Lets poke around for standard Solaris third-party
51345       # package installation locations.
51346       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51347 $as_echo_n "checking for cups headers... " >&6; }
51348       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51349         # An SFW package seems to be installed!
51350         CUPS_FOUND=yes
51351         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51352       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51353         # A CSW package seems to be installed!
51354         CUPS_FOUND=yes
51355         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51356       fi
51357       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51358 $as_echo "$CUPS_FOUND" >&6; }
51359     fi
51360     if test "x$CUPS_FOUND" = xno; then
51361 
51362   # Print a helpful message on how to acquire the necessary build dependency.
51363   # cups is the help tag: freetype, cups, alsa etc
51364   MISSING_DEPENDENCY=cups
51365 
51366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51367     cygwin_help $MISSING_DEPENDENCY
51368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51369     msys_help $MISSING_DEPENDENCY
51370   else
51371     PKGHANDLER_COMMAND=
51372 
51373     case $PKGHANDLER in
51374       apt-get)
51375         apt_help     $MISSING_DEPENDENCY ;;
51376       yum)
51377         yum_help     $MISSING_DEPENDENCY ;;
51378       port)
51379         port_help    $MISSING_DEPENDENCY ;;
51380       pkgutil)
51381         pkgutil_help $MISSING_DEPENDENCY ;;
51382       pkgadd)
51383         pkgadd_help  $MISSING_DEPENDENCY ;;
51384     esac
51385 
51386     if test "x$PKGHANDLER_COMMAND" != x; then
51387       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51388     fi
51389   fi
51390 
51391       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51392     fi
51393   fi
51394 
51395 
51396 
51397 
51398 
51399 # Check whether --with-freetype was given.
51400 if test "${with_freetype+set}" = set; then :
51401   withval=$with_freetype;
51402 fi
51403 
51404 
51405 # Check whether --with-freetype-include was given.
51406 if test "${with_freetype_include+set}" = set; then :
51407   withval=$with_freetype_include;
51408 fi
51409 
51410 
51411 # Check whether --with-freetype-lib was given.
51412 if test "${with_freetype_lib+set}" = set; then :
51413   withval=$with_freetype_lib;
51414 fi
51415 
51416 
51417 # Check whether --with-freetype-src was given.
51418 if test "${with_freetype_src+set}" = set; then :
51419   withval=$with_freetype_src;
51420 fi
51421 
51422   # Check whether --enable-freetype-bundling was given.
51423 if test "${enable_freetype_bundling+set}" = set; then :
51424   enableval=$enable_freetype_bundling;
51425 fi
51426 
51427 
51428   # Need to specify explicitly since it needs to be overridden on some versions of macosx
51429   FREETYPE_BASE_NAME=freetype
51430   FREETYPE_CFLAGS=
51431   FREETYPE_LIBS=
51432   FREETYPE_BUNDLE_LIB_PATH=
51433 
51434   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51435     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51436         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51437         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51438         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51439       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51440 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51441     fi
51442     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51443       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51444 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51445     fi
51446   else
51447     # freetype is needed to build; go get it!
51448 
51449     BUNDLE_FREETYPE="$enable_freetype_bundling"
51450 
51451     if  test "x$with_freetype_src" != x; then
51452       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51453         # Try to build freetype if --with-freetype-src was given on Windows
51454 
51455   FREETYPE_SRC_PATH="$with_freetype_src"
51456   BUILD_FREETYPE=yes
51457 
51458   # Check if the freetype sources are acessible..
51459   if ! test -d $FREETYPE_SRC_PATH; then
51460     { $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
51461 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51462     BUILD_FREETYPE=no
51463   fi
51464   # ..and contain a vc2010 project file
51465   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51466   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51467     { $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
51468 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51469     BUILD_FREETYPE=no
51470   fi
51471   # Now check if configure found a version of 'msbuild.exe'
51472   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51473     { $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
51474 $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;}
51475     BUILD_FREETYPE=no
51476   fi
51477 
51478   # Ready to go..
51479   if test "x$BUILD_FREETYPE" = xyes; then
51480     # msbuild requires trailing slashes for output directories
51481     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51482     freetype_lib_path_unix="$freetype_lib_path"
51483     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51484 
51485   unix_path="$vcxproj_path"
51486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51487     windows_path=`$CYGPATH -m "$unix_path"`
51488     vcxproj_path="$windows_path"
51489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51490     windows_path=`cmd //c echo $unix_path`
51491     vcxproj_path="$windows_path"
51492   fi
51493 
51494 
51495   unix_path="$freetype_lib_path"
51496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51497     windows_path=`$CYGPATH -m "$unix_path"`
51498     freetype_lib_path="$windows_path"
51499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51500     windows_path=`cmd //c echo $unix_path`
51501     freetype_lib_path="$windows_path"
51502   fi
51503 
51504 
51505   unix_path="$freetype_obj_path"
51506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51507     windows_path=`$CYGPATH -m "$unix_path"`
51508     freetype_obj_path="$windows_path"
51509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51510     windows_path=`cmd //c echo $unix_path`
51511     freetype_obj_path="$windows_path"
51512   fi
51513 
51514     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51515       freetype_platform=x64
51516     else
51517       freetype_platform=win32
51518     fi
51519 
51520     # The original freetype project file is for VS 2010 (i.e. 'v100'),
51521     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51522     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51523     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51524     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51525 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51526 
51527     # First we try to build the freetype.dll
51528     $ECHO -e "@echo off\n"\
51529         "$MSBUILD $vcxproj_path "\
51530         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51531         "/p:Configuration=\"Release Multithreaded\" "\
51532         "/p:Platform=$freetype_platform "\
51533         "/p:ConfigurationType=DynamicLibrary "\
51534         "/p:TargetName=freetype "\
51535         "/p:OutDir=\"$freetype_lib_path\" "\
51536         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51537     cmd /c freetype.bat
51538 
51539     if test -s "$freetype_lib_path_unix/freetype.dll"; then
51540       # If that succeeds we also build freetype.lib
51541       $ECHO -e "@echo off\n"\
51542           "$MSBUILD $vcxproj_path "\
51543           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51544           "/p:Configuration=\"Release Multithreaded\" "\
51545           "/p:Platform=$freetype_platform "\
51546           "/p:ConfigurationType=StaticLibrary "\
51547           "/p:TargetName=freetype "\
51548           "/p:OutDir=\"$freetype_lib_path\" "\
51549           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51550       cmd /c freetype.bat
51551 
51552       if test -s "$freetype_lib_path_unix/freetype.lib"; then
51553         # Once we build both, lib and dll, set freetype lib and include path appropriately
51554         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51555         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51556         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51557 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51558       else
51559         BUILD_FREETYPE=no
51560       fi
51561     else
51562       BUILD_FREETYPE=no
51563     fi
51564   fi
51565 
51566         if test "x$BUILD_FREETYPE" = xyes; then
51567           # Okay, we built it. Check that it works.
51568 
51569   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51570   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51571   METHOD="--with-freetype-src"
51572 
51573   # Let's start with an optimistic view of the world :-)
51574   FOUND_FREETYPE=yes
51575 
51576   # First look for the canonical freetype main include file ft2build.h.
51577   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51578     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51579     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51580     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51581       # Fail.
51582       FOUND_FREETYPE=no
51583     fi
51584   fi
51585 
51586   if test "x$FOUND_FREETYPE" = xyes; then
51587     # Include file found, let's continue the sanity check.
51588     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51589 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51590 
51591     # Reset to default value
51592     FREETYPE_BASE_NAME=freetype
51593     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51594     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51595       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51596           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51597         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51598         # for the .6 version explicitly.
51599         FREETYPE_BASE_NAME=freetype.6
51600         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51601         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51602 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51603       else
51604         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51605 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51606         FOUND_FREETYPE=no
51607       fi
51608     else
51609       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51610         # On Windows, we will need both .lib and .dll file.
51611         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51612           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51613 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51614           FOUND_FREETYPE=no
51615         fi
51616       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51617           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51618         # Found lib in isa dir, use that instead.
51619         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51620         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51621 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51622       fi
51623     fi
51624   fi
51625 
51626   if test "x$FOUND_FREETYPE" = xyes; then
51627 
51628   # Only process if variable expands to non-empty
51629 
51630   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51631     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51632 
51633   # Input might be given as Windows format, start by converting to
51634   # unix format.
51635   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51636   new_path=`$CYGPATH -u "$path"`
51637 
51638   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51639   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51640   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51641   # "foo.exe" is OK but "foo" is an error.
51642   #
51643   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51644   # It is also a way to make sure we got the proper file name for the real test later on.
51645   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51646   if test "x$test_shortpath" = x; then
51647     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51648 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51649     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51650   fi
51651 
51652   # Call helper function which possibly converts this using DOS-style short mode.
51653   # If so, the updated path is stored in $new_path.
51654 
51655   input_path="$new_path"
51656   # Check if we need to convert this using DOS-style short mode. If the path
51657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51658   # take no chances and rewrite it.
51659   # Note: m4 eats our [], so we need to use [ and ] instead.
51660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51661   if test "x$has_forbidden_chars" != x; then
51662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51663     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51664     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51665     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51666       # Going to short mode and back again did indeed matter. Since short mode is
51667       # case insensitive, let's make it lowercase to improve readability.
51668       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51669       # Now convert it back to Unix-style (cygpath)
51670       input_path=`$CYGPATH -u "$shortmode_path"`
51671       new_path="$input_path"
51672     fi
51673   fi
51674 
51675   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51676   if test "x$test_cygdrive_prefix" = x; then
51677     # As a simple fix, exclude /usr/bin since it's not a real path.
51678     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51679       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51680       # a path prefixed by /cygdrive for fixpath to work.
51681       new_path="$CYGWIN_ROOT_PATH$input_path"
51682     fi
51683   fi
51684 
51685 
51686   if test "x$path" != "x$new_path"; then
51687     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51689 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51690   fi
51691 
51692     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51693 
51694   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51695   has_colon=`$ECHO $path | $GREP ^.:`
51696   new_path="$path"
51697   if test "x$has_colon" = x; then
51698     # Not in mixed or Windows style, start by that.
51699     new_path=`cmd //c echo $path`
51700   fi
51701 
51702 
51703   input_path="$new_path"
51704   # Check if we need to convert this using DOS-style short mode. If the path
51705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51706   # take no chances and rewrite it.
51707   # Note: m4 eats our [], so we need to use [ and ] instead.
51708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51709   if test "x$has_forbidden_chars" != x; then
51710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51712   fi
51713 
51714 
51715   windows_path="$new_path"
51716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51717     unix_path=`$CYGPATH -u "$windows_path"`
51718     new_path="$unix_path"
51719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51721     new_path="$unix_path"
51722   fi
51723 
51724   if test "x$path" != "x$new_path"; then
51725     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51727 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51728   fi
51729 
51730   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51731   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51732 
51733     else
51734       # We're on a unix platform. Hooray! :)
51735       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51736       has_space=`$ECHO "$path" | $GREP " "`
51737       if test "x$has_space" != x; then
51738         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51739 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51740         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51741       fi
51742 
51743       # Use eval to expand a potential ~
51744       eval path="$path"
51745       if test ! -f "$path" && test ! -d "$path"; then
51746         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51747       fi
51748 
51749       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51750     fi
51751   fi
51752 
51753 
51754   # Only process if variable expands to non-empty
51755 
51756   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51757     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51758 
51759   # Input might be given as Windows format, start by converting to
51760   # unix format.
51761   path="$POTENTIAL_FREETYPE_LIB_PATH"
51762   new_path=`$CYGPATH -u "$path"`
51763 
51764   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51765   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51766   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51767   # "foo.exe" is OK but "foo" is an error.
51768   #
51769   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51770   # It is also a way to make sure we got the proper file name for the real test later on.
51771   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51772   if test "x$test_shortpath" = x; then
51773     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51774 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51775     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51776   fi
51777 
51778   # Call helper function which possibly converts this using DOS-style short mode.
51779   # If so, the updated path is stored in $new_path.
51780 
51781   input_path="$new_path"
51782   # Check if we need to convert this using DOS-style short mode. If the path
51783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51784   # take no chances and rewrite it.
51785   # Note: m4 eats our [], so we need to use [ and ] instead.
51786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51787   if test "x$has_forbidden_chars" != x; then
51788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51789     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51790     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51791     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51792       # Going to short mode and back again did indeed matter. Since short mode is
51793       # case insensitive, let's make it lowercase to improve readability.
51794       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51795       # Now convert it back to Unix-style (cygpath)
51796       input_path=`$CYGPATH -u "$shortmode_path"`
51797       new_path="$input_path"
51798     fi
51799   fi
51800 
51801   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51802   if test "x$test_cygdrive_prefix" = x; then
51803     # As a simple fix, exclude /usr/bin since it's not a real path.
51804     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51805       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51806       # a path prefixed by /cygdrive for fixpath to work.
51807       new_path="$CYGWIN_ROOT_PATH$input_path"
51808     fi
51809   fi
51810 
51811 
51812   if test "x$path" != "x$new_path"; then
51813     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51814     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51815 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51816   fi
51817 
51818     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51819 
51820   path="$POTENTIAL_FREETYPE_LIB_PATH"
51821   has_colon=`$ECHO $path | $GREP ^.:`
51822   new_path="$path"
51823   if test "x$has_colon" = x; then
51824     # Not in mixed or Windows style, start by that.
51825     new_path=`cmd //c echo $path`
51826   fi
51827 
51828 
51829   input_path="$new_path"
51830   # Check if we need to convert this using DOS-style short mode. If the path
51831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51832   # take no chances and rewrite it.
51833   # Note: m4 eats our [], so we need to use [ and ] instead.
51834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51835   if test "x$has_forbidden_chars" != x; then
51836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51837     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51838   fi
51839 
51840 
51841   windows_path="$new_path"
51842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51843     unix_path=`$CYGPATH -u "$windows_path"`
51844     new_path="$unix_path"
51845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51847     new_path="$unix_path"
51848   fi
51849 
51850   if test "x$path" != "x$new_path"; then
51851     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51852     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51853 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51854   fi
51855 
51856   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51857   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51858 
51859     else
51860       # We're on a unix platform. Hooray! :)
51861       path="$POTENTIAL_FREETYPE_LIB_PATH"
51862       has_space=`$ECHO "$path" | $GREP " "`
51863       if test "x$has_space" != x; then
51864         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51865 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51866         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51867       fi
51868 
51869       # Use eval to expand a potential ~
51870       eval path="$path"
51871       if test ! -f "$path" && test ! -d "$path"; then
51872         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51873       fi
51874 
51875       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51876     fi
51877   fi
51878 
51879 
51880     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51881     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51882 $as_echo_n "checking for freetype includes... " >&6; }
51883     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51884 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51885     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51886     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51887 $as_echo_n "checking for freetype libraries... " >&6; }
51888     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51889 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51890   fi
51891 
51892           if test "x$FOUND_FREETYPE" != xyes; then
51893             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
51894           fi
51895         else
51896           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
51897 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
51898           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
51899         fi
51900       else
51901         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
51902 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
51903       fi
51904     fi
51905 
51906     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
51907       # User has specified settings
51908 
51909       if test "x$BUNDLE_FREETYPE" = x; then
51910         # If not specified, default is to bundle freetype
51911         BUNDLE_FREETYPE=yes
51912       fi
51913 
51914       if test "x$with_freetype" != x; then
51915         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
51916         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
51917       fi
51918 
51919       # Allow --with-freetype-lib and --with-freetype-include to override
51920       if test "x$with_freetype_include" != x; then
51921         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
51922       fi
51923       if test "x$with_freetype_lib" != x; then
51924         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
51925       fi
51926 
51927       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51928         # Okay, we got it. Check that it works.
51929 
51930   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51931   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51932   METHOD="--with-freetype"
51933 
51934   # Let's start with an optimistic view of the world :-)
51935   FOUND_FREETYPE=yes
51936 
51937   # First look for the canonical freetype main include file ft2build.h.
51938   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51939     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51940     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51941     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51942       # Fail.
51943       FOUND_FREETYPE=no
51944     fi
51945   fi
51946 
51947   if test "x$FOUND_FREETYPE" = xyes; then
51948     # Include file found, let's continue the sanity check.
51949     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51950 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51951 
51952     # Reset to default value
51953     FREETYPE_BASE_NAME=freetype
51954     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51955     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51956       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51957           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51958         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51959         # for the .6 version explicitly.
51960         FREETYPE_BASE_NAME=freetype.6
51961         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51962         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51963 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51964       else
51965         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51966 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51967         FOUND_FREETYPE=no
51968       fi
51969     else
51970       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51971         # On Windows, we will need both .lib and .dll file.
51972         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51973           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51974 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51975           FOUND_FREETYPE=no
51976         fi
51977       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51978           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51979         # Found lib in isa dir, use that instead.
51980         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51981         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51982 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51983       fi
51984     fi
51985   fi
51986 
51987   if test "x$FOUND_FREETYPE" = xyes; then
51988 
51989   # Only process if variable expands to non-empty
51990 
51991   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51992     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51993 
51994   # Input might be given as Windows format, start by converting to
51995   # unix format.
51996   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51997   new_path=`$CYGPATH -u "$path"`
51998 
51999   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52000   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52001   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52002   # "foo.exe" is OK but "foo" is an error.
52003   #
52004   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52005   # It is also a way to make sure we got the proper file name for the real test later on.
52006   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52007   if test "x$test_shortpath" = x; then
52008     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52009 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52010     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52011   fi
52012 
52013   # Call helper function which possibly converts this using DOS-style short mode.
52014   # If so, the updated path is stored in $new_path.
52015 
52016   input_path="$new_path"
52017   # Check if we need to convert this using DOS-style short mode. If the path
52018   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52019   # take no chances and rewrite it.
52020   # Note: m4 eats our [], so we need to use [ and ] instead.
52021   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52022   if test "x$has_forbidden_chars" != x; then
52023     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52024     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52025     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52026     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52027       # Going to short mode and back again did indeed matter. Since short mode is
52028       # case insensitive, let's make it lowercase to improve readability.
52029       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52030       # Now convert it back to Unix-style (cygpath)
52031       input_path=`$CYGPATH -u "$shortmode_path"`
52032       new_path="$input_path"
52033     fi
52034   fi
52035 
52036   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52037   if test "x$test_cygdrive_prefix" = x; then
52038     # As a simple fix, exclude /usr/bin since it's not a real path.
52039     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52040       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52041       # a path prefixed by /cygdrive for fixpath to work.
52042       new_path="$CYGWIN_ROOT_PATH$input_path"
52043     fi
52044   fi
52045 
52046 
52047   if test "x$path" != "x$new_path"; then
52048     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52049     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52050 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52051   fi
52052 
52053     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52054 
52055   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52056   has_colon=`$ECHO $path | $GREP ^.:`
52057   new_path="$path"
52058   if test "x$has_colon" = x; then
52059     # Not in mixed or Windows style, start by that.
52060     new_path=`cmd //c echo $path`
52061   fi
52062 
52063 
52064   input_path="$new_path"
52065   # Check if we need to convert this using DOS-style short mode. If the path
52066   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52067   # take no chances and rewrite it.
52068   # Note: m4 eats our [], so we need to use [ and ] instead.
52069   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52070   if test "x$has_forbidden_chars" != x; then
52071     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52072     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52073   fi
52074 
52075 
52076   windows_path="$new_path"
52077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52078     unix_path=`$CYGPATH -u "$windows_path"`
52079     new_path="$unix_path"
52080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52082     new_path="$unix_path"
52083   fi
52084 
52085   if test "x$path" != "x$new_path"; then
52086     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52087     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52088 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52089   fi
52090 
52091   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52092   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52093 
52094     else
52095       # We're on a unix platform. Hooray! :)
52096       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52097       has_space=`$ECHO "$path" | $GREP " "`
52098       if test "x$has_space" != x; then
52099         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52100 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52101         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52102       fi
52103 
52104       # Use eval to expand a potential ~
52105       eval path="$path"
52106       if test ! -f "$path" && test ! -d "$path"; then
52107         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52108       fi
52109 
52110       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52111     fi
52112   fi
52113 
52114 
52115   # Only process if variable expands to non-empty
52116 
52117   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52118     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52119 
52120   # Input might be given as Windows format, start by converting to
52121   # unix format.
52122   path="$POTENTIAL_FREETYPE_LIB_PATH"
52123   new_path=`$CYGPATH -u "$path"`
52124 
52125   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52126   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52127   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52128   # "foo.exe" is OK but "foo" is an error.
52129   #
52130   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52131   # It is also a way to make sure we got the proper file name for the real test later on.
52132   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52133   if test "x$test_shortpath" = x; then
52134     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52135 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52136     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52137   fi
52138 
52139   # Call helper function which possibly converts this using DOS-style short mode.
52140   # If so, the updated path is stored in $new_path.
52141 
52142   input_path="$new_path"
52143   # Check if we need to convert this using DOS-style short mode. If the path
52144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52145   # take no chances and rewrite it.
52146   # Note: m4 eats our [], so we need to use [ and ] instead.
52147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52148   if test "x$has_forbidden_chars" != x; then
52149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52150     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52151     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52152     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52153       # Going to short mode and back again did indeed matter. Since short mode is
52154       # case insensitive, let's make it lowercase to improve readability.
52155       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52156       # Now convert it back to Unix-style (cygpath)
52157       input_path=`$CYGPATH -u "$shortmode_path"`
52158       new_path="$input_path"
52159     fi
52160   fi
52161 
52162   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52163   if test "x$test_cygdrive_prefix" = x; then
52164     # As a simple fix, exclude /usr/bin since it's not a real path.
52165     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52166       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52167       # a path prefixed by /cygdrive for fixpath to work.
52168       new_path="$CYGWIN_ROOT_PATH$input_path"
52169     fi
52170   fi
52171 
52172 
52173   if test "x$path" != "x$new_path"; then
52174     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52176 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52177   fi
52178 
52179     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52180 
52181   path="$POTENTIAL_FREETYPE_LIB_PATH"
52182   has_colon=`$ECHO $path | $GREP ^.:`
52183   new_path="$path"
52184   if test "x$has_colon" = x; then
52185     # Not in mixed or Windows style, start by that.
52186     new_path=`cmd //c echo $path`
52187   fi
52188 
52189 
52190   input_path="$new_path"
52191   # Check if we need to convert this using DOS-style short mode. If the path
52192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52193   # take no chances and rewrite it.
52194   # Note: m4 eats our [], so we need to use [ and ] instead.
52195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52196   if test "x$has_forbidden_chars" != x; then
52197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52198     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52199   fi
52200 
52201 
52202   windows_path="$new_path"
52203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52204     unix_path=`$CYGPATH -u "$windows_path"`
52205     new_path="$unix_path"
52206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52208     new_path="$unix_path"
52209   fi
52210 
52211   if test "x$path" != "x$new_path"; then
52212     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52214 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52215   fi
52216 
52217   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52218   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52219 
52220     else
52221       # We're on a unix platform. Hooray! :)
52222       path="$POTENTIAL_FREETYPE_LIB_PATH"
52223       has_space=`$ECHO "$path" | $GREP " "`
52224       if test "x$has_space" != x; then
52225         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52226 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52227         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52228       fi
52229 
52230       # Use eval to expand a potential ~
52231       eval path="$path"
52232       if test ! -f "$path" && test ! -d "$path"; then
52233         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52234       fi
52235 
52236       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52237     fi
52238   fi
52239 
52240 
52241     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52242     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52243 $as_echo_n "checking for freetype includes... " >&6; }
52244     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52245 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52246     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52247     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52248 $as_echo_n "checking for freetype libraries... " >&6; }
52249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52250 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52251   fi
52252 
52253         if test "x$FOUND_FREETYPE" != xyes; then
52254           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52255         fi
52256       else
52257         # User specified only one of lib or include. This is an error.
52258         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52259           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52260 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52261           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52262         else
52263           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52264 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52265           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52266         fi
52267       fi
52268     else
52269       # User did not specify settings, but we need freetype. Try to locate it.
52270 
52271       if test "x$BUNDLE_FREETYPE" = x; then
52272         # If not specified, default is to bundle freetype only on windows
52273         if test "x$OPENJDK_TARGET_OS" = xwindows; then
52274           BUNDLE_FREETYPE=yes
52275         else
52276           BUNDLE_FREETYPE=no
52277         fi
52278       fi
52279 
52280       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52281       if test "x$SYSROOT" = x; then
52282         if test "x$FOUND_FREETYPE" != xyes; then
52283           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52284           if test "x$PKG_CONFIG" != x; then
52285 
52286 pkg_failed=no
52287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52288 $as_echo_n "checking for FREETYPE... " >&6; }
52289 
52290 if test -n "$FREETYPE_CFLAGS"; then
52291     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52292  elif test -n "$PKG_CONFIG"; then
52293     if test -n "$PKG_CONFIG" && \
52294     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52295   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52296   ac_status=$?
52297   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52298   test $ac_status = 0; }; then
52299   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52300 else
52301   pkg_failed=yes
52302 fi
52303  else
52304     pkg_failed=untried
52305 fi
52306 if test -n "$FREETYPE_LIBS"; then
52307     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52308  elif test -n "$PKG_CONFIG"; then
52309     if test -n "$PKG_CONFIG" && \
52310     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52311   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52312   ac_status=$?
52313   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52314   test $ac_status = 0; }; then
52315   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52316 else
52317   pkg_failed=yes
52318 fi
52319  else
52320     pkg_failed=untried
52321 fi
52322 
52323 
52324 
52325 if test $pkg_failed = yes; then
52326 
52327 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52328         _pkg_short_errors_supported=yes
52329 else
52330         _pkg_short_errors_supported=no
52331 fi
52332         if test $_pkg_short_errors_supported = yes; then
52333                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52334         else
52335                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52336         fi
52337         # Put the nasty error message in config.log where it belongs
52338         echo "$FREETYPE_PKG_ERRORS" >&5
52339 
52340         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52341 $as_echo "no" >&6; }
52342                 FOUND_FREETYPE=no
52343 elif test $pkg_failed = untried; then
52344         FOUND_FREETYPE=no
52345 else
52346         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52347         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52348         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52349 $as_echo "yes" >&6; }
52350         FOUND_FREETYPE=yes
52351 fi
52352             if test "x$FOUND_FREETYPE" = xyes; then
52353               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52354               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52355               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52356               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52357                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52358               fi
52359               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52360               if test "x$BUNDLE_FREETYPE" = xyes; then
52361                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52362 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52363                 FOUND_FREETYPE=no
52364               else
52365                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52366 $as_echo_n "checking for freetype... " >&6; }
52367                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52368 $as_echo "yes (using pkg-config)" >&6; }
52369               fi
52370             fi
52371           fi
52372         fi
52373       fi
52374 
52375       if test "x$FOUND_FREETYPE" != xyes; then
52376         # Check in well-known locations
52377         if test "x$OPENJDK_TARGET_OS" = xwindows; then
52378           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52379 
52380   windows_path="$FREETYPE_BASE_DIR"
52381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52382     unix_path=`$CYGPATH -u "$windows_path"`
52383     FREETYPE_BASE_DIR="$unix_path"
52384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52386     FREETYPE_BASE_DIR="$unix_path"
52387   fi
52388 
52389 
52390   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52391   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52392   METHOD="well-known location"
52393 
52394   # Let's start with an optimistic view of the world :-)
52395   FOUND_FREETYPE=yes
52396 
52397   # First look for the canonical freetype main include file ft2build.h.
52398   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52399     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52400     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52401     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52402       # Fail.
52403       FOUND_FREETYPE=no
52404     fi
52405   fi
52406 
52407   if test "x$FOUND_FREETYPE" = xyes; then
52408     # Include file found, let's continue the sanity check.
52409     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52410 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52411 
52412     # Reset to default value
52413     FREETYPE_BASE_NAME=freetype
52414     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52415     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52416       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52417           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52418         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52419         # for the .6 version explicitly.
52420         FREETYPE_BASE_NAME=freetype.6
52421         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52422         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52423 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52424       else
52425         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52426 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52427         FOUND_FREETYPE=no
52428       fi
52429     else
52430       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52431         # On Windows, we will need both .lib and .dll file.
52432         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52433           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52434 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52435           FOUND_FREETYPE=no
52436         fi
52437       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52438           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52439         # Found lib in isa dir, use that instead.
52440         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52441         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52442 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52443       fi
52444     fi
52445   fi
52446 
52447   if test "x$FOUND_FREETYPE" = xyes; then
52448 
52449   # Only process if variable expands to non-empty
52450 
52451   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52452     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52453 
52454   # Input might be given as Windows format, start by converting to
52455   # unix format.
52456   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52457   new_path=`$CYGPATH -u "$path"`
52458 
52459   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52460   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52461   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52462   # "foo.exe" is OK but "foo" is an error.
52463   #
52464   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52465   # It is also a way to make sure we got the proper file name for the real test later on.
52466   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52467   if test "x$test_shortpath" = x; then
52468     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52469 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52470     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52471   fi
52472 
52473   # Call helper function which possibly converts this using DOS-style short mode.
52474   # If so, the updated path is stored in $new_path.
52475 
52476   input_path="$new_path"
52477   # Check if we need to convert this using DOS-style short mode. If the path
52478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52479   # take no chances and rewrite it.
52480   # Note: m4 eats our [], so we need to use [ and ] instead.
52481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52482   if test "x$has_forbidden_chars" != x; then
52483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52487       # Going to short mode and back again did indeed matter. Since short mode is
52488       # case insensitive, let's make it lowercase to improve readability.
52489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52490       # Now convert it back to Unix-style (cygpath)
52491       input_path=`$CYGPATH -u "$shortmode_path"`
52492       new_path="$input_path"
52493     fi
52494   fi
52495 
52496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52497   if test "x$test_cygdrive_prefix" = x; then
52498     # As a simple fix, exclude /usr/bin since it's not a real path.
52499     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52501       # a path prefixed by /cygdrive for fixpath to work.
52502       new_path="$CYGWIN_ROOT_PATH$input_path"
52503     fi
52504   fi
52505 
52506 
52507   if test "x$path" != "x$new_path"; then
52508     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52510 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52511   fi
52512 
52513     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52514 
52515   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52516   has_colon=`$ECHO $path | $GREP ^.:`
52517   new_path="$path"
52518   if test "x$has_colon" = x; then
52519     # Not in mixed or Windows style, start by that.
52520     new_path=`cmd //c echo $path`
52521   fi
52522 
52523 
52524   input_path="$new_path"
52525   # Check if we need to convert this using DOS-style short mode. If the path
52526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52527   # take no chances and rewrite it.
52528   # Note: m4 eats our [], so we need to use [ and ] instead.
52529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52530   if test "x$has_forbidden_chars" != x; then
52531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52533   fi
52534 
52535 
52536   windows_path="$new_path"
52537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52538     unix_path=`$CYGPATH -u "$windows_path"`
52539     new_path="$unix_path"
52540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52542     new_path="$unix_path"
52543   fi
52544 
52545   if test "x$path" != "x$new_path"; then
52546     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52548 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52549   fi
52550 
52551   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52552   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52553 
52554     else
52555       # We're on a unix platform. Hooray! :)
52556       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52557       has_space=`$ECHO "$path" | $GREP " "`
52558       if test "x$has_space" != x; then
52559         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52560 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52561         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52562       fi
52563 
52564       # Use eval to expand a potential ~
52565       eval path="$path"
52566       if test ! -f "$path" && test ! -d "$path"; then
52567         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52568       fi
52569 
52570       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52571     fi
52572   fi
52573 
52574 
52575   # Only process if variable expands to non-empty
52576 
52577   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52578     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52579 
52580   # Input might be given as Windows format, start by converting to
52581   # unix format.
52582   path="$POTENTIAL_FREETYPE_LIB_PATH"
52583   new_path=`$CYGPATH -u "$path"`
52584 
52585   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52586   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52587   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52588   # "foo.exe" is OK but "foo" is an error.
52589   #
52590   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52591   # It is also a way to make sure we got the proper file name for the real test later on.
52592   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52593   if test "x$test_shortpath" = x; then
52594     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52595 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52596     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52597   fi
52598 
52599   # Call helper function which possibly converts this using DOS-style short mode.
52600   # If so, the updated path is stored in $new_path.
52601 
52602   input_path="$new_path"
52603   # Check if we need to convert this using DOS-style short mode. If the path
52604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52605   # take no chances and rewrite it.
52606   # Note: m4 eats our [], so we need to use [ and ] instead.
52607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52608   if test "x$has_forbidden_chars" != x; then
52609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52610     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52611     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52612     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52613       # Going to short mode and back again did indeed matter. Since short mode is
52614       # case insensitive, let's make it lowercase to improve readability.
52615       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52616       # Now convert it back to Unix-style (cygpath)
52617       input_path=`$CYGPATH -u "$shortmode_path"`
52618       new_path="$input_path"
52619     fi
52620   fi
52621 
52622   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52623   if test "x$test_cygdrive_prefix" = x; then
52624     # As a simple fix, exclude /usr/bin since it's not a real path.
52625     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52626       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52627       # a path prefixed by /cygdrive for fixpath to work.
52628       new_path="$CYGWIN_ROOT_PATH$input_path"
52629     fi
52630   fi
52631 
52632 
52633   if test "x$path" != "x$new_path"; then
52634     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52636 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52637   fi
52638 
52639     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52640 
52641   path="$POTENTIAL_FREETYPE_LIB_PATH"
52642   has_colon=`$ECHO $path | $GREP ^.:`
52643   new_path="$path"
52644   if test "x$has_colon" = x; then
52645     # Not in mixed or Windows style, start by that.
52646     new_path=`cmd //c echo $path`
52647   fi
52648 
52649 
52650   input_path="$new_path"
52651   # Check if we need to convert this using DOS-style short mode. If the path
52652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52653   # take no chances and rewrite it.
52654   # Note: m4 eats our [], so we need to use [ and ] instead.
52655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52656   if test "x$has_forbidden_chars" != x; then
52657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52659   fi
52660 
52661 
52662   windows_path="$new_path"
52663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52664     unix_path=`$CYGPATH -u "$windows_path"`
52665     new_path="$unix_path"
52666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52668     new_path="$unix_path"
52669   fi
52670 
52671   if test "x$path" != "x$new_path"; then
52672     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52674 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52675   fi
52676 
52677   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52678   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52679 
52680     else
52681       # We're on a unix platform. Hooray! :)
52682       path="$POTENTIAL_FREETYPE_LIB_PATH"
52683       has_space=`$ECHO "$path" | $GREP " "`
52684       if test "x$has_space" != x; then
52685         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52686 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52687         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52688       fi
52689 
52690       # Use eval to expand a potential ~
52691       eval path="$path"
52692       if test ! -f "$path" && test ! -d "$path"; then
52693         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52694       fi
52695 
52696       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52697     fi
52698   fi
52699 
52700 
52701     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52703 $as_echo_n "checking for freetype includes... " >&6; }
52704     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52705 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52706     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52707     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52708 $as_echo_n "checking for freetype libraries... " >&6; }
52709     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52710 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52711   fi
52712 
52713           if test "x$FOUND_FREETYPE" != xyes; then
52714             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
52715 
52716   windows_path="$FREETYPE_BASE_DIR"
52717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52718     unix_path=`$CYGPATH -u "$windows_path"`
52719     FREETYPE_BASE_DIR="$unix_path"
52720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52722     FREETYPE_BASE_DIR="$unix_path"
52723   fi
52724 
52725 
52726   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52727   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52728   METHOD="well-known location"
52729 
52730   # Let's start with an optimistic view of the world :-)
52731   FOUND_FREETYPE=yes
52732 
52733   # First look for the canonical freetype main include file ft2build.h.
52734   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52735     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52736     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52737     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52738       # Fail.
52739       FOUND_FREETYPE=no
52740     fi
52741   fi
52742 
52743   if test "x$FOUND_FREETYPE" = xyes; then
52744     # Include file found, let's continue the sanity check.
52745     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52746 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52747 
52748     # Reset to default value
52749     FREETYPE_BASE_NAME=freetype
52750     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52751     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52752       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52753           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52754         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52755         # for the .6 version explicitly.
52756         FREETYPE_BASE_NAME=freetype.6
52757         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52758         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52759 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52760       else
52761         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52762 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52763         FOUND_FREETYPE=no
52764       fi
52765     else
52766       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52767         # On Windows, we will need both .lib and .dll file.
52768         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52769           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52770 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52771           FOUND_FREETYPE=no
52772         fi
52773       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52774           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52775         # Found lib in isa dir, use that instead.
52776         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52777         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52778 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52779       fi
52780     fi
52781   fi
52782 
52783   if test "x$FOUND_FREETYPE" = xyes; then
52784 
52785   # Only process if variable expands to non-empty
52786 
52787   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52788     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52789 
52790   # Input might be given as Windows format, start by converting to
52791   # unix format.
52792   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52793   new_path=`$CYGPATH -u "$path"`
52794 
52795   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52796   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52797   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52798   # "foo.exe" is OK but "foo" is an error.
52799   #
52800   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52801   # It is also a way to make sure we got the proper file name for the real test later on.
52802   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52803   if test "x$test_shortpath" = x; then
52804     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52805 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52806     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52807   fi
52808 
52809   # Call helper function which possibly converts this using DOS-style short mode.
52810   # If so, the updated path is stored in $new_path.
52811 
52812   input_path="$new_path"
52813   # Check if we need to convert this using DOS-style short mode. If the path
52814   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52815   # take no chances and rewrite it.
52816   # Note: m4 eats our [], so we need to use [ and ] instead.
52817   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52818   if test "x$has_forbidden_chars" != x; then
52819     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52820     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52821     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52822     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52823       # Going to short mode and back again did indeed matter. Since short mode is
52824       # case insensitive, let's make it lowercase to improve readability.
52825       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52826       # Now convert it back to Unix-style (cygpath)
52827       input_path=`$CYGPATH -u "$shortmode_path"`
52828       new_path="$input_path"
52829     fi
52830   fi
52831 
52832   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52833   if test "x$test_cygdrive_prefix" = x; then
52834     # As a simple fix, exclude /usr/bin since it's not a real path.
52835     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52836       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52837       # a path prefixed by /cygdrive for fixpath to work.
52838       new_path="$CYGWIN_ROOT_PATH$input_path"
52839     fi
52840   fi
52841 
52842 
52843   if test "x$path" != "x$new_path"; then
52844     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52845     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52846 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52847   fi
52848 
52849     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52850 
52851   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52852   has_colon=`$ECHO $path | $GREP ^.:`
52853   new_path="$path"
52854   if test "x$has_colon" = x; then
52855     # Not in mixed or Windows style, start by that.
52856     new_path=`cmd //c echo $path`
52857   fi
52858 
52859 
52860   input_path="$new_path"
52861   # Check if we need to convert this using DOS-style short mode. If the path
52862   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52863   # take no chances and rewrite it.
52864   # Note: m4 eats our [], so we need to use [ and ] instead.
52865   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52866   if test "x$has_forbidden_chars" != x; then
52867     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52868     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52869   fi
52870 
52871 
52872   windows_path="$new_path"
52873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52874     unix_path=`$CYGPATH -u "$windows_path"`
52875     new_path="$unix_path"
52876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52878     new_path="$unix_path"
52879   fi
52880 
52881   if test "x$path" != "x$new_path"; then
52882     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52883     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52884 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52885   fi
52886 
52887   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52888   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52889 
52890     else
52891       # We're on a unix platform. Hooray! :)
52892       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52893       has_space=`$ECHO "$path" | $GREP " "`
52894       if test "x$has_space" != x; then
52895         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52896 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52897         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52898       fi
52899 
52900       # Use eval to expand a potential ~
52901       eval path="$path"
52902       if test ! -f "$path" && test ! -d "$path"; then
52903         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52904       fi
52905 
52906       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52907     fi
52908   fi
52909 
52910 
52911   # Only process if variable expands to non-empty
52912 
52913   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52914     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52915 
52916   # Input might be given as Windows format, start by converting to
52917   # unix format.
52918   path="$POTENTIAL_FREETYPE_LIB_PATH"
52919   new_path=`$CYGPATH -u "$path"`
52920 
52921   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52922   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52923   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52924   # "foo.exe" is OK but "foo" is an error.
52925   #
52926   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52927   # It is also a way to make sure we got the proper file name for the real test later on.
52928   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52929   if test "x$test_shortpath" = x; then
52930     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52931 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52932     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52933   fi
52934 
52935   # Call helper function which possibly converts this using DOS-style short mode.
52936   # If so, the updated path is stored in $new_path.
52937 
52938   input_path="$new_path"
52939   # Check if we need to convert this using DOS-style short mode. If the path
52940   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52941   # take no chances and rewrite it.
52942   # Note: m4 eats our [], so we need to use [ and ] instead.
52943   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52944   if test "x$has_forbidden_chars" != x; then
52945     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52946     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52947     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52948     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52949       # Going to short mode and back again did indeed matter. Since short mode is
52950       # case insensitive, let's make it lowercase to improve readability.
52951       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52952       # Now convert it back to Unix-style (cygpath)
52953       input_path=`$CYGPATH -u "$shortmode_path"`
52954       new_path="$input_path"
52955     fi
52956   fi
52957 
52958   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52959   if test "x$test_cygdrive_prefix" = x; then
52960     # As a simple fix, exclude /usr/bin since it's not a real path.
52961     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52962       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52963       # a path prefixed by /cygdrive for fixpath to work.
52964       new_path="$CYGWIN_ROOT_PATH$input_path"
52965     fi
52966   fi
52967 
52968 
52969   if test "x$path" != "x$new_path"; then
52970     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52971     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52972 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52973   fi
52974 
52975     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52976 
52977   path="$POTENTIAL_FREETYPE_LIB_PATH"
52978   has_colon=`$ECHO $path | $GREP ^.:`
52979   new_path="$path"
52980   if test "x$has_colon" = x; then
52981     # Not in mixed or Windows style, start by that.
52982     new_path=`cmd //c echo $path`
52983   fi
52984 
52985 
52986   input_path="$new_path"
52987   # Check if we need to convert this using DOS-style short mode. If the path
52988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52989   # take no chances and rewrite it.
52990   # Note: m4 eats our [], so we need to use [ and ] instead.
52991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52992   if test "x$has_forbidden_chars" != x; then
52993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52994     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52995   fi
52996 
52997 
52998   windows_path="$new_path"
52999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53000     unix_path=`$CYGPATH -u "$windows_path"`
53001     new_path="$unix_path"
53002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53004     new_path="$unix_path"
53005   fi
53006 
53007   if test "x$path" != "x$new_path"; then
53008     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53009     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53010 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53011   fi
53012 
53013   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53014   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53015 
53016     else
53017       # We're on a unix platform. Hooray! :)
53018       path="$POTENTIAL_FREETYPE_LIB_PATH"
53019       has_space=`$ECHO "$path" | $GREP " "`
53020       if test "x$has_space" != x; then
53021         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53022 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53023         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53024       fi
53025 
53026       # Use eval to expand a potential ~
53027       eval path="$path"
53028       if test ! -f "$path" && test ! -d "$path"; then
53029         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53030       fi
53031 
53032       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53033     fi
53034   fi
53035 
53036 
53037     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53038     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53039 $as_echo_n "checking for freetype includes... " >&6; }
53040     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53041 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53042     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53043     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53044 $as_echo_n "checking for freetype libraries... " >&6; }
53045     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53046 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53047   fi
53048 
53049           fi
53050         else
53051           FREETYPE_BASE_DIR="$SYSROOT/usr"
53052 
53053   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53054   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53055   METHOD="well-known location"
53056 
53057   # Let's start with an optimistic view of the world :-)
53058   FOUND_FREETYPE=yes
53059 
53060   # First look for the canonical freetype main include file ft2build.h.
53061   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53062     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53063     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53064     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53065       # Fail.
53066       FOUND_FREETYPE=no
53067     fi
53068   fi
53069 
53070   if test "x$FOUND_FREETYPE" = xyes; then
53071     # Include file found, let's continue the sanity check.
53072     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53073 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53074 
53075     # Reset to default value
53076     FREETYPE_BASE_NAME=freetype
53077     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53078     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53079       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53080           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53081         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53082         # for the .6 version explicitly.
53083         FREETYPE_BASE_NAME=freetype.6
53084         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53085         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53086 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53087       else
53088         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53089 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53090         FOUND_FREETYPE=no
53091       fi
53092     else
53093       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53094         # On Windows, we will need both .lib and .dll file.
53095         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53096           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53097 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53098           FOUND_FREETYPE=no
53099         fi
53100       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53101           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53102         # Found lib in isa dir, use that instead.
53103         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53104         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53105 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53106       fi
53107     fi
53108   fi
53109 
53110   if test "x$FOUND_FREETYPE" = xyes; then
53111 
53112   # Only process if variable expands to non-empty
53113 
53114   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53115     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53116 
53117   # Input might be given as Windows format, start by converting to
53118   # unix format.
53119   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53120   new_path=`$CYGPATH -u "$path"`
53121 
53122   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53123   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53124   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53125   # "foo.exe" is OK but "foo" is an error.
53126   #
53127   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53128   # It is also a way to make sure we got the proper file name for the real test later on.
53129   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53130   if test "x$test_shortpath" = x; then
53131     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53132 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53133     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53134   fi
53135 
53136   # Call helper function which possibly converts this using DOS-style short mode.
53137   # If so, the updated path is stored in $new_path.
53138 
53139   input_path="$new_path"
53140   # Check if we need to convert this using DOS-style short mode. If the path
53141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53142   # take no chances and rewrite it.
53143   # Note: m4 eats our [], so we need to use [ and ] instead.
53144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53145   if test "x$has_forbidden_chars" != x; then
53146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53147     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53148     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53149     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53150       # Going to short mode and back again did indeed matter. Since short mode is
53151       # case insensitive, let's make it lowercase to improve readability.
53152       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53153       # Now convert it back to Unix-style (cygpath)
53154       input_path=`$CYGPATH -u "$shortmode_path"`
53155       new_path="$input_path"
53156     fi
53157   fi
53158 
53159   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53160   if test "x$test_cygdrive_prefix" = x; then
53161     # As a simple fix, exclude /usr/bin since it's not a real path.
53162     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53163       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53164       # a path prefixed by /cygdrive for fixpath to work.
53165       new_path="$CYGWIN_ROOT_PATH$input_path"
53166     fi
53167   fi
53168 
53169 
53170   if test "x$path" != "x$new_path"; then
53171     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53172     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53173 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53174   fi
53175 
53176     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53177 
53178   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53179   has_colon=`$ECHO $path | $GREP ^.:`
53180   new_path="$path"
53181   if test "x$has_colon" = x; then
53182     # Not in mixed or Windows style, start by that.
53183     new_path=`cmd //c echo $path`
53184   fi
53185 
53186 
53187   input_path="$new_path"
53188   # Check if we need to convert this using DOS-style short mode. If the path
53189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53190   # take no chances and rewrite it.
53191   # Note: m4 eats our [], so we need to use [ and ] instead.
53192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53193   if test "x$has_forbidden_chars" != x; then
53194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53195     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53196   fi
53197 
53198 
53199   windows_path="$new_path"
53200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53201     unix_path=`$CYGPATH -u "$windows_path"`
53202     new_path="$unix_path"
53203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53205     new_path="$unix_path"
53206   fi
53207 
53208   if test "x$path" != "x$new_path"; then
53209     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53210     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53211 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53212   fi
53213 
53214   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53215   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53216 
53217     else
53218       # We're on a unix platform. Hooray! :)
53219       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53220       has_space=`$ECHO "$path" | $GREP " "`
53221       if test "x$has_space" != x; then
53222         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53223 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53224         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53225       fi
53226 
53227       # Use eval to expand a potential ~
53228       eval path="$path"
53229       if test ! -f "$path" && test ! -d "$path"; then
53230         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53231       fi
53232 
53233       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53234     fi
53235   fi
53236 
53237 
53238   # Only process if variable expands to non-empty
53239 
53240   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53241     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53242 
53243   # Input might be given as Windows format, start by converting to
53244   # unix format.
53245   path="$POTENTIAL_FREETYPE_LIB_PATH"
53246   new_path=`$CYGPATH -u "$path"`
53247 
53248   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53249   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53250   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53251   # "foo.exe" is OK but "foo" is an error.
53252   #
53253   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53254   # It is also a way to make sure we got the proper file name for the real test later on.
53255   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53256   if test "x$test_shortpath" = x; then
53257     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53258 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53259     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53260   fi
53261 
53262   # Call helper function which possibly converts this using DOS-style short mode.
53263   # If so, the updated path is stored in $new_path.
53264 
53265   input_path="$new_path"
53266   # Check if we need to convert this using DOS-style short mode. If the path
53267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53268   # take no chances and rewrite it.
53269   # Note: m4 eats our [], so we need to use [ and ] instead.
53270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53271   if test "x$has_forbidden_chars" != x; then
53272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53273     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53274     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53275     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53276       # Going to short mode and back again did indeed matter. Since short mode is
53277       # case insensitive, let's make it lowercase to improve readability.
53278       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53279       # Now convert it back to Unix-style (cygpath)
53280       input_path=`$CYGPATH -u "$shortmode_path"`
53281       new_path="$input_path"
53282     fi
53283   fi
53284 
53285   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53286   if test "x$test_cygdrive_prefix" = x; then
53287     # As a simple fix, exclude /usr/bin since it's not a real path.
53288     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53289       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53290       # a path prefixed by /cygdrive for fixpath to work.
53291       new_path="$CYGWIN_ROOT_PATH$input_path"
53292     fi
53293   fi
53294 
53295 
53296   if test "x$path" != "x$new_path"; then
53297     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53299 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53300   fi
53301 
53302     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53303 
53304   path="$POTENTIAL_FREETYPE_LIB_PATH"
53305   has_colon=`$ECHO $path | $GREP ^.:`
53306   new_path="$path"
53307   if test "x$has_colon" = x; then
53308     # Not in mixed or Windows style, start by that.
53309     new_path=`cmd //c echo $path`
53310   fi
53311 
53312 
53313   input_path="$new_path"
53314   # Check if we need to convert this using DOS-style short mode. If the path
53315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53316   # take no chances and rewrite it.
53317   # Note: m4 eats our [], so we need to use [ and ] instead.
53318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53319   if test "x$has_forbidden_chars" != x; then
53320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53321     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53322   fi
53323 
53324 
53325   windows_path="$new_path"
53326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53327     unix_path=`$CYGPATH -u "$windows_path"`
53328     new_path="$unix_path"
53329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53331     new_path="$unix_path"
53332   fi
53333 
53334   if test "x$path" != "x$new_path"; then
53335     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53336     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53337 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53338   fi
53339 
53340   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53341   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53342 
53343     else
53344       # We're on a unix platform. Hooray! :)
53345       path="$POTENTIAL_FREETYPE_LIB_PATH"
53346       has_space=`$ECHO "$path" | $GREP " "`
53347       if test "x$has_space" != x; then
53348         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53349 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53350         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53351       fi
53352 
53353       # Use eval to expand a potential ~
53354       eval path="$path"
53355       if test ! -f "$path" && test ! -d "$path"; then
53356         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53357       fi
53358 
53359       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53360     fi
53361   fi
53362 
53363 
53364     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53365     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53366 $as_echo_n "checking for freetype includes... " >&6; }
53367     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53368 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53369     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53370     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53371 $as_echo_n "checking for freetype libraries... " >&6; }
53372     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53373 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53374   fi
53375 
53376 
53377           if test "x$FOUND_FREETYPE" != xyes; then
53378             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
53379 
53380   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53381   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53382   METHOD="well-known location"
53383 
53384   # Let's start with an optimistic view of the world :-)
53385   FOUND_FREETYPE=yes
53386 
53387   # First look for the canonical freetype main include file ft2build.h.
53388   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53389     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53390     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53391     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53392       # Fail.
53393       FOUND_FREETYPE=no
53394     fi
53395   fi
53396 
53397   if test "x$FOUND_FREETYPE" = xyes; then
53398     # Include file found, let's continue the sanity check.
53399     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53400 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53401 
53402     # Reset to default value
53403     FREETYPE_BASE_NAME=freetype
53404     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53405     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53406       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53407           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53408         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53409         # for the .6 version explicitly.
53410         FREETYPE_BASE_NAME=freetype.6
53411         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53412         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53413 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53414       else
53415         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53416 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53417         FOUND_FREETYPE=no
53418       fi
53419     else
53420       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53421         # On Windows, we will need both .lib and .dll file.
53422         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53423           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53424 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53425           FOUND_FREETYPE=no
53426         fi
53427       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53428           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53429         # Found lib in isa dir, use that instead.
53430         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53431         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53432 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53433       fi
53434     fi
53435   fi
53436 
53437   if test "x$FOUND_FREETYPE" = xyes; then
53438 
53439   # Only process if variable expands to non-empty
53440 
53441   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53442     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53443 
53444   # Input might be given as Windows format, start by converting to
53445   # unix format.
53446   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53447   new_path=`$CYGPATH -u "$path"`
53448 
53449   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53450   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53451   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53452   # "foo.exe" is OK but "foo" is an error.
53453   #
53454   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53455   # It is also a way to make sure we got the proper file name for the real test later on.
53456   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53457   if test "x$test_shortpath" = x; then
53458     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53459 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53460     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53461   fi
53462 
53463   # Call helper function which possibly converts this using DOS-style short mode.
53464   # If so, the updated path is stored in $new_path.
53465 
53466   input_path="$new_path"
53467   # Check if we need to convert this using DOS-style short mode. If the path
53468   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53469   # take no chances and rewrite it.
53470   # Note: m4 eats our [], so we need to use [ and ] instead.
53471   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53472   if test "x$has_forbidden_chars" != x; then
53473     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53474     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53475     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53476     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53477       # Going to short mode and back again did indeed matter. Since short mode is
53478       # case insensitive, let's make it lowercase to improve readability.
53479       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53480       # Now convert it back to Unix-style (cygpath)
53481       input_path=`$CYGPATH -u "$shortmode_path"`
53482       new_path="$input_path"
53483     fi
53484   fi
53485 
53486   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53487   if test "x$test_cygdrive_prefix" = x; then
53488     # As a simple fix, exclude /usr/bin since it's not a real path.
53489     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53490       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53491       # a path prefixed by /cygdrive for fixpath to work.
53492       new_path="$CYGWIN_ROOT_PATH$input_path"
53493     fi
53494   fi
53495 
53496 
53497   if test "x$path" != "x$new_path"; then
53498     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53500 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53501   fi
53502 
53503     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53504 
53505   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53506   has_colon=`$ECHO $path | $GREP ^.:`
53507   new_path="$path"
53508   if test "x$has_colon" = x; then
53509     # Not in mixed or Windows style, start by that.
53510     new_path=`cmd //c echo $path`
53511   fi
53512 
53513 
53514   input_path="$new_path"
53515   # Check if we need to convert this using DOS-style short mode. If the path
53516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53517   # take no chances and rewrite it.
53518   # Note: m4 eats our [], so we need to use [ and ] instead.
53519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53520   if test "x$has_forbidden_chars" != x; then
53521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53522     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53523   fi
53524 
53525 
53526   windows_path="$new_path"
53527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53528     unix_path=`$CYGPATH -u "$windows_path"`
53529     new_path="$unix_path"
53530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53531     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53532     new_path="$unix_path"
53533   fi
53534 
53535   if test "x$path" != "x$new_path"; then
53536     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53538 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53539   fi
53540 
53541   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53542   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53543 
53544     else
53545       # We're on a unix platform. Hooray! :)
53546       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53547       has_space=`$ECHO "$path" | $GREP " "`
53548       if test "x$has_space" != x; then
53549         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53550 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53551         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53552       fi
53553 
53554       # Use eval to expand a potential ~
53555       eval path="$path"
53556       if test ! -f "$path" && test ! -d "$path"; then
53557         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53558       fi
53559 
53560       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53561     fi
53562   fi
53563 
53564 
53565   # Only process if variable expands to non-empty
53566 
53567   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53568     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53569 
53570   # Input might be given as Windows format, start by converting to
53571   # unix format.
53572   path="$POTENTIAL_FREETYPE_LIB_PATH"
53573   new_path=`$CYGPATH -u "$path"`
53574 
53575   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53576   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53577   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53578   # "foo.exe" is OK but "foo" is an error.
53579   #
53580   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53581   # It is also a way to make sure we got the proper file name for the real test later on.
53582   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53583   if test "x$test_shortpath" = x; then
53584     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53585 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53586     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53587   fi
53588 
53589   # Call helper function which possibly converts this using DOS-style short mode.
53590   # If so, the updated path is stored in $new_path.
53591 
53592   input_path="$new_path"
53593   # Check if we need to convert this using DOS-style short mode. If the path
53594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53595   # take no chances and rewrite it.
53596   # Note: m4 eats our [], so we need to use [ and ] instead.
53597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53598   if test "x$has_forbidden_chars" != x; then
53599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53600     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53601     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53602     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53603       # Going to short mode and back again did indeed matter. Since short mode is
53604       # case insensitive, let's make it lowercase to improve readability.
53605       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53606       # Now convert it back to Unix-style (cygpath)
53607       input_path=`$CYGPATH -u "$shortmode_path"`
53608       new_path="$input_path"
53609     fi
53610   fi
53611 
53612   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53613   if test "x$test_cygdrive_prefix" = x; then
53614     # As a simple fix, exclude /usr/bin since it's not a real path.
53615     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53616       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53617       # a path prefixed by /cygdrive for fixpath to work.
53618       new_path="$CYGWIN_ROOT_PATH$input_path"
53619     fi
53620   fi
53621 
53622 
53623   if test "x$path" != "x$new_path"; then
53624     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53626 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53627   fi
53628 
53629     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53630 
53631   path="$POTENTIAL_FREETYPE_LIB_PATH"
53632   has_colon=`$ECHO $path | $GREP ^.:`
53633   new_path="$path"
53634   if test "x$has_colon" = x; then
53635     # Not in mixed or Windows style, start by that.
53636     new_path=`cmd //c echo $path`
53637   fi
53638 
53639 
53640   input_path="$new_path"
53641   # Check if we need to convert this using DOS-style short mode. If the path
53642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53643   # take no chances and rewrite it.
53644   # Note: m4 eats our [], so we need to use [ and ] instead.
53645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53646   if test "x$has_forbidden_chars" != x; then
53647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53648     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53649   fi
53650 
53651 
53652   windows_path="$new_path"
53653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53654     unix_path=`$CYGPATH -u "$windows_path"`
53655     new_path="$unix_path"
53656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53657     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53658     new_path="$unix_path"
53659   fi
53660 
53661   if test "x$path" != "x$new_path"; then
53662     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53663     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53664 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53665   fi
53666 
53667   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53668   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53669 
53670     else
53671       # We're on a unix platform. Hooray! :)
53672       path="$POTENTIAL_FREETYPE_LIB_PATH"
53673       has_space=`$ECHO "$path" | $GREP " "`
53674       if test "x$has_space" != x; then
53675         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53676 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53677         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53678       fi
53679 
53680       # Use eval to expand a potential ~
53681       eval path="$path"
53682       if test ! -f "$path" && test ! -d "$path"; then
53683         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53684       fi
53685 
53686       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53687     fi
53688   fi
53689 
53690 
53691     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53692     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53693 $as_echo_n "checking for freetype includes... " >&6; }
53694     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53695 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53696     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53697     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53698 $as_echo_n "checking for freetype libraries... " >&6; }
53699     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53700 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53701   fi
53702 
53703           fi
53704 
53705           if test "x$FOUND_FREETYPE" != xyes; then
53706             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
53707 
53708   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53709   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53710   METHOD="well-known location"
53711 
53712   # Let's start with an optimistic view of the world :-)
53713   FOUND_FREETYPE=yes
53714 
53715   # First look for the canonical freetype main include file ft2build.h.
53716   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53717     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53718     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53719     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53720       # Fail.
53721       FOUND_FREETYPE=no
53722     fi
53723   fi
53724 
53725   if test "x$FOUND_FREETYPE" = xyes; then
53726     # Include file found, let's continue the sanity check.
53727     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53728 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53729 
53730     # Reset to default value
53731     FREETYPE_BASE_NAME=freetype
53732     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53733     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53734       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53735           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53736         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53737         # for the .6 version explicitly.
53738         FREETYPE_BASE_NAME=freetype.6
53739         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53740         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53741 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53742       else
53743         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53744 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53745         FOUND_FREETYPE=no
53746       fi
53747     else
53748       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53749         # On Windows, we will need both .lib and .dll file.
53750         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53751           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53752 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53753           FOUND_FREETYPE=no
53754         fi
53755       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53756           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53757         # Found lib in isa dir, use that instead.
53758         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53759         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53760 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53761       fi
53762     fi
53763   fi
53764 
53765   if test "x$FOUND_FREETYPE" = xyes; then
53766 
53767   # Only process if variable expands to non-empty
53768 
53769   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53770     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53771 
53772   # Input might be given as Windows format, start by converting to
53773   # unix format.
53774   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53775   new_path=`$CYGPATH -u "$path"`
53776 
53777   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53778   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53779   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53780   # "foo.exe" is OK but "foo" is an error.
53781   #
53782   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53783   # It is also a way to make sure we got the proper file name for the real test later on.
53784   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53785   if test "x$test_shortpath" = x; then
53786     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53787 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53788     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53789   fi
53790 
53791   # Call helper function which possibly converts this using DOS-style short mode.
53792   # If so, the updated path is stored in $new_path.
53793 
53794   input_path="$new_path"
53795   # Check if we need to convert this using DOS-style short mode. If the path
53796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53797   # take no chances and rewrite it.
53798   # Note: m4 eats our [], so we need to use [ and ] instead.
53799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53800   if test "x$has_forbidden_chars" != x; then
53801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53802     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53803     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53804     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53805       # Going to short mode and back again did indeed matter. Since short mode is
53806       # case insensitive, let's make it lowercase to improve readability.
53807       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53808       # Now convert it back to Unix-style (cygpath)
53809       input_path=`$CYGPATH -u "$shortmode_path"`
53810       new_path="$input_path"
53811     fi
53812   fi
53813 
53814   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53815   if test "x$test_cygdrive_prefix" = x; then
53816     # As a simple fix, exclude /usr/bin since it's not a real path.
53817     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53818       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53819       # a path prefixed by /cygdrive for fixpath to work.
53820       new_path="$CYGWIN_ROOT_PATH$input_path"
53821     fi
53822   fi
53823 
53824 
53825   if test "x$path" != "x$new_path"; then
53826     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53827     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53828 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53829   fi
53830 
53831     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53832 
53833   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53834   has_colon=`$ECHO $path | $GREP ^.:`
53835   new_path="$path"
53836   if test "x$has_colon" = x; then
53837     # Not in mixed or Windows style, start by that.
53838     new_path=`cmd //c echo $path`
53839   fi
53840 
53841 
53842   input_path="$new_path"
53843   # Check if we need to convert this using DOS-style short mode. If the path
53844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53845   # take no chances and rewrite it.
53846   # Note: m4 eats our [], so we need to use [ and ] instead.
53847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53848   if test "x$has_forbidden_chars" != x; then
53849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53850     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53851   fi
53852 
53853 
53854   windows_path="$new_path"
53855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53856     unix_path=`$CYGPATH -u "$windows_path"`
53857     new_path="$unix_path"
53858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53860     new_path="$unix_path"
53861   fi
53862 
53863   if test "x$path" != "x$new_path"; then
53864     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53865     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53866 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53867   fi
53868 
53869   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53870   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53871 
53872     else
53873       # We're on a unix platform. Hooray! :)
53874       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53875       has_space=`$ECHO "$path" | $GREP " "`
53876       if test "x$has_space" != x; then
53877         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53878 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53879         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53880       fi
53881 
53882       # Use eval to expand a potential ~
53883       eval path="$path"
53884       if test ! -f "$path" && test ! -d "$path"; then
53885         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53886       fi
53887 
53888       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53889     fi
53890   fi
53891 
53892 
53893   # Only process if variable expands to non-empty
53894 
53895   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53896     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53897 
53898   # Input might be given as Windows format, start by converting to
53899   # unix format.
53900   path="$POTENTIAL_FREETYPE_LIB_PATH"
53901   new_path=`$CYGPATH -u "$path"`
53902 
53903   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53904   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53905   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53906   # "foo.exe" is OK but "foo" is an error.
53907   #
53908   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53909   # It is also a way to make sure we got the proper file name for the real test later on.
53910   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53911   if test "x$test_shortpath" = x; then
53912     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53913 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53914     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53915   fi
53916 
53917   # Call helper function which possibly converts this using DOS-style short mode.
53918   # If so, the updated path is stored in $new_path.
53919 
53920   input_path="$new_path"
53921   # Check if we need to convert this using DOS-style short mode. If the path
53922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53923   # take no chances and rewrite it.
53924   # Note: m4 eats our [], so we need to use [ and ] instead.
53925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53926   if test "x$has_forbidden_chars" != x; then
53927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53928     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53929     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53930     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53931       # Going to short mode and back again did indeed matter. Since short mode is
53932       # case insensitive, let's make it lowercase to improve readability.
53933       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53934       # Now convert it back to Unix-style (cygpath)
53935       input_path=`$CYGPATH -u "$shortmode_path"`
53936       new_path="$input_path"
53937     fi
53938   fi
53939 
53940   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53941   if test "x$test_cygdrive_prefix" = x; then
53942     # As a simple fix, exclude /usr/bin since it's not a real path.
53943     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53944       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53945       # a path prefixed by /cygdrive for fixpath to work.
53946       new_path="$CYGWIN_ROOT_PATH$input_path"
53947     fi
53948   fi
53949 
53950 
53951   if test "x$path" != "x$new_path"; then
53952     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53953     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53954 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53955   fi
53956 
53957     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53958 
53959   path="$POTENTIAL_FREETYPE_LIB_PATH"
53960   has_colon=`$ECHO $path | $GREP ^.:`
53961   new_path="$path"
53962   if test "x$has_colon" = x; then
53963     # Not in mixed or Windows style, start by that.
53964     new_path=`cmd //c echo $path`
53965   fi
53966 
53967 
53968   input_path="$new_path"
53969   # Check if we need to convert this using DOS-style short mode. If the path
53970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53971   # take no chances and rewrite it.
53972   # Note: m4 eats our [], so we need to use [ and ] instead.
53973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53974   if test "x$has_forbidden_chars" != x; then
53975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53976     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53977   fi
53978 
53979 
53980   windows_path="$new_path"
53981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53982     unix_path=`$CYGPATH -u "$windows_path"`
53983     new_path="$unix_path"
53984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53986     new_path="$unix_path"
53987   fi
53988 
53989   if test "x$path" != "x$new_path"; then
53990     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53991     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53992 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53993   fi
53994 
53995   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53996   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53997 
53998     else
53999       # We're on a unix platform. Hooray! :)
54000       path="$POTENTIAL_FREETYPE_LIB_PATH"
54001       has_space=`$ECHO "$path" | $GREP " "`
54002       if test "x$has_space" != x; then
54003         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54004 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54005         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54006       fi
54007 
54008       # Use eval to expand a potential ~
54009       eval path="$path"
54010       if test ! -f "$path" && test ! -d "$path"; then
54011         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54012       fi
54013 
54014       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54015     fi
54016   fi
54017 
54018 
54019     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54020     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54021 $as_echo_n "checking for freetype includes... " >&6; }
54022     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54023 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54024     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54025     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54026 $as_echo_n "checking for freetype libraries... " >&6; }
54027     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54028 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54029   fi
54030 
54031           fi
54032 
54033           if test "x$FOUND_FREETYPE" != xyes; then
54034             FREETYPE_BASE_DIR="$SYSROOT/usr"
54035             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54036 
54037   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54038   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
54039   METHOD="well-known location"
54040 
54041   # Let's start with an optimistic view of the world :-)
54042   FOUND_FREETYPE=yes
54043 
54044   # First look for the canonical freetype main include file ft2build.h.
54045   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54046     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54047     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54048     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54049       # Fail.
54050       FOUND_FREETYPE=no
54051     fi
54052   fi
54053 
54054   if test "x$FOUND_FREETYPE" = xyes; then
54055     # Include file found, let's continue the sanity check.
54056     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54057 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54058 
54059     # Reset to default value
54060     FREETYPE_BASE_NAME=freetype
54061     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54062     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54063       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54064           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54065         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54066         # for the .6 version explicitly.
54067         FREETYPE_BASE_NAME=freetype.6
54068         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54069         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54070 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54071       else
54072         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54073 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54074         FOUND_FREETYPE=no
54075       fi
54076     else
54077       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54078         # On Windows, we will need both .lib and .dll file.
54079         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54080           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54081 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54082           FOUND_FREETYPE=no
54083         fi
54084       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54085           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54086         # Found lib in isa dir, use that instead.
54087         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54088         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54089 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54090       fi
54091     fi
54092   fi
54093 
54094   if test "x$FOUND_FREETYPE" = xyes; then
54095 
54096   # Only process if variable expands to non-empty
54097 
54098   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54099     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54100 
54101   # Input might be given as Windows format, start by converting to
54102   # unix format.
54103   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54104   new_path=`$CYGPATH -u "$path"`
54105 
54106   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54107   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54108   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54109   # "foo.exe" is OK but "foo" is an error.
54110   #
54111   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54112   # It is also a way to make sure we got the proper file name for the real test later on.
54113   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54114   if test "x$test_shortpath" = x; then
54115     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54116 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54117     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54118   fi
54119 
54120   # Call helper function which possibly converts this using DOS-style short mode.
54121   # If so, the updated path is stored in $new_path.
54122 
54123   input_path="$new_path"
54124   # Check if we need to convert this using DOS-style short mode. If the path
54125   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54126   # take no chances and rewrite it.
54127   # Note: m4 eats our [], so we need to use [ and ] instead.
54128   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54129   if test "x$has_forbidden_chars" != x; then
54130     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54131     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54132     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54133     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54134       # Going to short mode and back again did indeed matter. Since short mode is
54135       # case insensitive, let's make it lowercase to improve readability.
54136       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54137       # Now convert it back to Unix-style (cygpath)
54138       input_path=`$CYGPATH -u "$shortmode_path"`
54139       new_path="$input_path"
54140     fi
54141   fi
54142 
54143   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54144   if test "x$test_cygdrive_prefix" = x; then
54145     # As a simple fix, exclude /usr/bin since it's not a real path.
54146     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54147       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54148       # a path prefixed by /cygdrive for fixpath to work.
54149       new_path="$CYGWIN_ROOT_PATH$input_path"
54150     fi
54151   fi
54152 
54153 
54154   if test "x$path" != "x$new_path"; then
54155     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54156     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54157 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54158   fi
54159 
54160     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54161 
54162   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54163   has_colon=`$ECHO $path | $GREP ^.:`
54164   new_path="$path"
54165   if test "x$has_colon" = x; then
54166     # Not in mixed or Windows style, start by that.
54167     new_path=`cmd //c echo $path`
54168   fi
54169 
54170 
54171   input_path="$new_path"
54172   # Check if we need to convert this using DOS-style short mode. If the path
54173   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54174   # take no chances and rewrite it.
54175   # Note: m4 eats our [], so we need to use [ and ] instead.
54176   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54177   if test "x$has_forbidden_chars" != x; then
54178     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54179     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54180   fi
54181 
54182 
54183   windows_path="$new_path"
54184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54185     unix_path=`$CYGPATH -u "$windows_path"`
54186     new_path="$unix_path"
54187   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54188     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54189     new_path="$unix_path"
54190   fi
54191 
54192   if test "x$path" != "x$new_path"; then
54193     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54194     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54195 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54196   fi
54197 
54198   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54199   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54200 
54201     else
54202       # We're on a unix platform. Hooray! :)
54203       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54204       has_space=`$ECHO "$path" | $GREP " "`
54205       if test "x$has_space" != x; then
54206         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54207 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54208         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54209       fi
54210 
54211       # Use eval to expand a potential ~
54212       eval path="$path"
54213       if test ! -f "$path" && test ! -d "$path"; then
54214         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54215       fi
54216 
54217       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54218     fi
54219   fi
54220 
54221 
54222   # Only process if variable expands to non-empty
54223 
54224   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54225     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54226 
54227   # Input might be given as Windows format, start by converting to
54228   # unix format.
54229   path="$POTENTIAL_FREETYPE_LIB_PATH"
54230   new_path=`$CYGPATH -u "$path"`
54231 
54232   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54233   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54234   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54235   # "foo.exe" is OK but "foo" is an error.
54236   #
54237   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54238   # It is also a way to make sure we got the proper file name for the real test later on.
54239   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54240   if test "x$test_shortpath" = x; then
54241     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54242 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54243     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54244   fi
54245 
54246   # Call helper function which possibly converts this using DOS-style short mode.
54247   # If so, the updated path is stored in $new_path.
54248 
54249   input_path="$new_path"
54250   # Check if we need to convert this using DOS-style short mode. If the path
54251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54252   # take no chances and rewrite it.
54253   # Note: m4 eats our [], so we need to use [ and ] instead.
54254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54255   if test "x$has_forbidden_chars" != x; then
54256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54257     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54258     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54259     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54260       # Going to short mode and back again did indeed matter. Since short mode is
54261       # case insensitive, let's make it lowercase to improve readability.
54262       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54263       # Now convert it back to Unix-style (cygpath)
54264       input_path=`$CYGPATH -u "$shortmode_path"`
54265       new_path="$input_path"
54266     fi
54267   fi
54268 
54269   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54270   if test "x$test_cygdrive_prefix" = x; then
54271     # As a simple fix, exclude /usr/bin since it's not a real path.
54272     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54273       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54274       # a path prefixed by /cygdrive for fixpath to work.
54275       new_path="$CYGWIN_ROOT_PATH$input_path"
54276     fi
54277   fi
54278 
54279 
54280   if test "x$path" != "x$new_path"; then
54281     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54282     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54283 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54284   fi
54285 
54286     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54287 
54288   path="$POTENTIAL_FREETYPE_LIB_PATH"
54289   has_colon=`$ECHO $path | $GREP ^.:`
54290   new_path="$path"
54291   if test "x$has_colon" = x; then
54292     # Not in mixed or Windows style, start by that.
54293     new_path=`cmd //c echo $path`
54294   fi
54295 
54296 
54297   input_path="$new_path"
54298   # Check if we need to convert this using DOS-style short mode. If the path
54299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54300   # take no chances and rewrite it.
54301   # Note: m4 eats our [], so we need to use [ and ] instead.
54302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54303   if test "x$has_forbidden_chars" != x; then
54304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54305     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54306   fi
54307 
54308 
54309   windows_path="$new_path"
54310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54311     unix_path=`$CYGPATH -u "$windows_path"`
54312     new_path="$unix_path"
54313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54315     new_path="$unix_path"
54316   fi
54317 
54318   if test "x$path" != "x$new_path"; then
54319     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54320     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54321 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54322   fi
54323 
54324   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54325   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54326 
54327     else
54328       # We're on a unix platform. Hooray! :)
54329       path="$POTENTIAL_FREETYPE_LIB_PATH"
54330       has_space=`$ECHO "$path" | $GREP " "`
54331       if test "x$has_space" != x; then
54332         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54333 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54334         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54335       fi
54336 
54337       # Use eval to expand a potential ~
54338       eval path="$path"
54339       if test ! -f "$path" && test ! -d "$path"; then
54340         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54341       fi
54342 
54343       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54344     fi
54345   fi
54346 
54347 
54348     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54349     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54350 $as_echo_n "checking for freetype includes... " >&6; }
54351     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54352 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54353     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54354     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54355 $as_echo_n "checking for freetype libraries... " >&6; }
54356     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54357 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54358   fi
54359 
54360             else
54361 
54362   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54363   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
54364   METHOD="well-known location"
54365 
54366   # Let's start with an optimistic view of the world :-)
54367   FOUND_FREETYPE=yes
54368 
54369   # First look for the canonical freetype main include file ft2build.h.
54370   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54371     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54372     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54373     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54374       # Fail.
54375       FOUND_FREETYPE=no
54376     fi
54377   fi
54378 
54379   if test "x$FOUND_FREETYPE" = xyes; then
54380     # Include file found, let's continue the sanity check.
54381     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54382 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54383 
54384     # Reset to default value
54385     FREETYPE_BASE_NAME=freetype
54386     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54387     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54388       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54389           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54390         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54391         # for the .6 version explicitly.
54392         FREETYPE_BASE_NAME=freetype.6
54393         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54394         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54395 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54396       else
54397         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54398 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54399         FOUND_FREETYPE=no
54400       fi
54401     else
54402       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54403         # On Windows, we will need both .lib and .dll file.
54404         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54405           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54406 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54407           FOUND_FREETYPE=no
54408         fi
54409       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54410           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54411         # Found lib in isa dir, use that instead.
54412         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54413         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54414 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54415       fi
54416     fi
54417   fi
54418 
54419   if test "x$FOUND_FREETYPE" = xyes; then
54420 
54421   # Only process if variable expands to non-empty
54422 
54423   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54424     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54425 
54426   # Input might be given as Windows format, start by converting to
54427   # unix format.
54428   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54429   new_path=`$CYGPATH -u "$path"`
54430 
54431   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54432   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54433   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54434   # "foo.exe" is OK but "foo" is an error.
54435   #
54436   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54437   # It is also a way to make sure we got the proper file name for the real test later on.
54438   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54439   if test "x$test_shortpath" = x; then
54440     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54441 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54442     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54443   fi
54444 
54445   # Call helper function which possibly converts this using DOS-style short mode.
54446   # If so, the updated path is stored in $new_path.
54447 
54448   input_path="$new_path"
54449   # Check if we need to convert this using DOS-style short mode. If the path
54450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54451   # take no chances and rewrite it.
54452   # Note: m4 eats our [], so we need to use [ and ] instead.
54453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54454   if test "x$has_forbidden_chars" != x; then
54455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54456     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54457     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54458     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54459       # Going to short mode and back again did indeed matter. Since short mode is
54460       # case insensitive, let's make it lowercase to improve readability.
54461       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54462       # Now convert it back to Unix-style (cygpath)
54463       input_path=`$CYGPATH -u "$shortmode_path"`
54464       new_path="$input_path"
54465     fi
54466   fi
54467 
54468   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54469   if test "x$test_cygdrive_prefix" = x; then
54470     # As a simple fix, exclude /usr/bin since it's not a real path.
54471     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54472       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54473       # a path prefixed by /cygdrive for fixpath to work.
54474       new_path="$CYGWIN_ROOT_PATH$input_path"
54475     fi
54476   fi
54477 
54478 
54479   if test "x$path" != "x$new_path"; then
54480     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54481     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54482 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54483   fi
54484 
54485     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54486 
54487   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54488   has_colon=`$ECHO $path | $GREP ^.:`
54489   new_path="$path"
54490   if test "x$has_colon" = x; then
54491     # Not in mixed or Windows style, start by that.
54492     new_path=`cmd //c echo $path`
54493   fi
54494 
54495 
54496   input_path="$new_path"
54497   # Check if we need to convert this using DOS-style short mode. If the path
54498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54499   # take no chances and rewrite it.
54500   # Note: m4 eats our [], so we need to use [ and ] instead.
54501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54502   if test "x$has_forbidden_chars" != x; then
54503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54504     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54505   fi
54506 
54507 
54508   windows_path="$new_path"
54509   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54510     unix_path=`$CYGPATH -u "$windows_path"`
54511     new_path="$unix_path"
54512   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54513     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54514     new_path="$unix_path"
54515   fi
54516 
54517   if test "x$path" != "x$new_path"; then
54518     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54519     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54520 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54521   fi
54522 
54523   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54524   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54525 
54526     else
54527       # We're on a unix platform. Hooray! :)
54528       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54529       has_space=`$ECHO "$path" | $GREP " "`
54530       if test "x$has_space" != x; then
54531         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54532 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54533         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54534       fi
54535 
54536       # Use eval to expand a potential ~
54537       eval path="$path"
54538       if test ! -f "$path" && test ! -d "$path"; then
54539         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54540       fi
54541 
54542       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54543     fi
54544   fi
54545 
54546 
54547   # Only process if variable expands to non-empty
54548 
54549   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54550     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54551 
54552   # Input might be given as Windows format, start by converting to
54553   # unix format.
54554   path="$POTENTIAL_FREETYPE_LIB_PATH"
54555   new_path=`$CYGPATH -u "$path"`
54556 
54557   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54558   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54559   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54560   # "foo.exe" is OK but "foo" is an error.
54561   #
54562   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54563   # It is also a way to make sure we got the proper file name for the real test later on.
54564   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54565   if test "x$test_shortpath" = x; then
54566     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54567 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54568     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54569   fi
54570 
54571   # Call helper function which possibly converts this using DOS-style short mode.
54572   # If so, the updated path is stored in $new_path.
54573 
54574   input_path="$new_path"
54575   # Check if we need to convert this using DOS-style short mode. If the path
54576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54577   # take no chances and rewrite it.
54578   # Note: m4 eats our [], so we need to use [ and ] instead.
54579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54580   if test "x$has_forbidden_chars" != x; then
54581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54585       # Going to short mode and back again did indeed matter. Since short mode is
54586       # case insensitive, let's make it lowercase to improve readability.
54587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54588       # Now convert it back to Unix-style (cygpath)
54589       input_path=`$CYGPATH -u "$shortmode_path"`
54590       new_path="$input_path"
54591     fi
54592   fi
54593 
54594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54595   if test "x$test_cygdrive_prefix" = x; then
54596     # As a simple fix, exclude /usr/bin since it's not a real path.
54597     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54599       # a path prefixed by /cygdrive for fixpath to work.
54600       new_path="$CYGWIN_ROOT_PATH$input_path"
54601     fi
54602   fi
54603 
54604 
54605   if test "x$path" != "x$new_path"; then
54606     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54608 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54609   fi
54610 
54611     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54612 
54613   path="$POTENTIAL_FREETYPE_LIB_PATH"
54614   has_colon=`$ECHO $path | $GREP ^.:`
54615   new_path="$path"
54616   if test "x$has_colon" = x; then
54617     # Not in mixed or Windows style, start by that.
54618     new_path=`cmd //c echo $path`
54619   fi
54620 
54621 
54622   input_path="$new_path"
54623   # Check if we need to convert this using DOS-style short mode. If the path
54624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54625   # take no chances and rewrite it.
54626   # Note: m4 eats our [], so we need to use [ and ] instead.
54627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54628   if test "x$has_forbidden_chars" != x; then
54629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54630     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54631   fi
54632 
54633 
54634   windows_path="$new_path"
54635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54636     unix_path=`$CYGPATH -u "$windows_path"`
54637     new_path="$unix_path"
54638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54640     new_path="$unix_path"
54641   fi
54642 
54643   if test "x$path" != "x$new_path"; then
54644     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54646 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54647   fi
54648 
54649   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54650   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54651 
54652     else
54653       # We're on a unix platform. Hooray! :)
54654       path="$POTENTIAL_FREETYPE_LIB_PATH"
54655       has_space=`$ECHO "$path" | $GREP " "`
54656       if test "x$has_space" != x; then
54657         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54658 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54659         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54660       fi
54661 
54662       # Use eval to expand a potential ~
54663       eval path="$path"
54664       if test ! -f "$path" && test ! -d "$path"; then
54665         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54666       fi
54667 
54668       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54669     fi
54670   fi
54671 
54672 
54673     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54674     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54675 $as_echo_n "checking for freetype includes... " >&6; }
54676     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54677 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54678     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54679     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54680 $as_echo_n "checking for freetype libraries... " >&6; }
54681     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54682 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54683   fi
54684 
54685               if test "x$FOUND_FREETYPE" != xyes; then
54686 
54687   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54688   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54689   METHOD="well-known location"
54690 
54691   # Let's start with an optimistic view of the world :-)
54692   FOUND_FREETYPE=yes
54693 
54694   # First look for the canonical freetype main include file ft2build.h.
54695   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54696     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54697     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54698     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54699       # Fail.
54700       FOUND_FREETYPE=no
54701     fi
54702   fi
54703 
54704   if test "x$FOUND_FREETYPE" = xyes; then
54705     # Include file found, let's continue the sanity check.
54706     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54707 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54708 
54709     # Reset to default value
54710     FREETYPE_BASE_NAME=freetype
54711     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54712     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54713       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54714           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54715         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54716         # for the .6 version explicitly.
54717         FREETYPE_BASE_NAME=freetype.6
54718         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54719         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54720 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54721       else
54722         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54723 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54724         FOUND_FREETYPE=no
54725       fi
54726     else
54727       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54728         # On Windows, we will need both .lib and .dll file.
54729         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54730           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54731 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54732           FOUND_FREETYPE=no
54733         fi
54734       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54735           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54736         # Found lib in isa dir, use that instead.
54737         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54738         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54739 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54740       fi
54741     fi
54742   fi
54743 
54744   if test "x$FOUND_FREETYPE" = xyes; then
54745 
54746   # Only process if variable expands to non-empty
54747 
54748   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54749     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54750 
54751   # Input might be given as Windows format, start by converting to
54752   # unix format.
54753   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54754   new_path=`$CYGPATH -u "$path"`
54755 
54756   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54757   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54758   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54759   # "foo.exe" is OK but "foo" is an error.
54760   #
54761   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54762   # It is also a way to make sure we got the proper file name for the real test later on.
54763   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54764   if test "x$test_shortpath" = x; then
54765     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54766 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54767     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54768   fi
54769 
54770   # Call helper function which possibly converts this using DOS-style short mode.
54771   # If so, the updated path is stored in $new_path.
54772 
54773   input_path="$new_path"
54774   # Check if we need to convert this using DOS-style short mode. If the path
54775   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54776   # take no chances and rewrite it.
54777   # Note: m4 eats our [], so we need to use [ and ] instead.
54778   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54779   if test "x$has_forbidden_chars" != x; then
54780     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54781     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54782     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54783     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54784       # Going to short mode and back again did indeed matter. Since short mode is
54785       # case insensitive, let's make it lowercase to improve readability.
54786       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54787       # Now convert it back to Unix-style (cygpath)
54788       input_path=`$CYGPATH -u "$shortmode_path"`
54789       new_path="$input_path"
54790     fi
54791   fi
54792 
54793   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54794   if test "x$test_cygdrive_prefix" = x; then
54795     # As a simple fix, exclude /usr/bin since it's not a real path.
54796     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54797       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54798       # a path prefixed by /cygdrive for fixpath to work.
54799       new_path="$CYGWIN_ROOT_PATH$input_path"
54800     fi
54801   fi
54802 
54803 
54804   if test "x$path" != "x$new_path"; then
54805     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54806     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54807 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54808   fi
54809 
54810     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54811 
54812   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54813   has_colon=`$ECHO $path | $GREP ^.:`
54814   new_path="$path"
54815   if test "x$has_colon" = x; then
54816     # Not in mixed or Windows style, start by that.
54817     new_path=`cmd //c echo $path`
54818   fi
54819 
54820 
54821   input_path="$new_path"
54822   # Check if we need to convert this using DOS-style short mode. If the path
54823   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54824   # take no chances and rewrite it.
54825   # Note: m4 eats our [], so we need to use [ and ] instead.
54826   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54827   if test "x$has_forbidden_chars" != x; then
54828     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54829     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54830   fi
54831 
54832 
54833   windows_path="$new_path"
54834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54835     unix_path=`$CYGPATH -u "$windows_path"`
54836     new_path="$unix_path"
54837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54838     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54839     new_path="$unix_path"
54840   fi
54841 
54842   if test "x$path" != "x$new_path"; then
54843     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54844     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54845 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54846   fi
54847 
54848   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54849   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54850 
54851     else
54852       # We're on a unix platform. Hooray! :)
54853       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54854       has_space=`$ECHO "$path" | $GREP " "`
54855       if test "x$has_space" != x; then
54856         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54857 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54858         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54859       fi
54860 
54861       # Use eval to expand a potential ~
54862       eval path="$path"
54863       if test ! -f "$path" && test ! -d "$path"; then
54864         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54865       fi
54866 
54867       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54868     fi
54869   fi
54870 
54871 
54872   # Only process if variable expands to non-empty
54873 
54874   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54875     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54876 
54877   # Input might be given as Windows format, start by converting to
54878   # unix format.
54879   path="$POTENTIAL_FREETYPE_LIB_PATH"
54880   new_path=`$CYGPATH -u "$path"`
54881 
54882   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54883   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54884   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54885   # "foo.exe" is OK but "foo" is an error.
54886   #
54887   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54888   # It is also a way to make sure we got the proper file name for the real test later on.
54889   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54890   if test "x$test_shortpath" = x; then
54891     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54892 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54893     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54894   fi
54895 
54896   # Call helper function which possibly converts this using DOS-style short mode.
54897   # If so, the updated path is stored in $new_path.
54898 
54899   input_path="$new_path"
54900   # Check if we need to convert this using DOS-style short mode. If the path
54901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54902   # take no chances and rewrite it.
54903   # Note: m4 eats our [], so we need to use [ and ] instead.
54904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54905   if test "x$has_forbidden_chars" != x; then
54906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54907     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54908     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54909     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54910       # Going to short mode and back again did indeed matter. Since short mode is
54911       # case insensitive, let's make it lowercase to improve readability.
54912       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54913       # Now convert it back to Unix-style (cygpath)
54914       input_path=`$CYGPATH -u "$shortmode_path"`
54915       new_path="$input_path"
54916     fi
54917   fi
54918 
54919   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54920   if test "x$test_cygdrive_prefix" = x; then
54921     # As a simple fix, exclude /usr/bin since it's not a real path.
54922     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54923       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54924       # a path prefixed by /cygdrive for fixpath to work.
54925       new_path="$CYGWIN_ROOT_PATH$input_path"
54926     fi
54927   fi
54928 
54929 
54930   if test "x$path" != "x$new_path"; then
54931     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54932     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54933 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54934   fi
54935 
54936     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54937 
54938   path="$POTENTIAL_FREETYPE_LIB_PATH"
54939   has_colon=`$ECHO $path | $GREP ^.:`
54940   new_path="$path"
54941   if test "x$has_colon" = x; then
54942     # Not in mixed or Windows style, start by that.
54943     new_path=`cmd //c echo $path`
54944   fi
54945 
54946 
54947   input_path="$new_path"
54948   # Check if we need to convert this using DOS-style short mode. If the path
54949   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54950   # take no chances and rewrite it.
54951   # Note: m4 eats our [], so we need to use [ and ] instead.
54952   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54953   if test "x$has_forbidden_chars" != x; then
54954     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54955     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54956   fi
54957 
54958 
54959   windows_path="$new_path"
54960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54961     unix_path=`$CYGPATH -u "$windows_path"`
54962     new_path="$unix_path"
54963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54964     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54965     new_path="$unix_path"
54966   fi
54967 
54968   if test "x$path" != "x$new_path"; then
54969     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54970     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54971 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54972   fi
54973 
54974   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54975   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54976 
54977     else
54978       # We're on a unix platform. Hooray! :)
54979       path="$POTENTIAL_FREETYPE_LIB_PATH"
54980       has_space=`$ECHO "$path" | $GREP " "`
54981       if test "x$has_space" != x; then
54982         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54983 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54984         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54985       fi
54986 
54987       # Use eval to expand a potential ~
54988       eval path="$path"
54989       if test ! -f "$path" && test ! -d "$path"; then
54990         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54991       fi
54992 
54993       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54994     fi
54995   fi
54996 
54997 
54998     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54999     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55000 $as_echo_n "checking for freetype includes... " >&6; }
55001     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55002 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55003     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55004     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55005 $as_echo_n "checking for freetype libraries... " >&6; }
55006     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55007 $as_echo "$FREETYPE_LIB_PATH" >&6; }
55008   fi
55009 
55010               fi
55011             fi
55012           fi
55013         fi
55014       fi # end check in well-known locations
55015 
55016       if test "x$FOUND_FREETYPE" != xyes; then
55017 
55018   # Print a helpful message on how to acquire the necessary build dependency.
55019   # freetype is the help tag: freetype, cups, alsa etc
55020   MISSING_DEPENDENCY=freetype
55021 
55022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55023     cygwin_help $MISSING_DEPENDENCY
55024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55025     msys_help $MISSING_DEPENDENCY
55026   else
55027     PKGHANDLER_COMMAND=
55028 
55029     case $PKGHANDLER in
55030       apt-get)
55031         apt_help     $MISSING_DEPENDENCY ;;
55032       yum)
55033         yum_help     $MISSING_DEPENDENCY ;;
55034       port)
55035         port_help    $MISSING_DEPENDENCY ;;
55036       pkgutil)
55037         pkgutil_help $MISSING_DEPENDENCY ;;
55038       pkgadd)
55039         pkgadd_help  $MISSING_DEPENDENCY ;;
55040     esac
55041 
55042     if test "x$PKGHANDLER_COMMAND" != x; then
55043       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55044     fi
55045   fi
55046 
55047         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
55048       fi
55049     fi # end user specified settings
55050 
55051     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
55052     if test "x$FREETYPE_CFLAGS" = x; then
55053 
55054   # Only process if variable expands to non-empty
55055 
55056   if test "x$FREETYPE_INCLUDE_PATH" != x; then
55057     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55058 
55059   # Input might be given as Windows format, start by converting to
55060   # unix format.
55061   path="$FREETYPE_INCLUDE_PATH"
55062   new_path=`$CYGPATH -u "$path"`
55063 
55064   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55065   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55066   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55067   # "foo.exe" is OK but "foo" is an error.
55068   #
55069   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55070   # It is also a way to make sure we got the proper file name for the real test later on.
55071   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55072   if test "x$test_shortpath" = x; then
55073     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55074 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55075     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
55076   fi
55077 
55078   # Call helper function which possibly converts this using DOS-style short mode.
55079   # If so, the updated path is stored in $new_path.
55080 
55081   input_path="$new_path"
55082   # Check if we need to convert this using DOS-style short mode. If the path
55083   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55084   # take no chances and rewrite it.
55085   # Note: m4 eats our [], so we need to use [ and ] instead.
55086   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55087   if test "x$has_forbidden_chars" != x; then
55088     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55089     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55090     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55091     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55092       # Going to short mode and back again did indeed matter. Since short mode is
55093       # case insensitive, let's make it lowercase to improve readability.
55094       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55095       # Now convert it back to Unix-style (cygpath)
55096       input_path=`$CYGPATH -u "$shortmode_path"`
55097       new_path="$input_path"
55098     fi
55099   fi
55100 
55101   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55102   if test "x$test_cygdrive_prefix" = x; then
55103     # As a simple fix, exclude /usr/bin since it's not a real path.
55104     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55105       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55106       # a path prefixed by /cygdrive for fixpath to work.
55107       new_path="$CYGWIN_ROOT_PATH$input_path"
55108     fi
55109   fi
55110 
55111 
55112   if test "x$path" != "x$new_path"; then
55113     FREETYPE_INCLUDE_PATH="$new_path"
55114     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55115 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55116   fi
55117 
55118     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55119 
55120   path="$FREETYPE_INCLUDE_PATH"
55121   has_colon=`$ECHO $path | $GREP ^.:`
55122   new_path="$path"
55123   if test "x$has_colon" = x; then
55124     # Not in mixed or Windows style, start by that.
55125     new_path=`cmd //c echo $path`
55126   fi
55127 
55128 
55129   input_path="$new_path"
55130   # Check if we need to convert this using DOS-style short mode. If the path
55131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55132   # take no chances and rewrite it.
55133   # Note: m4 eats our [], so we need to use [ and ] instead.
55134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55135   if test "x$has_forbidden_chars" != x; then
55136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55137     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55138   fi
55139 
55140 
55141   windows_path="$new_path"
55142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55143     unix_path=`$CYGPATH -u "$windows_path"`
55144     new_path="$unix_path"
55145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55147     new_path="$unix_path"
55148   fi
55149 
55150   if test "x$path" != "x$new_path"; then
55151     FREETYPE_INCLUDE_PATH="$new_path"
55152     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55153 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55154   fi
55155 
55156   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55157   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55158 
55159     else
55160       # We're on a unix platform. Hooray! :)
55161       path="$FREETYPE_INCLUDE_PATH"
55162       has_space=`$ECHO "$path" | $GREP " "`
55163       if test "x$has_space" != x; then
55164         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55165 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55166         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55167       fi
55168 
55169       # Use eval to expand a potential ~
55170       eval path="$path"
55171       if test ! -f "$path" && test ! -d "$path"; then
55172         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55173       fi
55174 
55175       FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55176     fi
55177   fi
55178 
55179       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
55180         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
55181       else
55182         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
55183       fi
55184     fi
55185 
55186     if test "x$FREETYPE_LIBS" = x; then
55187 
55188   # Only process if variable expands to non-empty
55189 
55190   if test "x$FREETYPE_LIB_PATH" != x; then
55191     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55192 
55193   # Input might be given as Windows format, start by converting to
55194   # unix format.
55195   path="$FREETYPE_LIB_PATH"
55196   new_path=`$CYGPATH -u "$path"`
55197 
55198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55201   # "foo.exe" is OK but "foo" is an error.
55202   #
55203   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55204   # It is also a way to make sure we got the proper file name for the real test later on.
55205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55206   if test "x$test_shortpath" = x; then
55207     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55208 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55209     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
55210   fi
55211 
55212   # Call helper function which possibly converts this using DOS-style short mode.
55213   # If so, the updated path is stored in $new_path.
55214 
55215   input_path="$new_path"
55216   # Check if we need to convert this using DOS-style short mode. If the path
55217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55218   # take no chances and rewrite it.
55219   # Note: m4 eats our [], so we need to use [ and ] instead.
55220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55221   if test "x$has_forbidden_chars" != x; then
55222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55223     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55224     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55225     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55226       # Going to short mode and back again did indeed matter. Since short mode is
55227       # case insensitive, let's make it lowercase to improve readability.
55228       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55229       # Now convert it back to Unix-style (cygpath)
55230       input_path=`$CYGPATH -u "$shortmode_path"`
55231       new_path="$input_path"
55232     fi
55233   fi
55234 
55235   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55236   if test "x$test_cygdrive_prefix" = x; then
55237     # As a simple fix, exclude /usr/bin since it's not a real path.
55238     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55239       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55240       # a path prefixed by /cygdrive for fixpath to work.
55241       new_path="$CYGWIN_ROOT_PATH$input_path"
55242     fi
55243   fi
55244 
55245 
55246   if test "x$path" != "x$new_path"; then
55247     FREETYPE_LIB_PATH="$new_path"
55248     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
55249 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55250   fi
55251 
55252     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55253 
55254   path="$FREETYPE_LIB_PATH"
55255   has_colon=`$ECHO $path | $GREP ^.:`
55256   new_path="$path"
55257   if test "x$has_colon" = x; then
55258     # Not in mixed or Windows style, start by that.
55259     new_path=`cmd //c echo $path`
55260   fi
55261 
55262 
55263   input_path="$new_path"
55264   # Check if we need to convert this using DOS-style short mode. If the path
55265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55266   # take no chances and rewrite it.
55267   # Note: m4 eats our [], so we need to use [ and ] instead.
55268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55269   if test "x$has_forbidden_chars" != x; then
55270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55271     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55272   fi
55273 
55274 
55275   windows_path="$new_path"
55276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55277     unix_path=`$CYGPATH -u "$windows_path"`
55278     new_path="$unix_path"
55279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55281     new_path="$unix_path"
55282   fi
55283 
55284   if test "x$path" != "x$new_path"; then
55285     FREETYPE_LIB_PATH="$new_path"
55286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
55287 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55288   fi
55289 
55290   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55291   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55292 
55293     else
55294       # We're on a unix platform. Hooray! :)
55295       path="$FREETYPE_LIB_PATH"
55296       has_space=`$ECHO "$path" | $GREP " "`
55297       if test "x$has_space" != x; then
55298         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55299 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55300         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55301       fi
55302 
55303       # Use eval to expand a potential ~
55304       eval path="$path"
55305       if test ! -f "$path" && test ! -d "$path"; then
55306         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55307       fi
55308 
55309       FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55310     fi
55311   fi
55312 
55313       if test "x$OPENJDK_TARGET_OS" = xwindows; then
55314         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
55315       else
55316         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
55317       fi
55318     fi
55319 
55320     # Try to compile it
55321     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
55322 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
55323     ac_ext=cpp
55324 ac_cpp='$CXXCPP $CPPFLAGS'
55325 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55326 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55327 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55328 
55329     PREV_CXXCFLAGS="$CXXFLAGS"
55330     PREV_LIBS="$LIBS"
55331     PREV_CXX="$CXX"
55332     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
55333     LIBS="$LIBS $FREETYPE_LIBS"
55334     CXX="$FIXPATH $CXX"
55335     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55336 /* end confdefs.h.  */
55337 
55338           #include<ft2build.h>
55339           #include FT_FREETYPE_H
55340           int main () {
55341             FT_Init_FreeType(NULL);
55342             return 0;
55343           }
55344 
55345 _ACEOF
55346 if ac_fn_cxx_try_link "$LINENO"; then :
55347 
55348           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55349 $as_echo "yes" >&6; }
55350 
55351 else
55352 
55353           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55354 $as_echo "no" >&6; }
55355           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
55356 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
55357           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
55358 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
55359 
55360 
55361   # Print a helpful message on how to acquire the necessary build dependency.
55362   # freetype is the help tag: freetype, cups, alsa etc
55363   MISSING_DEPENDENCY=freetype
55364 
55365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55366     cygwin_help $MISSING_DEPENDENCY
55367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55368     msys_help $MISSING_DEPENDENCY
55369   else
55370     PKGHANDLER_COMMAND=
55371 
55372     case $PKGHANDLER in
55373       apt-get)
55374         apt_help     $MISSING_DEPENDENCY ;;
55375       yum)
55376         yum_help     $MISSING_DEPENDENCY ;;
55377       port)
55378         port_help    $MISSING_DEPENDENCY ;;
55379       pkgutil)
55380         pkgutil_help $MISSING_DEPENDENCY ;;
55381       pkgadd)
55382         pkgadd_help  $MISSING_DEPENDENCY ;;
55383     esac
55384 
55385     if test "x$PKGHANDLER_COMMAND" != x; then
55386       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55387     fi
55388   fi
55389 
55390 
55391           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
55392 
55393 
55394 fi
55395 rm -f core conftest.err conftest.$ac_objext \
55396     conftest$ac_exeext conftest.$ac_ext
55397     CXXCFLAGS="$PREV_CXXFLAGS"
55398     LIBS="$PREV_LIBS"
55399     CXX="$PREV_CXX"
55400     ac_ext=cpp
55401 ac_cpp='$CXXCPP $CPPFLAGS'
55402 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55403 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55404 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55405 
55406 
55407     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
55408 $as_echo_n "checking if we should bundle freetype... " >&6; }
55409     if test "x$BUNDLE_FREETYPE" = xyes; then
55410       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
55411     fi
55412     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
55413 $as_echo "$BUNDLE_FREETYPE" >&6; }
55414 
55415   fi # end freetype needed
55416 
55417 
55418 
55419 
55420 
55421 
55422 
55423 # Check whether --with-alsa was given.
55424 if test "${with_alsa+set}" = set; then :
55425   withval=$with_alsa;
55426 fi
55427 
55428 
55429 # Check whether --with-alsa-include was given.
55430 if test "${with_alsa_include+set}" = set; then :
55431   withval=$with_alsa_include;
55432 fi
55433 
55434 
55435 # Check whether --with-alsa-lib was given.
55436 if test "${with_alsa_lib+set}" = set; then :
55437   withval=$with_alsa_lib;
55438 fi
55439 
55440 
55441   if test "x$NEEDS_LIB_ALSA" = xfalse; then
55442     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
55443         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
55444         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
55445       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
55446 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
55447     fi
55448     ALSA_CFLAGS=
55449     ALSA_LIBS=
55450   else
55451     ALSA_FOUND=no
55452 
55453     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
55454       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
55455     fi
55456 
55457     if test "x${with_alsa}" != x; then
55458       ALSA_LIBS="-L${with_alsa}/lib -lasound"
55459       ALSA_CFLAGS="-I${with_alsa}/include"
55460       ALSA_FOUND=yes
55461     fi
55462     if test "x${with_alsa_include}" != x; then
55463       ALSA_CFLAGS="-I${with_alsa_include}"
55464       ALSA_FOUND=yes
55465     fi
55466     if test "x${with_alsa_lib}" != x; then
55467       ALSA_LIBS="-L${with_alsa_lib} -lasound"
55468       ALSA_FOUND=yes
55469     fi
55470     # Do not try pkg-config if we have a sysroot set.
55471     if test "x$SYSROOT" = x; then
55472       if test "x$ALSA_FOUND" = xno; then
55473 
55474 pkg_failed=no
55475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
55476 $as_echo_n "checking for ALSA... " >&6; }
55477 
55478 if test -n "$ALSA_CFLAGS"; then
55479     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
55480  elif test -n "$PKG_CONFIG"; then
55481     if test -n "$PKG_CONFIG" && \
55482     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55483   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55484   ac_status=$?
55485   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55486   test $ac_status = 0; }; then
55487   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
55488 else
55489   pkg_failed=yes
55490 fi
55491  else
55492     pkg_failed=untried
55493 fi
55494 if test -n "$ALSA_LIBS"; then
55495     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
55496  elif test -n "$PKG_CONFIG"; then
55497     if test -n "$PKG_CONFIG" && \
55498     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55499   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55500   ac_status=$?
55501   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55502   test $ac_status = 0; }; then
55503   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
55504 else
55505   pkg_failed=yes
55506 fi
55507  else
55508     pkg_failed=untried
55509 fi
55510 
55511 
55512 
55513 if test $pkg_failed = yes; then
55514 
55515 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55516         _pkg_short_errors_supported=yes
55517 else
55518         _pkg_short_errors_supported=no
55519 fi
55520         if test $_pkg_short_errors_supported = yes; then
55521                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
55522         else
55523                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
55524         fi
55525         # Put the nasty error message in config.log where it belongs
55526         echo "$ALSA_PKG_ERRORS" >&5
55527 
55528         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55529 $as_echo "no" >&6; }
55530                 ALSA_FOUND=no
55531 elif test $pkg_failed = untried; then
55532         ALSA_FOUND=no
55533 else
55534         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
55535         ALSA_LIBS=$pkg_cv_ALSA_LIBS
55536         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55537 $as_echo "yes" >&6; }
55538         ALSA_FOUND=yes
55539 fi
55540       fi
55541     fi
55542     if test "x$ALSA_FOUND" = xno; then
55543       for ac_header in alsa/asoundlib.h
55544 do :
55545   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
55546 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
55547   cat >>confdefs.h <<_ACEOF
55548 #define HAVE_ALSA_ASOUNDLIB_H 1
55549 _ACEOF
55550 
55551             ALSA_FOUND=yes
55552             ALSA_CFLAGS=-Iignoreme
55553             ALSA_LIBS=-lasound
55554             DEFAULT_ALSA=yes
55555 
55556 else
55557   ALSA_FOUND=no
55558 
55559 fi
55560 
55561 done
55562 
55563     fi
55564     if test "x$ALSA_FOUND" = xno; then
55565 
55566   # Print a helpful message on how to acquire the necessary build dependency.
55567   # alsa is the help tag: freetype, cups, alsa etc
55568   MISSING_DEPENDENCY=alsa
55569 
55570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55571     cygwin_help $MISSING_DEPENDENCY
55572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55573     msys_help $MISSING_DEPENDENCY
55574   else
55575     PKGHANDLER_COMMAND=
55576 
55577     case $PKGHANDLER in
55578       apt-get)
55579         apt_help     $MISSING_DEPENDENCY ;;
55580       yum)
55581         yum_help     $MISSING_DEPENDENCY ;;
55582       port)
55583         port_help    $MISSING_DEPENDENCY ;;
55584       pkgutil)
55585         pkgutil_help $MISSING_DEPENDENCY ;;
55586       pkgadd)
55587         pkgadd_help  $MISSING_DEPENDENCY ;;
55588     esac
55589 
55590     if test "x$PKGHANDLER_COMMAND" != x; then
55591       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55592     fi
55593   fi
55594 
55595       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
55596     fi
55597   fi
55598 
55599 
55600 
55601 
55602 
55603 
55604 # Check whether --with-libffi was given.
55605 if test "${with_libffi+set}" = set; then :
55606   withval=$with_libffi;
55607 fi
55608 
55609 
55610 # Check whether --with-libffi-include was given.
55611 if test "${with_libffi_include+set}" = set; then :
55612   withval=$with_libffi_include;
55613 fi
55614 
55615 
55616 # Check whether --with-libffi-lib was given.
55617 if test "${with_libffi_lib+set}" = set; then :
55618   withval=$with_libffi_lib;
55619 fi
55620 
55621 
55622   if test "x$NEEDS_LIB_FFI" = xfalse; then
55623     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
55624         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
55625         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
55626       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
55627 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
55628     fi
55629     LIBFFI_CFLAGS=
55630     LIBFFI_LIBS=
55631   else
55632     LIBFFI_FOUND=no
55633 
55634     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
55635       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
55636     fi
55637 
55638     if test "x${with_libffi}" != x; then
55639       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
55640       LIBFFI_CFLAGS="-I${with_libffi}/include"
55641       LIBFFI_FOUND=yes
55642     fi
55643     if test "x${with_libffi_include}" != x; then
55644       LIBFFI_CFLAGS="-I${with_libffi_include}"
55645       LIBFFI_FOUND=yes
55646     fi
55647     if test "x${with_libffi_lib}" != x; then
55648       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
55649       LIBFFI_FOUND=yes
55650     fi
55651     # Do not try pkg-config if we have a sysroot set.
55652     if test "x$SYSROOT" = x; then
55653       if test "x$LIBFFI_FOUND" = xno; then
55654         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
55655 
55656 pkg_failed=no
55657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
55658 $as_echo_n "checking for LIBFFI... " >&6; }
55659 
55660 if test -n "$LIBFFI_CFLAGS"; then
55661     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
55662  elif test -n "$PKG_CONFIG"; then
55663     if test -n "$PKG_CONFIG" && \
55664     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55665   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55666   ac_status=$?
55667   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55668   test $ac_status = 0; }; then
55669   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
55670 else
55671   pkg_failed=yes
55672 fi
55673  else
55674     pkg_failed=untried
55675 fi
55676 if test -n "$LIBFFI_LIBS"; then
55677     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
55678  elif test -n "$PKG_CONFIG"; then
55679     if test -n "$PKG_CONFIG" && \
55680     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55681   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55682   ac_status=$?
55683   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55684   test $ac_status = 0; }; then
55685   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
55686 else
55687   pkg_failed=yes
55688 fi
55689  else
55690     pkg_failed=untried
55691 fi
55692 
55693 
55694 
55695 if test $pkg_failed = yes; then
55696 
55697 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55698         _pkg_short_errors_supported=yes
55699 else
55700         _pkg_short_errors_supported=no
55701 fi
55702         if test $_pkg_short_errors_supported = yes; then
55703                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
55704         else
55705                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
55706         fi
55707         # Put the nasty error message in config.log where it belongs
55708         echo "$LIBFFI_PKG_ERRORS" >&5
55709 
55710         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55711 $as_echo "no" >&6; }
55712                 LIBFFI_FOUND=no
55713 elif test $pkg_failed = untried; then
55714         LIBFFI_FOUND=no
55715 else
55716         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
55717         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
55718         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55719 $as_echo "yes" >&6; }
55720         LIBFFI_FOUND=yes
55721 fi
55722       fi
55723     fi
55724     if test "x$LIBFFI_FOUND" = xno; then
55725       for ac_header in ffi.h
55726 do :
55727   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
55728 if test "x$ac_cv_header_ffi_h" = xyes; then :
55729   cat >>confdefs.h <<_ACEOF
55730 #define HAVE_FFI_H 1
55731 _ACEOF
55732 
55733             LIBFFI_FOUND=yes
55734             LIBFFI_CFLAGS=
55735             LIBFFI_LIBS=-lffi
55736 
55737 else
55738   LIBFFI_FOUND=no
55739 
55740 fi
55741 
55742 done
55743 
55744     fi
55745     if test "x$LIBFFI_FOUND" = xno; then
55746 
55747   # Print a helpful message on how to acquire the necessary build dependency.
55748   # ffi is the help tag: freetype, cups, alsa etc
55749   MISSING_DEPENDENCY=ffi
55750 
55751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55752     cygwin_help $MISSING_DEPENDENCY
55753   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55754     msys_help $MISSING_DEPENDENCY
55755   else
55756     PKGHANDLER_COMMAND=
55757 
55758     case $PKGHANDLER in
55759       apt-get)
55760         apt_help     $MISSING_DEPENDENCY ;;
55761       yum)
55762         yum_help     $MISSING_DEPENDENCY ;;
55763       port)
55764         port_help    $MISSING_DEPENDENCY ;;
55765       pkgutil)
55766         pkgutil_help $MISSING_DEPENDENCY ;;
55767       pkgadd)
55768         pkgadd_help  $MISSING_DEPENDENCY ;;
55769     esac
55770 
55771     if test "x$PKGHANDLER_COMMAND" != x; then
55772       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55773     fi
55774   fi
55775 
55776       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
55777     fi
55778 
55779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
55780 $as_echo_n "checking if libffi works... " >&6; }
55781     ac_ext=c
55782 ac_cpp='$CPP $CPPFLAGS'
55783 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55784 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55785 ac_compiler_gnu=$ac_cv_c_compiler_gnu
55786 
55787     OLD_CFLAGS="$CFLAGS"
55788     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
55789     OLD_LIBS="$LIBS"
55790     LIBS="$LIBS $LIBFFI_LIBS"
55791     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55792 /* end confdefs.h.  */
55793 #include <ffi.h>
55794 int
55795 main ()
55796 {
55797 
55798           ffi_call(NULL, NULL, NULL, NULL);
55799           return 0;
55800 
55801   ;
55802   return 0;
55803 }
55804 _ACEOF
55805 if ac_fn_c_try_link "$LINENO"; then :
55806   LIBFFI_WORKS=yes
55807 else
55808   LIBFFI_WORKS=no
55809 
55810 fi
55811 rm -f core conftest.err conftest.$ac_objext \
55812     conftest$ac_exeext conftest.$ac_ext
55813     CFLAGS="$OLD_CFLAGS"
55814     LIBS="$OLD_LIBS"
55815     ac_ext=cpp
55816 ac_cpp='$CXXCPP $CPPFLAGS'
55817 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55818 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55819 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55820 
55821     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
55822 $as_echo "$LIBFFI_WORKS" >&6; }
55823 
55824     if test "x$LIBFFI_WORKS" = xno; then
55825 
55826   # Print a helpful message on how to acquire the necessary build dependency.
55827   # ffi is the help tag: freetype, cups, alsa etc
55828   MISSING_DEPENDENCY=ffi
55829 
55830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55831     cygwin_help $MISSING_DEPENDENCY
55832   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55833     msys_help $MISSING_DEPENDENCY
55834   else
55835     PKGHANDLER_COMMAND=
55836 
55837     case $PKGHANDLER in
55838       apt-get)
55839         apt_help     $MISSING_DEPENDENCY ;;
55840       yum)
55841         yum_help     $MISSING_DEPENDENCY ;;
55842       port)
55843         port_help    $MISSING_DEPENDENCY ;;
55844       pkgutil)
55845         pkgutil_help $MISSING_DEPENDENCY ;;
55846       pkgadd)
55847         pkgadd_help  $MISSING_DEPENDENCY ;;
55848     esac
55849 
55850     if test "x$PKGHANDLER_COMMAND" != x; then
55851       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55852     fi
55853   fi
55854 
55855       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
55856     fi
55857   fi
55858 
55859 
55860 
55861 
55862 
55863   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
55864     # Extract the first word of "llvm-config", so it can be a program name with args.
55865 set dummy llvm-config; ac_word=$2
55866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55867 $as_echo_n "checking for $ac_word... " >&6; }
55868 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
55869   $as_echo_n "(cached) " >&6
55870 else
55871   if test -n "$LLVM_CONFIG"; then
55872   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
55873 else
55874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55875 for as_dir in $PATH
55876 do
55877   IFS=$as_save_IFS
55878   test -z "$as_dir" && as_dir=.
55879     for ac_exec_ext in '' $ac_executable_extensions; do
55880   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55881     ac_cv_prog_LLVM_CONFIG="llvm-config"
55882     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55883     break 2
55884   fi
55885 done
55886   done
55887 IFS=$as_save_IFS
55888 
55889 fi
55890 fi
55891 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
55892 if test -n "$LLVM_CONFIG"; then
55893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
55894 $as_echo "$LLVM_CONFIG" >&6; }
55895 else
55896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55897 $as_echo "no" >&6; }
55898 fi
55899 
55900 
55901 
55902     if test "x$LLVM_CONFIG" != xllvm-config; then
55903       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
55904     fi
55905 
55906     llvm_components="jit mcjit engine nativecodegen native"
55907     unset LLVM_CFLAGS
55908     for flag in $("$LLVM_CONFIG" --cxxflags); do
55909       if echo "${flag}" | grep -q '^-[ID]'; then
55910         if test "${flag}" != "-D_DEBUG" ; then
55911           if test "${LLVM_CFLAGS}" != "" ; then
55912             LLVM_CFLAGS="${LLVM_CFLAGS} "
55913           fi
55914           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
55915         fi
55916       fi
55917     done
55918     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
55919     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
55920 
55921     unset LLVM_LDFLAGS
55922     for flag in $("${LLVM_CONFIG}" --ldflags); do
55923       if echo "${flag}" | grep -q '^-L'; then
55924         if test "${LLVM_LDFLAGS}" != ""; then
55925           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
55926         fi
55927         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
55928       fi
55929     done
55930 
55931     unset LLVM_LIBS
55932     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
55933       if echo "${flag}" | grep -q '^-l'; then
55934         if test "${LLVM_LIBS}" != ""; then
55935           LLVM_LIBS="${LLVM_LIBS} "
55936         fi
55937         LLVM_LIBS="${LLVM_LIBS}${flag}"
55938       fi
55939     done
55940 
55941 
55942 
55943 
55944   fi
55945 
55946 
55947 
55948 # Check whether --with-libjpeg was given.
55949 if test "${with_libjpeg+set}" = set; then :
55950   withval=$with_libjpeg;
55951 fi
55952 
55953 
55954   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
55955 $as_echo_n "checking for which libjpeg to use... " >&6; }
55956   # default is bundled
55957   DEFAULT_LIBJPEG=bundled
55958   # if user didn't specify, use DEFAULT_LIBJPEG
55959   if test "x${with_libjpeg}" = "x"; then
55960     with_libjpeg=${DEFAULT_LIBJPEG}
55961   fi
55962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
55963 $as_echo "${with_libjpeg}" >&6; }
55964 
55965   if test "x${with_libjpeg}" = "xbundled"; then
55966     USE_EXTERNAL_LIBJPEG=false
55967   elif test "x${with_libjpeg}" = "xsystem"; then
55968     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
55969 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
55970 
55971 else
55972    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
55973 fi
55974 
55975 
55976     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
55977 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
55978 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
55979   $as_echo_n "(cached) " >&6
55980 else
55981   ac_check_lib_save_LIBS=$LIBS
55982 LIBS="-ljpeg  $LIBS"
55983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55984 /* end confdefs.h.  */
55985 
55986 /* Override any GCC internal prototype to avoid an error.
55987    Use char because int might match the return type of a GCC
55988    builtin and then its argument prototype would still apply.  */
55989 #ifdef __cplusplus
55990 extern "C"
55991 #endif
55992 char jpeg_CreateDecompress ();
55993 int
55994 main ()
55995 {
55996 return jpeg_CreateDecompress ();
55997   ;
55998   return 0;
55999 }
56000 _ACEOF
56001 if ac_fn_cxx_try_link "$LINENO"; then :
56002   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
56003 else
56004   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
56005 fi
56006 rm -f core conftest.err conftest.$ac_objext \
56007     conftest$ac_exeext conftest.$ac_ext
56008 LIBS=$ac_check_lib_save_LIBS
56009 fi
56010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
56011 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
56012 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
56013   cat >>confdefs.h <<_ACEOF
56014 #define HAVE_LIBJPEG 1
56015 _ACEOF
56016 
56017   LIBS="-ljpeg $LIBS"
56018 
56019 else
56020    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
56021 fi
56022 
56023 
56024     USE_EXTERNAL_LIBJPEG=true
56025   else
56026     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
56027   fi
56028 
56029 
56030 
56031 
56032 
56033 # Check whether --with-giflib was given.
56034 if test "${with_giflib+set}" = set; then :
56035   withval=$with_giflib;
56036 fi
56037 
56038 
56039   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
56040 $as_echo_n "checking for which giflib to use... " >&6; }
56041   # default is bundled
56042   DEFAULT_GIFLIB=bundled
56043   # if user didn't specify, use DEFAULT_GIFLIB
56044   if test "x${with_giflib}" = "x"; then
56045     with_giflib=${DEFAULT_GIFLIB}
56046   fi
56047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
56048 $as_echo "${with_giflib}" >&6; }
56049 
56050   if test "x${with_giflib}" = "xbundled"; then
56051     USE_EXTERNAL_LIBGIF=false
56052   elif test "x${with_giflib}" = "xsystem"; then
56053     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
56054 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
56055 
56056 else
56057    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
56058 fi
56059 
56060 
56061     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
56062 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
56063 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
56064   $as_echo_n "(cached) " >&6
56065 else
56066   ac_check_lib_save_LIBS=$LIBS
56067 LIBS="-lgif  $LIBS"
56068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56069 /* end confdefs.h.  */
56070 
56071 /* Override any GCC internal prototype to avoid an error.
56072    Use char because int might match the return type of a GCC
56073    builtin and then its argument prototype would still apply.  */
56074 #ifdef __cplusplus
56075 extern "C"
56076 #endif
56077 char DGifGetCode ();
56078 int
56079 main ()
56080 {
56081 return DGifGetCode ();
56082   ;
56083   return 0;
56084 }
56085 _ACEOF
56086 if ac_fn_cxx_try_link "$LINENO"; then :
56087   ac_cv_lib_gif_DGifGetCode=yes
56088 else
56089   ac_cv_lib_gif_DGifGetCode=no
56090 fi
56091 rm -f core conftest.err conftest.$ac_objext \
56092     conftest$ac_exeext conftest.$ac_ext
56093 LIBS=$ac_check_lib_save_LIBS
56094 fi
56095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
56096 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
56097 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
56098   cat >>confdefs.h <<_ACEOF
56099 #define HAVE_LIBGIF 1
56100 _ACEOF
56101 
56102   LIBS="-lgif $LIBS"
56103 
56104 else
56105    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
56106 fi
56107 
56108 
56109     USE_EXTERNAL_LIBGIF=true
56110   else
56111     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
56112   fi
56113 
56114 
56115 
56116 
56117 
56118 # Check whether --with-libpng was given.
56119 if test "${with_libpng+set}" = set; then :
56120   withval=$with_libpng;
56121 fi
56122 
56123 
56124   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
56125 $as_echo_n "checking for which libpng to use... " >&6; }
56126 
56127   # default is bundled
56128   DEFAULT_LIBPNG=bundled
56129   # if user didn't specify, use DEFAULT_LIBPNG
56130   if test "x${with_libpng}" = "x"; then
56131       with_libpng=${DEFAULT_LIBPNG}
56132   fi
56133 
56134   if test "x${with_libpng}" = "xbundled"; then
56135       USE_EXTERNAL_LIBPNG=false
56136       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56137 $as_echo "bundled" >&6; }
56138   elif test "x${with_libpng}" = "xsystem"; then
56139 
56140 pkg_failed=no
56141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
56142 $as_echo_n "checking for PNG... " >&6; }
56143 
56144 if test -n "$PNG_CFLAGS"; then
56145     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
56146  elif test -n "$PKG_CONFIG"; then
56147     if test -n "$PKG_CONFIG" && \
56148     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
56149   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
56150   ac_status=$?
56151   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56152   test $ac_status = 0; }; then
56153   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
56154 else
56155   pkg_failed=yes
56156 fi
56157  else
56158     pkg_failed=untried
56159 fi
56160 if test -n "$PNG_LIBS"; then
56161     pkg_cv_PNG_LIBS="$PNG_LIBS"
56162  elif test -n "$PKG_CONFIG"; then
56163     if test -n "$PKG_CONFIG" && \
56164     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
56165   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
56166   ac_status=$?
56167   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56168   test $ac_status = 0; }; then
56169   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
56170 else
56171   pkg_failed=yes
56172 fi
56173  else
56174     pkg_failed=untried
56175 fi
56176 
56177 
56178 
56179 if test $pkg_failed = yes; then
56180 
56181 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56182         _pkg_short_errors_supported=yes
56183 else
56184         _pkg_short_errors_supported=no
56185 fi
56186         if test $_pkg_short_errors_supported = yes; then
56187                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
56188         else
56189                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
56190         fi
56191         # Put the nasty error message in config.log where it belongs
56192         echo "$PNG_PKG_ERRORS" >&5
56193 
56194         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56195 $as_echo "no" >&6; }
56196                  LIBPNG_FOUND=no
56197 elif test $pkg_failed = untried; then
56198          LIBPNG_FOUND=no
56199 else
56200         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
56201         PNG_LIBS=$pkg_cv_PNG_LIBS
56202         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56203 $as_echo "yes" >&6; }
56204          LIBPNG_FOUND=yes
56205 fi
56206       if test "x${LIBPNG_FOUND}" = "xyes"; then
56207           USE_EXTERNAL_LIBPNG=true
56208           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56209 $as_echo "system" >&6; }
56210       else
56211           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
56212 $as_echo "system not found" >&6; }
56213           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
56214       fi
56215   else
56216       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
56217   fi
56218 
56219 
56220 
56221 
56222 
56223 # Check whether --with-zlib was given.
56224 if test "${with_zlib+set}" = set; then :
56225   withval=$with_zlib;
56226 fi
56227 
56228 
56229   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
56230 $as_echo_n "checking for compress in -lz... " >&6; }
56231 if ${ac_cv_lib_z_compress+:} false; then :
56232   $as_echo_n "(cached) " >&6
56233 else
56234   ac_check_lib_save_LIBS=$LIBS
56235 LIBS="-lz  $LIBS"
56236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56237 /* end confdefs.h.  */
56238 
56239 /* Override any GCC internal prototype to avoid an error.
56240    Use char because int might match the return type of a GCC
56241    builtin and then its argument prototype would still apply.  */
56242 #ifdef __cplusplus
56243 extern "C"
56244 #endif
56245 char compress ();
56246 int
56247 main ()
56248 {
56249 return compress ();
56250   ;
56251   return 0;
56252 }
56253 _ACEOF
56254 if ac_fn_cxx_try_link "$LINENO"; then :
56255   ac_cv_lib_z_compress=yes
56256 else
56257   ac_cv_lib_z_compress=no
56258 fi
56259 rm -f core conftest.err conftest.$ac_objext \
56260     conftest$ac_exeext conftest.$ac_ext
56261 LIBS=$ac_check_lib_save_LIBS
56262 fi
56263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
56264 $as_echo "$ac_cv_lib_z_compress" >&6; }
56265 if test "x$ac_cv_lib_z_compress" = xyes; then :
56266    ZLIB_FOUND=yes
56267 else
56268    ZLIB_FOUND=no
56269 fi
56270 
56271 
56272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
56273 $as_echo_n "checking for which zlib to use... " >&6; }
56274 
56275   DEFAULT_ZLIB=bundled
56276   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
56277     # On macosx default is system...on others default is bundled
56278     DEFAULT_ZLIB=system
56279   fi
56280 
56281   if test "x${ZLIB_FOUND}" != "xyes"; then
56282     # If we don't find any system...set default to bundled
56283     DEFAULT_ZLIB=bundled
56284   fi
56285 
56286   # If user didn't specify, use DEFAULT_ZLIB
56287   if test "x${with_zlib}" = "x"; then
56288     with_zlib=${DEFAULT_ZLIB}
56289   fi
56290 
56291   if test "x${with_zlib}" = "xbundled"; then
56292     USE_EXTERNAL_LIBZ=false
56293     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56294 $as_echo "bundled" >&6; }
56295   elif test "x${with_zlib}" = "xsystem"; then
56296     if test "x${ZLIB_FOUND}" = "xyes"; then
56297       USE_EXTERNAL_LIBZ=true
56298       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56299 $as_echo "system" >&6; }
56300     else
56301       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
56302 $as_echo "system not found" >&6; }
56303       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
56304     fi
56305   else
56306     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
56307   fi
56308 
56309 
56310 
56311 
56312 
56313 # Check whether --with-lcms was given.
56314 if test "${with_lcms+set}" = set; then :
56315   withval=$with_lcms;
56316 fi
56317 
56318 
56319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
56320 $as_echo_n "checking for which lcms to use... " >&6; }
56321 
56322   DEFAULT_LCMS=bundled
56323   # If user didn't specify, use DEFAULT_LCMS
56324   if test "x${with_lcms}" = "x"; then
56325       with_lcms=${DEFAULT_LCMS}
56326   fi
56327 
56328   if test "x${with_lcms}" = "xbundled"; then
56329     USE_EXTERNAL_LCMS=false
56330     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56331 $as_echo "bundled" >&6; }
56332   elif test "x${with_lcms}" = "xsystem"; then
56333     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56334 $as_echo "system" >&6; }
56335 
56336 pkg_failed=no
56337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
56338 $as_echo_n "checking for LCMS... " >&6; }
56339 
56340 if test -n "$LCMS_CFLAGS"; then
56341     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
56342  elif test -n "$PKG_CONFIG"; then
56343     if test -n "$PKG_CONFIG" && \
56344     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
56345   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
56346   ac_status=$?
56347   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56348   test $ac_status = 0; }; then
56349   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
56350 else
56351   pkg_failed=yes
56352 fi
56353  else
56354     pkg_failed=untried
56355 fi
56356 if test -n "$LCMS_LIBS"; then
56357     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
56358  elif test -n "$PKG_CONFIG"; then
56359     if test -n "$PKG_CONFIG" && \
56360     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
56361   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
56362   ac_status=$?
56363   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56364   test $ac_status = 0; }; then
56365   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
56366 else
56367   pkg_failed=yes
56368 fi
56369  else
56370     pkg_failed=untried
56371 fi
56372 
56373 
56374 
56375 if test $pkg_failed = yes; then
56376 
56377 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56378         _pkg_short_errors_supported=yes
56379 else
56380         _pkg_short_errors_supported=no
56381 fi
56382         if test $_pkg_short_errors_supported = yes; then
56383                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
56384         else
56385                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
56386         fi
56387         # Put the nasty error message in config.log where it belongs
56388         echo "$LCMS_PKG_ERRORS" >&5
56389 
56390         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56391 $as_echo "no" >&6; }
56392                 LCMS_FOUND=no
56393 elif test $pkg_failed = untried; then
56394         LCMS_FOUND=no
56395 else
56396         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
56397         LCMS_LIBS=$pkg_cv_LCMS_LIBS
56398         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56399 $as_echo "yes" >&6; }
56400         LCMS_FOUND=yes
56401 fi
56402     if test "x${LCMS_FOUND}" = "xyes"; then
56403       USE_EXTERNAL_LCMS=true
56404     else
56405       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
56406     fi
56407   else
56408     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
56409   fi
56410 
56411 
56412 
56413 
56414 
56415 
56416 
56417 
56418 
56419 
56420 
56421   # Setup libm (the maths library)
56422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
56423 $as_echo_n "checking for cos in -lm... " >&6; }
56424 if ${ac_cv_lib_m_cos+:} false; then :
56425   $as_echo_n "(cached) " >&6
56426 else
56427   ac_check_lib_save_LIBS=$LIBS
56428 LIBS="-lm  $LIBS"
56429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56430 /* end confdefs.h.  */
56431 
56432 /* Override any GCC internal prototype to avoid an error.
56433    Use char because int might match the return type of a GCC
56434    builtin and then its argument prototype would still apply.  */
56435 #ifdef __cplusplus
56436 extern "C"
56437 #endif
56438 char cos ();
56439 int
56440 main ()
56441 {
56442 return cos ();
56443   ;
56444   return 0;
56445 }
56446 _ACEOF
56447 if ac_fn_cxx_try_link "$LINENO"; then :
56448   ac_cv_lib_m_cos=yes
56449 else
56450   ac_cv_lib_m_cos=no
56451 fi
56452 rm -f core conftest.err conftest.$ac_objext \
56453     conftest$ac_exeext conftest.$ac_ext
56454 LIBS=$ac_check_lib_save_LIBS
56455 fi
56456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
56457 $as_echo "$ac_cv_lib_m_cos" >&6; }
56458 if test "x$ac_cv_lib_m_cos" = xyes; then :
56459   cat >>confdefs.h <<_ACEOF
56460 #define HAVE_LIBM 1
56461 _ACEOF
56462 
56463   LIBS="-lm $LIBS"
56464 
56465 else
56466 
56467       { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
56468 $as_echo "$as_me: Maths library was not found" >&6;}
56469 
56470 fi
56471 
56472   LIBM=-lm
56473 
56474 
56475   # Setup libdl (for dynamic library loading)
56476   save_LIBS="$LIBS"
56477   LIBS=""
56478   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
56479 $as_echo_n "checking for dlopen in -ldl... " >&6; }
56480 if ${ac_cv_lib_dl_dlopen+:} false; then :
56481   $as_echo_n "(cached) " >&6
56482 else
56483   ac_check_lib_save_LIBS=$LIBS
56484 LIBS="-ldl  $LIBS"
56485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56486 /* end confdefs.h.  */
56487 
56488 /* Override any GCC internal prototype to avoid an error.
56489    Use char because int might match the return type of a GCC
56490    builtin and then its argument prototype would still apply.  */
56491 #ifdef __cplusplus
56492 extern "C"
56493 #endif
56494 char dlopen ();
56495 int
56496 main ()
56497 {
56498 return dlopen ();
56499   ;
56500   return 0;
56501 }
56502 _ACEOF
56503 if ac_fn_cxx_try_link "$LINENO"; then :
56504   ac_cv_lib_dl_dlopen=yes
56505 else
56506   ac_cv_lib_dl_dlopen=no
56507 fi
56508 rm -f core conftest.err conftest.$ac_objext \
56509     conftest$ac_exeext conftest.$ac_ext
56510 LIBS=$ac_check_lib_save_LIBS
56511 fi
56512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
56513 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
56514 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
56515   cat >>confdefs.h <<_ACEOF
56516 #define HAVE_LIBDL 1
56517 _ACEOF
56518 
56519   LIBS="-ldl $LIBS"
56520 
56521 fi
56522 
56523   LIBDL="$LIBS"
56524 
56525   LIBS="$save_LIBS"
56526 
56527   # Deprecated libraries, keep the flags for backwards compatibility
56528   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56529 
56530 
56531 # Check whether --with-dxsdk was given.
56532 if test "${with_dxsdk+set}" = set; then :
56533   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
56534 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
56535 fi
56536 
56537 
56538 
56539 
56540 # Check whether --with-dxsdk-lib was given.
56541 if test "${with_dxsdk_lib+set}" = set; then :
56542   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
56543 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
56544 fi
56545 
56546 
56547 
56548 
56549 # Check whether --with-dxsdk-include was given.
56550 if test "${with_dxsdk_include+set}" = set; then :
56551   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
56552 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
56553 fi
56554 
56555 
56556   fi
56557 
56558   # Control if libzip can use mmap. Available for purposes of overriding.
56559   LIBZIP_CAN_USE_MMAP=true
56560 
56561 
56562 
56563 
56564 
56565 
56566 
56567 
56568 
56569 
56570 
56571 
56572 
56573 
56574 ###############################################################################
56575 #
56576 # We need to do some final tweaking, when everything else is done.
56577 #
56578 ###############################################################################
56579 
56580 
56581   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
56582 
56583 
56584   # The name of the Service Agent jar.
56585   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
56586   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56587     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
56588   fi
56589 
56590 
56591 
56592   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
56593 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
56594 
56595   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
56596     ENABLE_INTREE_EC=yes
56597     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56598 $as_echo "yes" >&6; }
56599   else
56600     ENABLE_INTREE_EC=no
56601     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56602 $as_echo "no" >&6; }
56603   fi
56604 
56605 
56606 
56607 
56608 ###############################################################################
56609 #
56610 # Configure parts of the build that only affect the build performance,
56611 # not the result.
56612 #
56613 ###############################################################################
56614 
56615 
56616   # How many cores do we have on this build system?
56617 
56618 # Check whether --with-num-cores was given.
56619 if test "${with_num_cores+set}" = set; then :
56620   withval=$with_num_cores;
56621 fi
56622 
56623   if test "x$with_num_cores" = x; then
56624     # The number of cores were not specified, try to probe them.
56625 
56626   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
56627 $as_echo_n "checking for number of cores... " >&6; }
56628   NUM_CORES=1
56629   FOUND_CORES=no
56630 
56631   if test -f /proc/cpuinfo; then
56632     # Looks like a Linux (or cygwin) system
56633     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
56634     FOUND_CORES=yes
56635   elif test -x /usr/sbin/psrinfo; then
56636     # Looks like a Solaris system
56637     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
56638     FOUND_CORES=yes
56639   elif test -x /usr/sbin/system_profiler; then
56640     # Looks like a MacOSX system
56641     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
56642     FOUND_CORES=yes
56643   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
56644     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
56645     FOUND_CORES=yes
56646   elif test -n "$NUMBER_OF_PROCESSORS"; then
56647     # On windows, look in the env
56648     NUM_CORES=$NUMBER_OF_PROCESSORS
56649     FOUND_CORES=yes
56650   fi
56651 
56652   if test "x$FOUND_CORES" = xyes; then
56653     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
56654 $as_echo "$NUM_CORES" >&6; }
56655   else
56656     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
56657 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
56658     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
56659 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
56660   fi
56661 
56662   else
56663     NUM_CORES=$with_num_cores
56664   fi
56665 
56666 
56667 
56668   # How much memory do we have on this build system?
56669 
56670 # Check whether --with-memory-size was given.
56671 if test "${with_memory_size+set}" = set; then :
56672   withval=$with_memory_size;
56673 fi
56674 
56675   if test "x$with_memory_size" = x; then
56676     # The memory size was not specified, try to probe it.
56677 
56678   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
56679 $as_echo_n "checking for memory size... " >&6; }
56680   # Default to 1024 MB
56681   MEMORY_SIZE=1024
56682   FOUND_MEM=no
56683 
56684   if test -f /proc/meminfo; then
56685     # Looks like a Linux (or cygwin) system
56686     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
56687     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
56688     FOUND_MEM=yes
56689   elif test -x /usr/sbin/prtconf; then
56690     # Looks like a Solaris or AIX system
56691     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
56692     FOUND_MEM=yes
56693   elif test -x /usr/sbin/system_profiler; then
56694     # Looks like a MacOSX system
56695     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
56696     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
56697     FOUND_MEM=yes
56698   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
56699     # Windows, but without cygwin
56700     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
56701     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
56702     FOUND_MEM=yes
56703   fi
56704 
56705   if test "x$FOUND_MEM" = xyes; then
56706     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
56707 $as_echo "$MEMORY_SIZE MB" >&6; }
56708   else
56709     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
56710 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
56711     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
56712 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
56713   fi
56714 
56715   else
56716     MEMORY_SIZE=$with_memory_size
56717   fi
56718 
56719 
56720 
56721   # Provide a decent default number of parallel jobs for make depending on
56722   # number of cores, amount of memory and machine architecture.
56723 
56724 # Check whether --with-jobs was given.
56725 if test "${with_jobs+set}" = set; then :
56726   withval=$with_jobs;
56727 fi
56728 
56729   if test "x$with_jobs" = x; then
56730     # Number of jobs was not specified, calculate.
56731     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
56732 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
56733     # Approximate memory in GB.
56734     memory_gb=`expr $MEMORY_SIZE / 1024`
56735     # Pick the lowest of memory in gb and number of cores.
56736     if test "$memory_gb" -lt "$NUM_CORES"; then
56737       JOBS="$memory_gb"
56738     else
56739       JOBS="$NUM_CORES"
56740     fi
56741     if test "$JOBS" -eq "0"; then
56742       JOBS=1
56743     fi
56744     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
56745 $as_echo "$JOBS" >&6; }
56746   else
56747     JOBS=$with_jobs
56748   fi
56749 
56750 
56751 
56752 # Setup arguments for the boot jdk (after cores and memory have been setup)
56753 
56754   ##############################################################################
56755   #
56756   # Specify jvm options for anything that is run with the Boot JDK.
56757   # Not all JVM:s accept the same arguments on the command line.
56758   #
56759 
56760 # Check whether --with-boot-jdk-jvmargs was given.
56761 if test "${with_boot_jdk_jvmargs+set}" = set; then :
56762   withval=$with_boot_jdk_jvmargs;
56763 fi
56764 
56765 
56766   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
56767 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
56768 
56769   # Disable special log output when a debug build is used as Boot JDK...
56770 
56771   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
56772   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
56773   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
56774   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56775   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56776   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56777     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
56778     JVM_ARG_OK=true
56779   else
56780     $ECHO "Arg failed:" >&5
56781     $ECHO "$OUTPUT" >&5
56782     JVM_ARG_OK=false
56783   fi
56784 
56785 
56786   # Apply user provided options.
56787 
56788   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
56789   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
56790   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
56791   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56792   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56793   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56794     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
56795     JVM_ARG_OK=true
56796   else
56797     $ECHO "Arg failed:" >&5
56798     $ECHO "$OUTPUT" >&5
56799     JVM_ARG_OK=false
56800   fi
56801 
56802 
56803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
56804 $as_echo "$boot_jdk_jvmargs" >&6; }
56805 
56806   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
56807   JAVA_FLAGS=$boot_jdk_jvmargs
56808 
56809 
56810 
56811   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
56812 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
56813 
56814   # Starting amount of heap memory.
56815 
56816   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
56817   $ECHO "Command: $JAVA -Xms64M -version" >&5
56818   OUTPUT=`$JAVA -Xms64M -version 2>&1`
56819   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56820   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56821   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56822     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
56823     JVM_ARG_OK=true
56824   else
56825     $ECHO "Arg failed:" >&5
56826     $ECHO "$OUTPUT" >&5
56827     JVM_ARG_OK=false
56828   fi
56829 
56830 
56831   # Maximum amount of heap memory.
56832   # Maximum stack size.
56833   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
56834   if test "x$BOOT_JDK_BITS" = "x32"; then
56835     if test "$JVM_MAX_HEAP" -gt "1100"; then
56836       JVM_MAX_HEAP=1100
56837     elif test "$JVM_MAX_HEAP" -lt "512"; then
56838       JVM_MAX_HEAP=512
56839     fi
56840     STACK_SIZE=768
56841   else
56842     # Running a 64 bit JVM allows for and requires a bigger heap
56843     if test "$JVM_MAX_HEAP" -gt "1600"; then
56844       JVM_MAX_HEAP=1600
56845     elif test "$JVM_MAX_HEAP" -lt "512"; then
56846       JVM_MAX_HEAP=512
56847     fi
56848     STACK_SIZE=1536
56849   fi
56850 
56851   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
56852   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
56853   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
56854   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56855   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56856   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56857     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
56858     JVM_ARG_OK=true
56859   else
56860     $ECHO "Arg failed:" >&5
56861     $ECHO "$OUTPUT" >&5
56862     JVM_ARG_OK=false
56863   fi
56864 
56865 
56866   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
56867   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
56868   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -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 -XX:ThreadStackSize=$STACK_SIZE"
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   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
56882 $as_echo "$boot_jdk_jvmargs_big" >&6; }
56883 
56884   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
56885 
56886 
56887   # By default, the main javac compilations use big
56888   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
56889 
56890 
56891   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
56892 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
56893 
56894   # Use serial gc for small short lived tools if possible
56895 
56896   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
56897   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
56898   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
56899   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56900   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56901   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56902     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
56903     JVM_ARG_OK=true
56904   else
56905     $ECHO "Arg failed:" >&5
56906     $ECHO "$OUTPUT" >&5
56907     JVM_ARG_OK=false
56908   fi
56909 
56910 
56911   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
56912   $ECHO "Command: $JAVA -Xms32M -version" >&5
56913   OUTPUT=`$JAVA -Xms32M -version 2>&1`
56914   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56915   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56916   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56917     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
56918     JVM_ARG_OK=true
56919   else
56920     $ECHO "Arg failed:" >&5
56921     $ECHO "$OUTPUT" >&5
56922     JVM_ARG_OK=false
56923   fi
56924 
56925 
56926   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
56927   $ECHO "Command: $JAVA -Xmx512M -version" >&5
56928   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
56929   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56930   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56931   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56932     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
56933     JVM_ARG_OK=true
56934   else
56935     $ECHO "Arg failed:" >&5
56936     $ECHO "$OUTPUT" >&5
56937     JVM_ARG_OK=false
56938   fi
56939 
56940 
56941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
56942 $as_echo "$boot_jdk_jvmargs_small" >&6; }
56943 
56944   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
56945 
56946 
56947   JAVA_TOOL_FLAGS_SMALL=""
56948   for f in $JAVA_FLAGS_SMALL; do
56949     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
56950   done
56951 
56952 
56953 
56954 # Setup smart javac (after cores and memory have been setup)
56955 
56956 
56957 # Check whether --with-sjavac-server-java was given.
56958 if test "${with_sjavac_server_java+set}" = set; then :
56959   withval=$with_sjavac_server_java;
56960 fi
56961 
56962 
56963   if test "x$with_sjavac_server_java" != x; then
56964     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
56965     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
56966     if test "x$FOUND_VERSION" = x; then
56967       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
56968     fi
56969   else
56970     SJAVAC_SERVER_JAVA="$JAVA"
56971   fi
56972 
56973 
56974   if test "$MEMORY_SIZE" -gt "3000"; then
56975 
56976   $ECHO "Check if jvm arg is ok: -d64" >&5
56977   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
56978   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -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     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
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     if test "$JVM_ARG_OK" = true; then
56991       JVM_64BIT=true
56992       JVM_ARG_OK=false
56993     fi
56994   fi
56995 
56996   MX_VALUE=`expr $MEMORY_SIZE / 2`
56997   if test "$JVM_64BIT" = true; then
56998     # Set ms lower than mx since more than one instance of the server might
56999     # get launched at the same time before they figure out which instance won.
57000     MS_VALUE=512
57001     if test "$MX_VALUE" -gt "2048"; then
57002       MX_VALUE=2048
57003     fi
57004   else
57005     MS_VALUE=256
57006     if test "$MX_VALUE" -gt "1500"; then
57007       MX_VALUE=1500
57008     fi
57009   fi
57010   if test "$MX_VALUE" -lt "512"; then
57011     MX_VALUE=512
57012   fi
57013 
57014   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
57015   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
57016   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
57017   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57018   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57019   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57020     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
57021     JVM_ARG_OK=true
57022   else
57023     $ECHO "Arg failed:" >&5
57024     $ECHO "$OUTPUT" >&5
57025     JVM_ARG_OK=false
57026   fi
57027 
57028 
57029 
57030   # Check whether --enable-sjavac was given.
57031 if test "${enable_sjavac+set}" = set; then :
57032   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
57033 else
57034   ENABLE_SJAVAC="no"
57035 fi
57036 
57037   if test "x$JVM_ARG_OK" = "xfalse"; then
57038     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
57039 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
57040     ENABLE_SJAVAC="no"
57041   fi
57042   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
57043 $as_echo_n "checking whether to use sjavac... " >&6; }
57044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
57045 $as_echo "$ENABLE_SJAVAC" >&6; }
57046 
57047 
57048   # Check whether --enable-javac-server was given.
57049 if test "${enable_javac_server+set}" = set; then :
57050   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
57051 else
57052   ENABLE_JAVAC_SERVER="yes"
57053 fi
57054 
57055   if test "x$JVM_ARG_OK" = "xfalse"; then
57056     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
57057 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
57058     ENABLE_JAVAC_SERVER="no"
57059   fi
57060   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
57061 $as_echo_n "checking whether to use javac server... " >&6; }
57062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
57063 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
57064 
57065 
57066   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
57067     # When using a server javac, the small client instances do not need much
57068     # resources.
57069     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
57070   fi
57071 
57072 
57073 # Setup use of icecc if requested
57074 
57075   # Check whether --enable-icecc was given.
57076 if test "${enable_icecc+set}" = set; then :
57077   enableval=$enable_icecc;
57078 fi
57079 
57080 
57081   if test "x${enable_icecc}" = "xyes"; then
57082 
57083 
57084 
57085   # Publish this variable in the help.
57086 
57087 
57088   if [ -z "${ICECC_CMD+x}" ]; then
57089     # The variable is not set by user, try to locate tool using the code snippet
57090     for ac_prog in icecc
57091 do
57092   # Extract the first word of "$ac_prog", so it can be a program name with args.
57093 set dummy $ac_prog; ac_word=$2
57094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57095 $as_echo_n "checking for $ac_word... " >&6; }
57096 if ${ac_cv_path_ICECC_CMD+:} false; then :
57097   $as_echo_n "(cached) " >&6
57098 else
57099   case $ICECC_CMD in
57100   [\\/]* | ?:[\\/]*)
57101   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57102   ;;
57103   *)
57104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57105 for as_dir in $PATH
57106 do
57107   IFS=$as_save_IFS
57108   test -z "$as_dir" && as_dir=.
57109     for ac_exec_ext in '' $ac_executable_extensions; do
57110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57111     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57113     break 2
57114   fi
57115 done
57116   done
57117 IFS=$as_save_IFS
57118 
57119   ;;
57120 esac
57121 fi
57122 ICECC_CMD=$ac_cv_path_ICECC_CMD
57123 if test -n "$ICECC_CMD"; then
57124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57125 $as_echo "$ICECC_CMD" >&6; }
57126 else
57127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57128 $as_echo "no" >&6; }
57129 fi
57130 
57131 
57132   test -n "$ICECC_CMD" && break
57133 done
57134 
57135   else
57136     # The variable is set, but is it from the command line or the environment?
57137 
57138     # Try to remove the string !ICECC_CMD! from our list.
57139     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
57140     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57141       # If it failed, the variable was not from the command line. Ignore it,
57142       # but warn the user (except for BASH, which is always set by the calling BASH).
57143       if test "xICECC_CMD" != xBASH; then
57144         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
57145 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
57146       fi
57147       # Try to locate tool using the code snippet
57148       for ac_prog in icecc
57149 do
57150   # Extract the first word of "$ac_prog", so it can be a program name with args.
57151 set dummy $ac_prog; ac_word=$2
57152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57153 $as_echo_n "checking for $ac_word... " >&6; }
57154 if ${ac_cv_path_ICECC_CMD+:} false; then :
57155   $as_echo_n "(cached) " >&6
57156 else
57157   case $ICECC_CMD in
57158   [\\/]* | ?:[\\/]*)
57159   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57160   ;;
57161   *)
57162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57163 for as_dir in $PATH
57164 do
57165   IFS=$as_save_IFS
57166   test -z "$as_dir" && as_dir=.
57167     for ac_exec_ext in '' $ac_executable_extensions; do
57168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57169     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57171     break 2
57172   fi
57173 done
57174   done
57175 IFS=$as_save_IFS
57176 
57177   ;;
57178 esac
57179 fi
57180 ICECC_CMD=$ac_cv_path_ICECC_CMD
57181 if test -n "$ICECC_CMD"; then
57182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57183 $as_echo "$ICECC_CMD" >&6; }
57184 else
57185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57186 $as_echo "no" >&6; }
57187 fi
57188 
57189 
57190   test -n "$ICECC_CMD" && break
57191 done
57192 
57193     else
57194       # If it succeeded, then it was overridden by the user. We will use it
57195       # for the tool.
57196 
57197       # First remove it from the list of overridden variables, so we can test
57198       # for unknown variables in the end.
57199       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57200 
57201       # Check if we try to supply an empty value
57202       if test "x$ICECC_CMD" = x; then
57203         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
57204 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
57205         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
57206 $as_echo_n "checking for ICECC_CMD... " >&6; }
57207         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57208 $as_echo "disabled" >&6; }
57209       else
57210         # Check if the provided tool contains a complete path.
57211         tool_specified="$ICECC_CMD"
57212         tool_basename="${tool_specified##*/}"
57213         if test "x$tool_basename" = "x$tool_specified"; then
57214           # A command without a complete path is provided, search $PATH.
57215           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
57216 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
57217           # Extract the first word of "$tool_basename", so it can be a program name with args.
57218 set dummy $tool_basename; ac_word=$2
57219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57220 $as_echo_n "checking for $ac_word... " >&6; }
57221 if ${ac_cv_path_ICECC_CMD+:} false; then :
57222   $as_echo_n "(cached) " >&6
57223 else
57224   case $ICECC_CMD in
57225   [\\/]* | ?:[\\/]*)
57226   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57227   ;;
57228   *)
57229   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57230 for as_dir in $PATH
57231 do
57232   IFS=$as_save_IFS
57233   test -z "$as_dir" && as_dir=.
57234     for ac_exec_ext in '' $ac_executable_extensions; do
57235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57236     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57238     break 2
57239   fi
57240 done
57241   done
57242 IFS=$as_save_IFS
57243 
57244   ;;
57245 esac
57246 fi
57247 ICECC_CMD=$ac_cv_path_ICECC_CMD
57248 if test -n "$ICECC_CMD"; then
57249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57250 $as_echo "$ICECC_CMD" >&6; }
57251 else
57252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57253 $as_echo "no" >&6; }
57254 fi
57255 
57256 
57257           if test "x$ICECC_CMD" = x; then
57258             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57259           fi
57260         else
57261           # Otherwise we believe it is a complete path. Use it as it is.
57262           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
57263 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
57264           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
57265 $as_echo_n "checking for ICECC_CMD... " >&6; }
57266           if test ! -x "$tool_specified"; then
57267             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57268 $as_echo "not found" >&6; }
57269             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
57270           fi
57271           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57272 $as_echo "$tool_specified" >&6; }
57273         fi
57274       fi
57275     fi
57276 
57277   fi
57278 
57279 
57280 
57281   if test "x$ICECC_CMD" = x; then
57282     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
57283   fi
57284 
57285 
57286     old_path="$PATH"
57287 
57288     # Look for icecc-create-env in some known places
57289     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
57290 
57291 
57292 
57293   # Publish this variable in the help.
57294 
57295 
57296   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
57297     # The variable is not set by user, try to locate tool using the code snippet
57298     for ac_prog in icecc-create-env
57299 do
57300   # Extract the first word of "$ac_prog", so it can be a program name with args.
57301 set dummy $ac_prog; ac_word=$2
57302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57303 $as_echo_n "checking for $ac_word... " >&6; }
57304 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57305   $as_echo_n "(cached) " >&6
57306 else
57307   case $ICECC_CREATE_ENV in
57308   [\\/]* | ?:[\\/]*)
57309   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57310   ;;
57311   *)
57312   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57313 for as_dir in $PATH
57314 do
57315   IFS=$as_save_IFS
57316   test -z "$as_dir" && as_dir=.
57317     for ac_exec_ext in '' $ac_executable_extensions; do
57318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57319     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57321     break 2
57322   fi
57323 done
57324   done
57325 IFS=$as_save_IFS
57326 
57327   ;;
57328 esac
57329 fi
57330 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57331 if test -n "$ICECC_CREATE_ENV"; then
57332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57333 $as_echo "$ICECC_CREATE_ENV" >&6; }
57334 else
57335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57336 $as_echo "no" >&6; }
57337 fi
57338 
57339 
57340   test -n "$ICECC_CREATE_ENV" && break
57341 done
57342 
57343   else
57344     # The variable is set, but is it from the command line or the environment?
57345 
57346     # Try to remove the string !ICECC_CREATE_ENV! from our list.
57347     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
57348     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57349       # If it failed, the variable was not from the command line. Ignore it,
57350       # but warn the user (except for BASH, which is always set by the calling BASH).
57351       if test "xICECC_CREATE_ENV" != xBASH; then
57352         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
57353 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
57354       fi
57355       # Try to locate tool using the code snippet
57356       for ac_prog in icecc-create-env
57357 do
57358   # Extract the first word of "$ac_prog", so it can be a program name with args.
57359 set dummy $ac_prog; ac_word=$2
57360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57361 $as_echo_n "checking for $ac_word... " >&6; }
57362 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57363   $as_echo_n "(cached) " >&6
57364 else
57365   case $ICECC_CREATE_ENV in
57366   [\\/]* | ?:[\\/]*)
57367   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57368   ;;
57369   *)
57370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57371 for as_dir in $PATH
57372 do
57373   IFS=$as_save_IFS
57374   test -z "$as_dir" && as_dir=.
57375     for ac_exec_ext in '' $ac_executable_extensions; do
57376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57377     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57379     break 2
57380   fi
57381 done
57382   done
57383 IFS=$as_save_IFS
57384 
57385   ;;
57386 esac
57387 fi
57388 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57389 if test -n "$ICECC_CREATE_ENV"; then
57390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57391 $as_echo "$ICECC_CREATE_ENV" >&6; }
57392 else
57393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57394 $as_echo "no" >&6; }
57395 fi
57396 
57397 
57398   test -n "$ICECC_CREATE_ENV" && break
57399 done
57400 
57401     else
57402       # If it succeeded, then it was overridden by the user. We will use it
57403       # for the tool.
57404 
57405       # First remove it from the list of overridden variables, so we can test
57406       # for unknown variables in the end.
57407       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57408 
57409       # Check if we try to supply an empty value
57410       if test "x$ICECC_CREATE_ENV" = x; then
57411         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
57412 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
57413         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57414 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57415         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57416 $as_echo "disabled" >&6; }
57417       else
57418         # Check if the provided tool contains a complete path.
57419         tool_specified="$ICECC_CREATE_ENV"
57420         tool_basename="${tool_specified##*/}"
57421         if test "x$tool_basename" = "x$tool_specified"; then
57422           # A command without a complete path is provided, search $PATH.
57423           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
57424 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
57425           # Extract the first word of "$tool_basename", so it can be a program name with args.
57426 set dummy $tool_basename; ac_word=$2
57427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57428 $as_echo_n "checking for $ac_word... " >&6; }
57429 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57430   $as_echo_n "(cached) " >&6
57431 else
57432   case $ICECC_CREATE_ENV in
57433   [\\/]* | ?:[\\/]*)
57434   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57435   ;;
57436   *)
57437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57438 for as_dir in $PATH
57439 do
57440   IFS=$as_save_IFS
57441   test -z "$as_dir" && as_dir=.
57442     for ac_exec_ext in '' $ac_executable_extensions; do
57443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57444     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57446     break 2
57447   fi
57448 done
57449   done
57450 IFS=$as_save_IFS
57451 
57452   ;;
57453 esac
57454 fi
57455 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57456 if test -n "$ICECC_CREATE_ENV"; then
57457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57458 $as_echo "$ICECC_CREATE_ENV" >&6; }
57459 else
57460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57461 $as_echo "no" >&6; }
57462 fi
57463 
57464 
57465           if test "x$ICECC_CREATE_ENV" = x; then
57466             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57467           fi
57468         else
57469           # Otherwise we believe it is a complete path. Use it as it is.
57470           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
57471 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
57472           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57473 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57474           if test ! -x "$tool_specified"; then
57475             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57476 $as_echo "not found" >&6; }
57477             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
57478           fi
57479           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57480 $as_echo "$tool_specified" >&6; }
57481         fi
57482       fi
57483     fi
57484 
57485   fi
57486 
57487 
57488 
57489   if test "x$ICECC_CREATE_ENV" = x; then
57490     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
57491   fi
57492 
57493 
57494     # Use icecc-create-env to create a minimal compilation environment that can
57495     # be sent to the other hosts in the icecream cluster.
57496     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
57497     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
57498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
57499 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
57500     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
57501       cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57502           && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
57503     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
57504       # For clang, the icecc compilerwrapper is needed. It usually resides next
57505       # to icecc-create-env.
57506 
57507 
57508 
57509   # Publish this variable in the help.
57510 
57511 
57512   if [ -z "${ICECC_WRAPPER+x}" ]; then
57513     # The variable is not set by user, try to locate tool using the code snippet
57514     for ac_prog in compilerwrapper
57515 do
57516   # Extract the first word of "$ac_prog", so it can be a program name with args.
57517 set dummy $ac_prog; ac_word=$2
57518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57519 $as_echo_n "checking for $ac_word... " >&6; }
57520 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57521   $as_echo_n "(cached) " >&6
57522 else
57523   case $ICECC_WRAPPER in
57524   [\\/]* | ?:[\\/]*)
57525   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57526   ;;
57527   *)
57528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57529 for as_dir in $PATH
57530 do
57531   IFS=$as_save_IFS
57532   test -z "$as_dir" && as_dir=.
57533     for ac_exec_ext in '' $ac_executable_extensions; do
57534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57535     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57537     break 2
57538   fi
57539 done
57540   done
57541 IFS=$as_save_IFS
57542 
57543   ;;
57544 esac
57545 fi
57546 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57547 if test -n "$ICECC_WRAPPER"; then
57548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57549 $as_echo "$ICECC_WRAPPER" >&6; }
57550 else
57551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57552 $as_echo "no" >&6; }
57553 fi
57554 
57555 
57556   test -n "$ICECC_WRAPPER" && break
57557 done
57558 
57559   else
57560     # The variable is set, but is it from the command line or the environment?
57561 
57562     # Try to remove the string !ICECC_WRAPPER! from our list.
57563     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
57564     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57565       # If it failed, the variable was not from the command line. Ignore it,
57566       # but warn the user (except for BASH, which is always set by the calling BASH).
57567       if test "xICECC_WRAPPER" != xBASH; then
57568         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
57569 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
57570       fi
57571       # Try to locate tool using the code snippet
57572       for ac_prog in compilerwrapper
57573 do
57574   # Extract the first word of "$ac_prog", so it can be a program name with args.
57575 set dummy $ac_prog; ac_word=$2
57576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57577 $as_echo_n "checking for $ac_word... " >&6; }
57578 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57579   $as_echo_n "(cached) " >&6
57580 else
57581   case $ICECC_WRAPPER in
57582   [\\/]* | ?:[\\/]*)
57583   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57584   ;;
57585   *)
57586   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57587 for as_dir in $PATH
57588 do
57589   IFS=$as_save_IFS
57590   test -z "$as_dir" && as_dir=.
57591     for ac_exec_ext in '' $ac_executable_extensions; do
57592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57593     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57595     break 2
57596   fi
57597 done
57598   done
57599 IFS=$as_save_IFS
57600 
57601   ;;
57602 esac
57603 fi
57604 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57605 if test -n "$ICECC_WRAPPER"; then
57606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57607 $as_echo "$ICECC_WRAPPER" >&6; }
57608 else
57609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57610 $as_echo "no" >&6; }
57611 fi
57612 
57613 
57614   test -n "$ICECC_WRAPPER" && break
57615 done
57616 
57617     else
57618       # If it succeeded, then it was overridden by the user. We will use it
57619       # for the tool.
57620 
57621       # First remove it from the list of overridden variables, so we can test
57622       # for unknown variables in the end.
57623       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57624 
57625       # Check if we try to supply an empty value
57626       if test "x$ICECC_WRAPPER" = x; then
57627         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
57628 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
57629         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57630 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57631         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57632 $as_echo "disabled" >&6; }
57633       else
57634         # Check if the provided tool contains a complete path.
57635         tool_specified="$ICECC_WRAPPER"
57636         tool_basename="${tool_specified##*/}"
57637         if test "x$tool_basename" = "x$tool_specified"; then
57638           # A command without a complete path is provided, search $PATH.
57639           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
57640 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
57641           # Extract the first word of "$tool_basename", so it can be a program name with args.
57642 set dummy $tool_basename; ac_word=$2
57643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57644 $as_echo_n "checking for $ac_word... " >&6; }
57645 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57646   $as_echo_n "(cached) " >&6
57647 else
57648   case $ICECC_WRAPPER in
57649   [\\/]* | ?:[\\/]*)
57650   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57651   ;;
57652   *)
57653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57654 for as_dir in $PATH
57655 do
57656   IFS=$as_save_IFS
57657   test -z "$as_dir" && as_dir=.
57658     for ac_exec_ext in '' $ac_executable_extensions; do
57659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57660     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57662     break 2
57663   fi
57664 done
57665   done
57666 IFS=$as_save_IFS
57667 
57668   ;;
57669 esac
57670 fi
57671 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57672 if test -n "$ICECC_WRAPPER"; then
57673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57674 $as_echo "$ICECC_WRAPPER" >&6; }
57675 else
57676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57677 $as_echo "no" >&6; }
57678 fi
57679 
57680 
57681           if test "x$ICECC_WRAPPER" = x; then
57682             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57683           fi
57684         else
57685           # Otherwise we believe it is a complete path. Use it as it is.
57686           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
57687 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
57688           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57689 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57690           if test ! -x "$tool_specified"; then
57691             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57692 $as_echo "not found" >&6; }
57693             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
57694           fi
57695           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57696 $as_echo "$tool_specified" >&6; }
57697         fi
57698       fi
57699     fi
57700 
57701   fi
57702 
57703 
57704 
57705   if test "x$ICECC_WRAPPER" = x; then
57706     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
57707   fi
57708 
57709 
57710       cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57711           && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57712     else
57713       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
57714     fi
57715     PATH="$old_path"
57716     # The bundle with the compiler gets a name based on checksums. Parse log file
57717     # to find it.
57718     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57719     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57720     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57721 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57722     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
57723 
57724     if test "x${COMPILE_TYPE}" = "xcross"; then
57725       # If cross compiling, create a separate env package for the build compiler
57726       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
57727 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
57728       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
57729       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
57730         cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57731             && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
57732       elif test "x${BUILD_CC##*/}" = "xclang"; then
57733         cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57734             && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57735       else
57736         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
57737       fi
57738       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57739       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57740       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57741 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57742       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
57743           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
57744     else
57745       BUILD_ICECC="${ICECC}"
57746     fi
57747 
57748 
57749   fi
57750 
57751 
57752 # Can the C/C++ compiler use precompiled headers?
57753 
57754 
57755   ###############################################################################
57756   #
57757   # Can the C/C++ compiler use precompiled headers?
57758   #
57759   # Check whether --enable-precompiled-headers was given.
57760 if test "${enable_precompiled_headers+set}" = set; then :
57761   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
57762 else
57763   ENABLE_PRECOMPH=yes
57764 fi
57765 
57766 
57767   USE_PRECOMPILED_HEADER=1
57768   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
57769 $as_echo_n "checking If precompiled header is enabled... " >&6; }
57770   if test "x$ENABLE_PRECOMPH" = xno; then
57771     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
57772 $as_echo "no, forced" >&6; }
57773     USE_PRECOMPILED_HEADER=0
57774   elif test "x$ICECC" != "x"; then
57775     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
57776 $as_echo "no, does not work effectively with icecc" >&6; }
57777     USE_PRECOMPILED_HEADER=0
57778   else
57779     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57780 $as_echo "yes" >&6; }
57781   fi
57782 
57783   if test "x$ENABLE_PRECOMPH" = xyes; then
57784     # Check that the compiler actually supports precomp headers.
57785     if test "x$TOOLCHAIN_TYPE" = xgcc; then
57786       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
57787 $as_echo_n "checking that precompiled headers work... " >&6; }
57788       echo "int alfa();" > conftest.h
57789       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
57790       if test ! -f conftest.hpp.gch; then
57791         USE_PRECOMPILED_HEADER=0
57792         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57793 $as_echo "no" >&6; }
57794       else
57795         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57796 $as_echo "yes" >&6; }
57797       fi
57798       rm -f conftest.h conftest.hpp.gch
57799     fi
57800   fi
57801 
57802 
57803 
57804 
57805 # Setup use of ccache, if available
57806 
57807   # Check whether --enable-ccache was given.
57808 if test "${enable_ccache+set}" = set; then :
57809   enableval=$enable_ccache;
57810 fi
57811 
57812 
57813   CCACHE=
57814   CCACHE_STATUS=
57815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
57816 $as_echo_n "checking is ccache enabled... " >&6; }
57817   if test "x$enable_ccache" = xyes; then
57818     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
57819       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57820 $as_echo "yes" >&6; }
57821       OLD_PATH="$PATH"
57822       if test "x$TOOLCHAIN_PATH" != x; then
57823         PATH=$TOOLCHAIN_PATH:$PATH
57824       fi
57825 
57826 
57827 
57828   # Publish this variable in the help.
57829 
57830 
57831   if [ -z "${CCACHE+x}" ]; then
57832     # The variable is not set by user, try to locate tool using the code snippet
57833     for ac_prog in ccache
57834 do
57835   # Extract the first word of "$ac_prog", so it can be a program name with args.
57836 set dummy $ac_prog; ac_word=$2
57837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57838 $as_echo_n "checking for $ac_word... " >&6; }
57839 if ${ac_cv_path_CCACHE+:} false; then :
57840   $as_echo_n "(cached) " >&6
57841 else
57842   case $CCACHE in
57843   [\\/]* | ?:[\\/]*)
57844   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57845   ;;
57846   *)
57847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57848 for as_dir in $PATH
57849 do
57850   IFS=$as_save_IFS
57851   test -z "$as_dir" && as_dir=.
57852     for ac_exec_ext in '' $ac_executable_extensions; do
57853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57854     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57856     break 2
57857   fi
57858 done
57859   done
57860 IFS=$as_save_IFS
57861 
57862   ;;
57863 esac
57864 fi
57865 CCACHE=$ac_cv_path_CCACHE
57866 if test -n "$CCACHE"; then
57867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57868 $as_echo "$CCACHE" >&6; }
57869 else
57870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57871 $as_echo "no" >&6; }
57872 fi
57873 
57874 
57875   test -n "$CCACHE" && break
57876 done
57877 
57878   else
57879     # The variable is set, but is it from the command line or the environment?
57880 
57881     # Try to remove the string !CCACHE! from our list.
57882     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
57883     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57884       # If it failed, the variable was not from the command line. Ignore it,
57885       # but warn the user (except for BASH, which is always set by the calling BASH).
57886       if test "xCCACHE" != xBASH; then
57887         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
57888 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
57889       fi
57890       # Try to locate tool using the code snippet
57891       for ac_prog in ccache
57892 do
57893   # Extract the first word of "$ac_prog", so it can be a program name with args.
57894 set dummy $ac_prog; ac_word=$2
57895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57896 $as_echo_n "checking for $ac_word... " >&6; }
57897 if ${ac_cv_path_CCACHE+:} false; then :
57898   $as_echo_n "(cached) " >&6
57899 else
57900   case $CCACHE in
57901   [\\/]* | ?:[\\/]*)
57902   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57903   ;;
57904   *)
57905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57906 for as_dir in $PATH
57907 do
57908   IFS=$as_save_IFS
57909   test -z "$as_dir" && as_dir=.
57910     for ac_exec_ext in '' $ac_executable_extensions; do
57911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57912     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57914     break 2
57915   fi
57916 done
57917   done
57918 IFS=$as_save_IFS
57919 
57920   ;;
57921 esac
57922 fi
57923 CCACHE=$ac_cv_path_CCACHE
57924 if test -n "$CCACHE"; then
57925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57926 $as_echo "$CCACHE" >&6; }
57927 else
57928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57929 $as_echo "no" >&6; }
57930 fi
57931 
57932 
57933   test -n "$CCACHE" && break
57934 done
57935 
57936     else
57937       # If it succeeded, then it was overridden by the user. We will use it
57938       # for the tool.
57939 
57940       # First remove it from the list of overridden variables, so we can test
57941       # for unknown variables in the end.
57942       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57943 
57944       # Check if we try to supply an empty value
57945       if test "x$CCACHE" = x; then
57946         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
57947 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
57948         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
57949 $as_echo_n "checking for CCACHE... " >&6; }
57950         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57951 $as_echo "disabled" >&6; }
57952       else
57953         # Check if the provided tool contains a complete path.
57954         tool_specified="$CCACHE"
57955         tool_basename="${tool_specified##*/}"
57956         if test "x$tool_basename" = "x$tool_specified"; then
57957           # A command without a complete path is provided, search $PATH.
57958           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
57959 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
57960           # Extract the first word of "$tool_basename", so it can be a program name with args.
57961 set dummy $tool_basename; ac_word=$2
57962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57963 $as_echo_n "checking for $ac_word... " >&6; }
57964 if ${ac_cv_path_CCACHE+:} false; then :
57965   $as_echo_n "(cached) " >&6
57966 else
57967   case $CCACHE in
57968   [\\/]* | ?:[\\/]*)
57969   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57970   ;;
57971   *)
57972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57973 for as_dir in $PATH
57974 do
57975   IFS=$as_save_IFS
57976   test -z "$as_dir" && as_dir=.
57977     for ac_exec_ext in '' $ac_executable_extensions; do
57978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57979     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57981     break 2
57982   fi
57983 done
57984   done
57985 IFS=$as_save_IFS
57986 
57987   ;;
57988 esac
57989 fi
57990 CCACHE=$ac_cv_path_CCACHE
57991 if test -n "$CCACHE"; then
57992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57993 $as_echo "$CCACHE" >&6; }
57994 else
57995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57996 $as_echo "no" >&6; }
57997 fi
57998 
57999 
58000           if test "x$CCACHE" = x; then
58001             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
58002           fi
58003         else
58004           # Otherwise we believe it is a complete path. Use it as it is.
58005           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
58006 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
58007           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
58008 $as_echo_n "checking for CCACHE... " >&6; }
58009           if test ! -x "$tool_specified"; then
58010             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
58011 $as_echo "not found" >&6; }
58012             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
58013           fi
58014           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
58015 $as_echo "$tool_specified" >&6; }
58016         fi
58017       fi
58018     fi
58019 
58020   fi
58021 
58022 
58023 
58024   if test "x$CCACHE" = x; then
58025     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
58026   fi
58027 
58028 
58029       PATH="$OLD_PATH"
58030       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
58031       CCACHE_STATUS="Active ($CCACHE_VERSION)"
58032     else
58033       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58034 $as_echo "no" >&6; }
58035       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
58036 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
58037     fi
58038   elif test "x$enable_ccache" = xno; then
58039     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
58040 $as_echo "no, explicitly disabled" >&6; }
58041     CCACHE_STATUS="Disabled"
58042   elif test "x$enable_ccache" = x; then
58043     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58044 $as_echo "no" >&6; }
58045   else
58046     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
58047 $as_echo "unknown" >&6; }
58048     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
58049   fi
58050 
58051 
58052 
58053 # Check whether --with-ccache-dir was given.
58054 if test "${with_ccache_dir+set}" = set; then :
58055   withval=$with_ccache_dir;
58056 fi
58057 
58058 
58059   if test "x$with_ccache_dir" != x; then
58060     # When using a non home ccache directory, assume the use is to share ccache files
58061     # with other users. Thus change the umask.
58062     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
58063     if test "x$CCACHE" = x; then
58064       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
58065 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
58066     fi
58067   fi
58068 
58069   if test "x$CCACHE" != x; then
58070 
58071   if test "x$CCACHE" != x; then
58072     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
58073       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
58074           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
58075       if test "x$HAS_BAD_CCACHE" != "x"; then
58076         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
58077       fi
58078       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
58079 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
58080       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
58081       PUSHED_FLAGS="$CXXFLAGS"
58082       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
58083       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58084 /* end confdefs.h.  */
58085 
58086 int
58087 main ()
58088 {
58089 
58090   ;
58091   return 0;
58092 }
58093 _ACEOF
58094 if ac_fn_cxx_try_compile "$LINENO"; then :
58095   CC_KNOWS_CCACHE_TRICK=yes
58096 else
58097   CC_KNOWS_CCACHE_TRICK=no
58098 fi
58099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58100       CXXFLAGS="$PUSHED_FLAGS"
58101       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
58102         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58103 $as_echo "yes" >&6; }
58104         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
58105 
58106         CCACHE_SLOPPINESS=pch_defines,time_macros
58107       else
58108         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58109 $as_echo "no" >&6; }
58110         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
58111       fi
58112     fi
58113 
58114     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
58115         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
58116 
58117     if test "x$SET_CCACHE_DIR" != x; then
58118       mkdir -p $CCACHE_DIR > /dev/null 2>&1
58119       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
58120     fi
58121   fi
58122 
58123   fi
58124 
58125 
58126 ###############################################################################
58127 #
58128 # And now the finish...
58129 #
58130 ###############################################################################
58131 
58132 # Check for some common pitfalls
58133 
58134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58135     file_to_test="$SRC_ROOT/LICENSE"
58136     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
58137       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
58138     fi
58139   fi
58140 
58141 
58142   # Did user specify any unknown variables?
58143 
58144   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
58145     # Replace the separating ! with spaces before presenting for end user.
58146     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
58147     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
58148 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
58149   fi
58150 
58151 
58152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
58153 $as_echo_n "checking if build directory is on local disk... " >&6; }
58154 
58155   # df -l lists only local disks; if the given directory is not found then
58156   # a non-zero exit code is given
58157   if test "x$DF" = x; then
58158     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58159       # msys does not have df; use Windows "net use" instead.
58160       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
58161       if test "x$IS_NETWORK_DISK" = x; then
58162         OUTPUT_DIR_IS_LOCAL="yes"
58163       else
58164         OUTPUT_DIR_IS_LOCAL="no"
58165       fi
58166     else
58167       # No df here, say it's local
58168       OUTPUT_DIR_IS_LOCAL="yes"
58169     fi
58170   else
58171     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
58172       OUTPUT_DIR_IS_LOCAL="yes"
58173     else
58174       OUTPUT_DIR_IS_LOCAL="no"
58175     fi
58176   fi
58177 
58178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
58179 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
58180 
58181 
58182 
58183   # Check if the user has any old-style ALT_ variables set.
58184   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
58185 
58186   # Before generating output files, test if they exist. If they do, this is a reconfigure.
58187   # Since we can't properly handle the dependencies for this, warn the user about the situation
58188   if test -e $OUTPUT_ROOT/spec.gmk; then
58189     IS_RECONFIGURE=yes
58190   else
58191     IS_RECONFIGURE=no
58192   fi
58193 
58194 
58195 # At the end, call the custom hook. (Dummy macro if no custom sources available)
58196 
58197 
58198 # We're messing a bit with internal autoconf variables to put the config.status
58199 # in the output directory instead of the current directory.
58200 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
58201 
58202 # Create the actual output files. Now the main work of configure is done.
58203 cat >confcache <<\_ACEOF
58204 # This file is a shell script that caches the results of configure
58205 # tests run on this system so they can be shared between configure
58206 # scripts and configure runs, see configure's option --config-cache.
58207 # It is not useful on other systems.  If it contains results you don't
58208 # want to keep, you may remove or edit it.
58209 #
58210 # config.status only pays attention to the cache file if you give it
58211 # the --recheck option to rerun configure.
58212 #
58213 # `ac_cv_env_foo' variables (set or unset) will be overridden when
58214 # loading this file, other *unset* `ac_cv_foo' will be assigned the
58215 # following values.
58216 
58217 _ACEOF
58218 
58219 # The following way of writing the cache mishandles newlines in values,
58220 # but we know of no workaround that is simple, portable, and efficient.
58221 # So, we kill variables containing newlines.
58222 # Ultrix sh set writes to stderr and can't be redirected directly,
58223 # and sets the high bit in the cache file unless we assign to the vars.
58224 (
58225   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
58226     eval ac_val=\$$ac_var
58227     case $ac_val in #(
58228     *${as_nl}*)
58229       case $ac_var in #(
58230       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
58231 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
58232       esac
58233       case $ac_var in #(
58234       _ | IFS | as_nl) ;; #(
58235       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
58236       *) { eval $ac_var=; unset $ac_var;} ;;
58237       esac ;;
58238     esac
58239   done
58240 
58241   (set) 2>&1 |
58242     case $as_nl`(ac_space=' '; set) 2>&1` in #(
58243     *${as_nl}ac_space=\ *)
58244       # `set' does not quote correctly, so add quotes: double-quote
58245       # substitution turns \\\\ into \\, and sed turns \\ into \.
58246       sed -n \
58247         "s/'/'\\\\''/g;
58248           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
58249       ;; #(
58250     *)
58251       # `set' quotes correctly as required by POSIX, so do not add quotes.
58252       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
58253       ;;
58254     esac |
58255     sort
58256 ) |
58257   sed '
58258      /^ac_cv_env_/b end
58259      t clear
58260      :clear
58261      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
58262      t end
58263      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
58264      :end' >>confcache
58265 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
58266   if test -w "$cache_file"; then
58267     if test "x$cache_file" != "x/dev/null"; then
58268       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
58269 $as_echo "$as_me: updating cache $cache_file" >&6;}
58270       if test ! -f "$cache_file" || test -h "$cache_file"; then
58271         cat confcache >"$cache_file"
58272       else
58273         case $cache_file in #(
58274         */* | ?:*)
58275           mv -f confcache "$cache_file"$$ &&
58276           mv -f "$cache_file"$$ "$cache_file" ;; #(
58277         *)
58278           mv -f confcache "$cache_file" ;;
58279         esac
58280       fi
58281     fi
58282   else
58283     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
58284 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
58285   fi
58286 fi
58287 rm -f confcache
58288 
58289 test "x$prefix" = xNONE && prefix=$ac_default_prefix
58290 # Let make expand exec_prefix.
58291 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
58292 
58293 # Transform confdefs.h into DEFS.
58294 # Protect against shell expansion while executing Makefile rules.
58295 # Protect against Makefile macro expansion.
58296 #
58297 # If the first sed substitution is executed (which looks for macros that
58298 # take arguments), then branch to the quote section.  Otherwise,
58299 # look for a macro that doesn't take arguments.
58300 ac_script='
58301 :mline
58302 /\\$/{
58303  N
58304  s,\\\n,,
58305  b mline
58306 }
58307 t clear
58308 :clear
58309 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
58310 t quote
58311 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
58312 t quote
58313 b any
58314 :quote
58315 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
58316 s/\[/\\&/g
58317 s/\]/\\&/g
58318 s/\$/$$/g
58319 H
58320 :any
58321 ${
58322         g
58323         s/^\n//
58324         s/\n/ /g
58325         p
58326 }
58327 '
58328 DEFS=`sed -n "$ac_script" confdefs.h`
58329 
58330 
58331 ac_libobjs=
58332 ac_ltlibobjs=
58333 U=
58334 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
58335   # 1. Remove the extension, and $U if already installed.
58336   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
58337   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
58338   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
58339   #    will be set to the directory where LIBOBJS objects are built.
58340   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
58341   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
58342 done
58343 LIBOBJS=$ac_libobjs
58344 
58345 LTLIBOBJS=$ac_ltlibobjs
58346 
58347 
58348 
58349 : "${CONFIG_STATUS=./config.status}"
58350 ac_write_fail=0
58351 ac_clean_files_save=$ac_clean_files
58352 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
58353 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
58354 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
58355 as_write_fail=0
58356 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
58357 #! $SHELL
58358 # Generated by $as_me.
58359 # Run this file to recreate the current configuration.
58360 # Compiler output produced by configure, useful for debugging
58361 # configure, is in config.log if it exists.
58362 
58363 debug=false
58364 ac_cs_recheck=false
58365 ac_cs_silent=false
58366 
58367 SHELL=\${CONFIG_SHELL-$SHELL}
58368 export SHELL
58369 _ASEOF
58370 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
58371 ## -------------------- ##
58372 ## M4sh Initialization. ##
58373 ## -------------------- ##
58374 
58375 # Be more Bourne compatible
58376 DUALCASE=1; export DUALCASE # for MKS sh
58377 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
58378   emulate sh
58379   NULLCMD=:
58380   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
58381   # is contrary to our usage.  Disable this feature.
58382   alias -g '${1+"$@"}'='"$@"'
58383   setopt NO_GLOB_SUBST
58384 else
58385   case `(set -o) 2>/dev/null` in #(
58386   *posix*) :
58387     set -o posix ;; #(
58388   *) :
58389      ;;
58390 esac
58391 fi
58392 
58393 
58394 as_nl='
58395 '
58396 export as_nl
58397 # Printing a long string crashes Solaris 7 /usr/bin/printf.
58398 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
58399 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
58400 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
58401 # Prefer a ksh shell builtin over an external printf program on Solaris,
58402 # but without wasting forks for bash or zsh.
58403 if test -z "$BASH_VERSION$ZSH_VERSION" \
58404     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
58405   as_echo='print -r --'
58406   as_echo_n='print -rn --'
58407 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
58408   as_echo='printf %s\n'
58409   as_echo_n='printf %s'
58410 else
58411   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58412     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58413     as_echo_n='/usr/ucb/echo -n'
58414   else
58415     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58416     as_echo_n_body='eval
58417       arg=$1;
58418       case $arg in #(
58419       *"$as_nl"*)
58420         expr "X$arg" : "X\\(.*\\)$as_nl";
58421         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
58422       esac;
58423       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
58424     '
58425     export as_echo_n_body
58426     as_echo_n='sh -c $as_echo_n_body as_echo'
58427   fi
58428   export as_echo_body
58429   as_echo='sh -c $as_echo_body as_echo'
58430 fi
58431 
58432 # The user is always right.
58433 if test "${PATH_SEPARATOR+set}" != set; then
58434   PATH_SEPARATOR=:
58435   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
58436     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
58437       PATH_SEPARATOR=';'
58438   }
58439 fi
58440 
58441 
58442 # IFS
58443 # We need space, tab and new line, in precisely that order.  Quoting is
58444 # there to prevent editors from complaining about space-tab.
58445 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
58446 # splitting by setting IFS to empty value.)
58447 IFS=" ""        $as_nl"
58448 
58449 # Find who we are.  Look in the path if we contain no directory separator.
58450 as_myself=
58451 case $0 in #((
58452   *[\\/]* ) as_myself=$0 ;;
58453   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58454 for as_dir in $PATH
58455 do
58456   IFS=$as_save_IFS
58457   test -z "$as_dir" && as_dir=.
58458     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
58459   done
58460 IFS=$as_save_IFS
58461 
58462      ;;
58463 esac
58464 # We did not find ourselves, most probably we were run as `sh COMMAND'
58465 # in which case we are not to be found in the path.
58466 if test "x$as_myself" = x; then
58467   as_myself=$0
58468 fi
58469 if test ! -f "$as_myself"; then
58470   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
58471   exit 1
58472 fi
58473 
58474 # Unset variables that we do not need and which cause bugs (e.g. in
58475 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
58476 # suppresses any "Segmentation fault" message there.  '((' could
58477 # trigger a bug in pdksh 5.2.14.
58478 for as_var in BASH_ENV ENV MAIL MAILPATH
58479 do eval test x\${$as_var+set} = xset \
58480   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
58481 done
58482 PS1='$ '
58483 PS2='> '
58484 PS4='+ '
58485 
58486 # NLS nuisances.
58487 LC_ALL=C
58488 export LC_ALL
58489 LANGUAGE=C
58490 export LANGUAGE
58491 
58492 # CDPATH.
58493 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
58494 
58495 
58496 # as_fn_error STATUS ERROR [LINENO LOG_FD]
58497 # ----------------------------------------
58498 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
58499 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
58500 # script with STATUS, using 1 if that was 0.
58501 as_fn_error ()
58502 {
58503   as_status=$1; test $as_status -eq 0 && as_status=1
58504   if test "$4"; then
58505     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
58506     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
58507   fi
58508   $as_echo "$as_me: error: $2" >&2
58509   as_fn_exit $as_status
58510 } # as_fn_error
58511 
58512 
58513 # as_fn_set_status STATUS
58514 # -----------------------
58515 # Set $? to STATUS, without forking.
58516 as_fn_set_status ()
58517 {
58518   return $1
58519 } # as_fn_set_status
58520 
58521 # as_fn_exit STATUS
58522 # -----------------
58523 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
58524 as_fn_exit ()
58525 {
58526   set +e
58527   as_fn_set_status $1
58528   exit $1
58529 } # as_fn_exit
58530 
58531 # as_fn_unset VAR
58532 # ---------------
58533 # Portably unset VAR.
58534 as_fn_unset ()
58535 {
58536   { eval $1=; unset $1;}
58537 }
58538 as_unset=as_fn_unset
58539 # as_fn_append VAR VALUE
58540 # ----------------------
58541 # Append the text in VALUE to the end of the definition contained in VAR. Take
58542 # advantage of any shell optimizations that allow amortized linear growth over
58543 # repeated appends, instead of the typical quadratic growth present in naive
58544 # implementations.
58545 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
58546   eval 'as_fn_append ()
58547   {
58548     eval $1+=\$2
58549   }'
58550 else
58551   as_fn_append ()
58552   {
58553     eval $1=\$$1\$2
58554   }
58555 fi # as_fn_append
58556 
58557 # as_fn_arith ARG...
58558 # ------------------
58559 # Perform arithmetic evaluation on the ARGs, and store the result in the
58560 # global $as_val. Take advantage of shells that can avoid forks. The arguments
58561 # must be portable across $(()) and expr.
58562 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
58563   eval 'as_fn_arith ()
58564   {
58565     as_val=$(( $* ))
58566   }'
58567 else
58568   as_fn_arith ()
58569   {
58570     as_val=`expr "$@" || test $? -eq 1`
58571   }
58572 fi # as_fn_arith
58573 
58574 
58575 if expr a : '\(a\)' >/dev/null 2>&1 &&
58576    test "X`expr 00001 : '.*\(...\)'`" = X001; then
58577   as_expr=expr
58578 else
58579   as_expr=false
58580 fi
58581 
58582 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
58583   as_basename=basename
58584 else
58585   as_basename=false
58586 fi
58587 
58588 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
58589   as_dirname=dirname
58590 else
58591   as_dirname=false
58592 fi
58593 
58594 as_me=`$as_basename -- "$0" ||
58595 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
58596          X"$0" : 'X\(//\)$' \| \
58597          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
58598 $as_echo X/"$0" |
58599     sed '/^.*\/\([^/][^/]*\)\/*$/{
58600             s//\1/
58601             q
58602           }
58603           /^X\/\(\/\/\)$/{
58604             s//\1/
58605             q
58606           }
58607           /^X\/\(\/\).*/{
58608             s//\1/
58609             q
58610           }
58611           s/.*/./; q'`
58612 
58613 # Avoid depending upon Character Ranges.
58614 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
58615 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
58616 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
58617 as_cr_digits='0123456789'
58618 as_cr_alnum=$as_cr_Letters$as_cr_digits
58619 
58620 ECHO_C= ECHO_N= ECHO_T=
58621 case `echo -n x` in #(((((
58622 -n*)
58623   case `echo 'xy\c'` in
58624   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
58625   xy)  ECHO_C='\c';;
58626   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
58627        ECHO_T=' ';;
58628   esac;;
58629 *)
58630   ECHO_N='-n';;
58631 esac
58632 
58633 rm -f conf$$ conf$$.exe conf$$.file
58634 if test -d conf$$.dir; then
58635   rm -f conf$$.dir/conf$$.file
58636 else
58637   rm -f conf$$.dir
58638   mkdir conf$$.dir 2>/dev/null
58639 fi
58640 if (echo >conf$$.file) 2>/dev/null; then
58641   if ln -s conf$$.file conf$$ 2>/dev/null; then
58642     as_ln_s='ln -s'
58643     # ... but there are two gotchas:
58644     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
58645     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
58646     # In both cases, we have to default to `cp -pR'.
58647     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
58648       as_ln_s='cp -pR'
58649   elif ln conf$$.file conf$$ 2>/dev/null; then
58650     as_ln_s=ln
58651   else
58652     as_ln_s='cp -pR'
58653   fi
58654 else
58655   as_ln_s='cp -pR'
58656 fi
58657 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
58658 rmdir conf$$.dir 2>/dev/null
58659 
58660 
58661 # as_fn_mkdir_p
58662 # -------------
58663 # Create "$as_dir" as a directory, including parents if necessary.
58664 as_fn_mkdir_p ()
58665 {
58666 
58667   case $as_dir in #(
58668   -*) as_dir=./$as_dir;;
58669   esac
58670   test -d "$as_dir" || eval $as_mkdir_p || {
58671     as_dirs=
58672     while :; do
58673       case $as_dir in #(
58674       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
58675       *) as_qdir=$as_dir;;
58676       esac
58677       as_dirs="'$as_qdir' $as_dirs"
58678       as_dir=`$as_dirname -- "$as_dir" ||
58679 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58680          X"$as_dir" : 'X\(//\)[^/]' \| \
58681          X"$as_dir" : 'X\(//\)$' \| \
58682          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
58683 $as_echo X"$as_dir" |
58684     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
58685             s//\1/
58686             q
58687           }
58688           /^X\(\/\/\)[^/].*/{
58689             s//\1/
58690             q
58691           }
58692           /^X\(\/\/\)$/{
58693             s//\1/
58694             q
58695           }
58696           /^X\(\/\).*/{
58697             s//\1/
58698             q
58699           }
58700           s/.*/./; q'`
58701       test -d "$as_dir" && break
58702     done
58703     test -z "$as_dirs" || eval "mkdir $as_dirs"
58704   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
58705 
58706 
58707 } # as_fn_mkdir_p
58708 if mkdir -p . 2>/dev/null; then
58709   as_mkdir_p='mkdir -p "$as_dir"'
58710 else
58711   test -d ./-p && rmdir ./-p
58712   as_mkdir_p=false
58713 fi
58714 
58715 
58716 # as_fn_executable_p FILE
58717 # -----------------------
58718 # Test if FILE is an executable regular file.
58719 as_fn_executable_p ()
58720 {
58721   test -f "$1" && test -x "$1"
58722 } # as_fn_executable_p
58723 as_test_x='test -x'
58724 as_executable_p=as_fn_executable_p
58725 
58726 # Sed expression to map a string onto a valid CPP name.
58727 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
58728 
58729 # Sed expression to map a string onto a valid variable name.
58730 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
58731 
58732 
58733 exec 6>&1
58734 ## ----------------------------------- ##
58735 ## Main body of $CONFIG_STATUS script. ##
58736 ## ----------------------------------- ##
58737 _ASEOF
58738 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
58739 
58740 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58741 # Save the log message, to keep $0 and so on meaningful, and to
58742 # report actual input values of CONFIG_FILES etc. instead of their
58743 # values after options handling.
58744 ac_log="
58745 This file was extended by OpenJDK $as_me jdk9, which was
58746 generated by GNU Autoconf 2.69.  Invocation command line was
58747 
58748   CONFIG_FILES    = $CONFIG_FILES
58749   CONFIG_HEADERS  = $CONFIG_HEADERS
58750   CONFIG_LINKS    = $CONFIG_LINKS
58751   CONFIG_COMMANDS = $CONFIG_COMMANDS
58752   $ $0 $@
58753 
58754 on `(hostname || uname -n) 2>/dev/null | sed 1q`
58755 "
58756 
58757 _ACEOF
58758 
58759 case $ac_config_files in *"
58760 "*) set x $ac_config_files; shift; ac_config_files=$*;;
58761 esac
58762 
58763 
58764 
58765 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58766 # Files that config.status was made for.
58767 config_files="$ac_config_files"
58768 
58769 _ACEOF
58770 
58771 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58772 ac_cs_usage="\
58773 \`$as_me' instantiates files and other configuration actions
58774 from templates according to the current configuration.  Unless the files
58775 and actions are specified as TAGs, all are instantiated by default.
58776 
58777 Usage: $0 [OPTION]... [TAG]...
58778 
58779   -h, --help       print this help, then exit
58780   -V, --version    print version number and configuration settings, then exit
58781       --config     print configuration, then exit
58782   -q, --quiet, --silent
58783                    do not print progress messages
58784   -d, --debug      don't remove temporary files
58785       --recheck    update $as_me by reconfiguring in the same conditions
58786       --file=FILE[:TEMPLATE]
58787                    instantiate the configuration file FILE
58788 
58789 Configuration files:
58790 $config_files
58791 
58792 Report bugs to <build-dev@openjdk.java.net>.
58793 OpenJDK home page: <http://openjdk.java.net>."
58794 
58795 _ACEOF
58796 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58797 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
58798 ac_cs_version="\\
58799 OpenJDK config.status jdk9
58800 configured by $0, generated by GNU Autoconf 2.69,
58801   with options \\"\$ac_cs_config\\"
58802 
58803 Copyright (C) 2012 Free Software Foundation, Inc.
58804 This config.status script is free software; the Free Software Foundation
58805 gives unlimited permission to copy, distribute and modify it."
58806 
58807 ac_pwd='$ac_pwd'
58808 srcdir='$srcdir'
58809 AWK='$AWK'
58810 test -n "\$AWK" || AWK=awk
58811 _ACEOF
58812 
58813 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58814 # The default lists apply if the user does not specify any file.
58815 ac_need_defaults=:
58816 while test $# != 0
58817 do
58818   case $1 in
58819   --*=?*)
58820     ac_option=`expr "X$1" : 'X\([^=]*\)='`
58821     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
58822     ac_shift=:
58823     ;;
58824   --*=)
58825     ac_option=`expr "X$1" : 'X\([^=]*\)='`
58826     ac_optarg=
58827     ac_shift=:
58828     ;;
58829   *)
58830     ac_option=$1
58831     ac_optarg=$2
58832     ac_shift=shift
58833     ;;
58834   esac
58835 
58836   case $ac_option in
58837   # Handling of the options.
58838   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
58839     ac_cs_recheck=: ;;
58840   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
58841     $as_echo "$ac_cs_version"; exit ;;
58842   --config | --confi | --conf | --con | --co | --c )
58843     $as_echo "$ac_cs_config"; exit ;;
58844   --debug | --debu | --deb | --de | --d | -d )
58845     debug=: ;;
58846   --file | --fil | --fi | --f )
58847     $ac_shift
58848     case $ac_optarg in
58849     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
58850     '') as_fn_error $? "missing file argument" ;;
58851     esac
58852     as_fn_append CONFIG_FILES " '$ac_optarg'"
58853     ac_need_defaults=false;;
58854   --he | --h |  --help | --hel | -h )
58855     $as_echo "$ac_cs_usage"; exit ;;
58856   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
58857   | -silent | --silent | --silen | --sile | --sil | --si | --s)
58858     ac_cs_silent=: ;;
58859 
58860   # This is an error.
58861   -*) as_fn_error $? "unrecognized option: \`$1'
58862 Try \`$0 --help' for more information." ;;
58863 
58864   *) as_fn_append ac_config_targets " $1"
58865      ac_need_defaults=false ;;
58866 
58867   esac
58868   shift
58869 done
58870 
58871 ac_configure_extra_args=
58872 
58873 if $ac_cs_silent; then
58874   exec 6>/dev/null
58875   ac_configure_extra_args="$ac_configure_extra_args --silent"
58876 fi
58877 
58878 _ACEOF
58879 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58880 if \$ac_cs_recheck; then
58881   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
58882   shift
58883   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
58884   CONFIG_SHELL='$SHELL'
58885   export CONFIG_SHELL
58886   exec "\$@"
58887 fi
58888 
58889 _ACEOF
58890 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58891 exec 5>>config.log
58892 {
58893   echo
58894   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
58895 ## Running $as_me. ##
58896 _ASBOX
58897   $as_echo "$ac_log"
58898 } >&5
58899 
58900 _ACEOF
58901 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58902 _ACEOF
58903 
58904 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58905 
58906 # Handling of arguments.
58907 for ac_config_target in $ac_config_targets
58908 do
58909   case $ac_config_target in
58910     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
58911     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
58912     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
58913     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
58914     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
58915 
58916   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
58917   esac
58918 done
58919 
58920 
58921 # If the user did not use the arguments to specify the items to instantiate,
58922 # then the envvar interface is used.  Set only those that are not.
58923 # We use the long form for the default assignment because of an extremely
58924 # bizarre bug on SunOS 4.1.3.
58925 if $ac_need_defaults; then
58926   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
58927 fi
58928 
58929 # Have a temporary directory for convenience.  Make it in the build tree
58930 # simply because there is no reason against having it here, and in addition,
58931 # creating and moving files from /tmp can sometimes cause problems.
58932 # Hook for its removal unless debugging.
58933 # Note that there is a small window in which the directory will not be cleaned:
58934 # after its creation but before its name has been assigned to `$tmp'.
58935 $debug ||
58936 {
58937   tmp= ac_tmp=
58938   trap 'exit_status=$?
58939   : "${ac_tmp:=$tmp}"
58940   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
58941 ' 0
58942   trap 'as_fn_exit 1' 1 2 13 15
58943 }
58944 # Create a (secure) tmp directory for tmp files.
58945 
58946 {
58947   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
58948   test -d "$tmp"
58949 }  ||
58950 {
58951   tmp=./conf$$-$RANDOM
58952   (umask 077 && mkdir "$tmp")
58953 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
58954 ac_tmp=$tmp
58955 
58956 # Set up the scripts for CONFIG_FILES section.
58957 # No need to generate them if there are no CONFIG_FILES.
58958 # This happens for instance with `./config.status config.h'.
58959 if test -n "$CONFIG_FILES"; then
58960 
58961 
58962 ac_cr=`echo X | tr X '\015'`
58963 # On cygwin, bash can eat \r inside `` if the user requested igncr.
58964 # But we know of no other shell where ac_cr would be empty at this
58965 # point, so we can use a bashism as a fallback.
58966 if test "x$ac_cr" = x; then
58967   eval ac_cr=\$\'\\r\'
58968 fi
58969 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
58970 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
58971   ac_cs_awk_cr='\\r'
58972 else
58973   ac_cs_awk_cr=$ac_cr
58974 fi
58975 
58976 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
58977 _ACEOF
58978 
58979 
58980 {
58981   echo "cat >conf$$subs.awk <<_ACEOF" &&
58982   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
58983   echo "_ACEOF"
58984 } >conf$$subs.sh ||
58985   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58986 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
58987 ac_delim='%!_!# '
58988 for ac_last_try in false false false false false :; do
58989   . ./conf$$subs.sh ||
58990     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58991 
58992   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
58993   if test $ac_delim_n = $ac_delim_num; then
58994     break
58995   elif $ac_last_try; then
58996     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58997   else
58998     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
58999   fi
59000 done
59001 rm -f conf$$subs.sh
59002 
59003 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59004 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
59005 _ACEOF
59006 sed -n '
59007 h
59008 s/^/S["/; s/!.*/"]=/
59009 p
59010 g
59011 s/^[^!]*!//
59012 :repl
59013 t repl
59014 s/'"$ac_delim"'$//
59015 t delim
59016 :nl
59017 h
59018 s/\(.\{148\}\)..*/\1/
59019 t more1
59020 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
59021 p
59022 n
59023 b repl
59024 :more1
59025 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
59026 p
59027 g
59028 s/.\{148\}//
59029 t nl
59030 :delim
59031 h
59032 s/\(.\{148\}\)..*/\1/
59033 t more2
59034 s/["\\]/\\&/g; s/^/"/; s/$/"/
59035 p
59036 b
59037 :more2
59038 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
59039 p
59040 g
59041 s/.\{148\}//
59042 t delim
59043 ' <conf$$subs.awk | sed '
59044 /^[^""]/{
59045   N
59046   s/\n//
59047 }
59048 ' >>$CONFIG_STATUS || ac_write_fail=1
59049 rm -f conf$$subs.awk
59050 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59051 _ACAWK
59052 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
59053   for (key in S) S_is_set[key] = 1
59054   FS = ""
59055 
59056 }
59057 {
59058   line = $ 0
59059   nfields = split(line, field, "@")
59060   substed = 0
59061   len = length(field[1])
59062   for (i = 2; i < nfields; i++) {
59063     key = field[i]
59064     keylen = length(key)
59065     if (S_is_set[key]) {
59066       value = S[key]
59067       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
59068       len += length(value) + length(field[++i])
59069       substed = 1
59070     } else
59071       len += 1 + keylen
59072   }
59073 
59074   print line
59075 }
59076 
59077 _ACAWK
59078 _ACEOF
59079 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59080 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
59081   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
59082 else
59083   cat
59084 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
59085   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
59086 _ACEOF
59087 
59088 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
59089 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
59090 # trailing colons and then remove the whole line if VPATH becomes empty
59091 # (actually we leave an empty line to preserve line numbers).
59092 if test "x$srcdir" = x.; then
59093   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
59094 h
59095 s///
59096 s/^/:/
59097 s/[      ]*$/:/
59098 s/:\$(srcdir):/:/g
59099 s/:\${srcdir}:/:/g
59100 s/:@srcdir@:/:/g
59101 s/^:*//
59102 s/:*$//
59103 x
59104 s/\(=[   ]*\).*/\1/
59105 G
59106 s/\n//
59107 s/^[^=]*=[       ]*$//
59108 }'
59109 fi
59110 
59111 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59112 fi # test -n "$CONFIG_FILES"
59113 
59114 
59115 eval set X "  :F $CONFIG_FILES      "
59116 shift
59117 for ac_tag
59118 do
59119   case $ac_tag in
59120   :[FHLC]) ac_mode=$ac_tag; continue;;
59121   esac
59122   case $ac_mode$ac_tag in
59123   :[FHL]*:*);;
59124   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
59125   :[FH]-) ac_tag=-:-;;
59126   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
59127   esac
59128   ac_save_IFS=$IFS
59129   IFS=:
59130   set x $ac_tag
59131   IFS=$ac_save_IFS
59132   shift
59133   ac_file=$1
59134   shift
59135 
59136   case $ac_mode in
59137   :L) ac_source=$1;;
59138   :[FH])
59139     ac_file_inputs=
59140     for ac_f
59141     do
59142       case $ac_f in
59143       -) ac_f="$ac_tmp/stdin";;
59144       *) # Look for the file first in the build tree, then in the source tree
59145          # (if the path is not absolute).  The absolute path cannot be DOS-style,
59146          # because $ac_f cannot contain `:'.
59147          test -f "$ac_f" ||
59148            case $ac_f in
59149            [\\/$]*) false;;
59150            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
59151            esac ||
59152            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
59153       esac
59154       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
59155       as_fn_append ac_file_inputs " '$ac_f'"
59156     done
59157 
59158     # Let's still pretend it is `configure' which instantiates (i.e., don't
59159     # use $as_me), people would be surprised to read:
59160     #    /* config.h.  Generated by config.status.  */
59161     configure_input='Generated from '`
59162           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
59163         `' by configure.'
59164     if test x"$ac_file" != x-; then
59165       configure_input="$ac_file.  $configure_input"
59166       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
59167 $as_echo "$as_me: creating $ac_file" >&6;}
59168     fi
59169     # Neutralize special characters interpreted by sed in replacement strings.
59170     case $configure_input in #(
59171     *\&* | *\|* | *\\* )
59172        ac_sed_conf_input=`$as_echo "$configure_input" |
59173        sed 's/[\\\\&|]/\\\\&/g'`;; #(
59174     *) ac_sed_conf_input=$configure_input;;
59175     esac
59176 
59177     case $ac_tag in
59178     *:-:* | *:-) cat >"$ac_tmp/stdin" \
59179       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
59180     esac
59181     ;;
59182   esac
59183 
59184   ac_dir=`$as_dirname -- "$ac_file" ||
59185 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
59186          X"$ac_file" : 'X\(//\)[^/]' \| \
59187          X"$ac_file" : 'X\(//\)$' \| \
59188          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
59189 $as_echo X"$ac_file" |
59190     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
59191             s//\1/
59192             q
59193           }
59194           /^X\(\/\/\)[^/].*/{
59195             s//\1/
59196             q
59197           }
59198           /^X\(\/\/\)$/{
59199             s//\1/
59200             q
59201           }
59202           /^X\(\/\).*/{
59203             s//\1/
59204             q
59205           }
59206           s/.*/./; q'`
59207   as_dir="$ac_dir"; as_fn_mkdir_p
59208   ac_builddir=.
59209 
59210 case "$ac_dir" in
59211 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
59212 *)
59213   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
59214   # A ".." for each directory in $ac_dir_suffix.
59215   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
59216   case $ac_top_builddir_sub in
59217   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
59218   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
59219   esac ;;
59220 esac
59221 ac_abs_top_builddir=$ac_pwd
59222 ac_abs_builddir=$ac_pwd$ac_dir_suffix
59223 # for backward compatibility:
59224 ac_top_builddir=$ac_top_build_prefix
59225 
59226 case $srcdir in
59227   .)  # We are building in place.
59228     ac_srcdir=.
59229     ac_top_srcdir=$ac_top_builddir_sub
59230     ac_abs_top_srcdir=$ac_pwd ;;
59231   [\\/]* | ?:[\\/]* )  # Absolute name.
59232     ac_srcdir=$srcdir$ac_dir_suffix;
59233     ac_top_srcdir=$srcdir
59234     ac_abs_top_srcdir=$srcdir ;;
59235   *) # Relative name.
59236     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
59237     ac_top_srcdir=$ac_top_build_prefix$srcdir
59238     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
59239 esac
59240 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
59241 
59242 
59243   case $ac_mode in
59244   :F)
59245   #
59246   # CONFIG_FILE
59247   #
59248 
59249 _ACEOF
59250 
59251 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59252 # If the template does not know about datarootdir, expand it.
59253 # FIXME: This hack should be removed a few years after 2.60.
59254 ac_datarootdir_hack=; ac_datarootdir_seen=
59255 ac_sed_dataroot='
59256 /datarootdir/ {
59257   p
59258   q
59259 }
59260 /@datadir@/p
59261 /@docdir@/p
59262 /@infodir@/p
59263 /@localedir@/p
59264 /@mandir@/p'
59265 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
59266 *datarootdir*) ac_datarootdir_seen=yes;;
59267 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
59268   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
59269 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
59270 _ACEOF
59271 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59272   ac_datarootdir_hack='
59273   s&@datadir@&$datadir&g
59274   s&@docdir@&$docdir&g
59275   s&@infodir@&$infodir&g
59276   s&@localedir@&$localedir&g
59277   s&@mandir@&$mandir&g
59278   s&\\\${datarootdir}&$datarootdir&g' ;;
59279 esac
59280 _ACEOF
59281 
59282 # Neutralize VPATH when `$srcdir' = `.'.
59283 # Shell code in configure.ac might set extrasub.
59284 # FIXME: do we really want to maintain this feature?
59285 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59286 ac_sed_extra="$ac_vpsub
59287 $extrasub
59288 _ACEOF
59289 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59290 :t
59291 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
59292 s|@configure_input@|$ac_sed_conf_input|;t t
59293 s&@top_builddir@&$ac_top_builddir_sub&;t t
59294 s&@top_build_prefix@&$ac_top_build_prefix&;t t
59295 s&@srcdir@&$ac_srcdir&;t t
59296 s&@abs_srcdir@&$ac_abs_srcdir&;t t
59297 s&@top_srcdir@&$ac_top_srcdir&;t t
59298 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
59299 s&@builddir@&$ac_builddir&;t t
59300 s&@abs_builddir@&$ac_abs_builddir&;t t
59301 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
59302 $ac_datarootdir_hack
59303 "
59304 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
59305   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
59306 
59307 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
59308   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
59309   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
59310       "$ac_tmp/out"`; test -z "$ac_out"; } &&
59311   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
59312 which seems to be undefined.  Please make sure it is defined" >&5
59313 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
59314 which seems to be undefined.  Please make sure it is defined" >&2;}
59315 
59316   rm -f "$ac_tmp/stdin"
59317   case $ac_file in
59318   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
59319   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
59320   esac \
59321   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
59322  ;;
59323 
59324 
59325 
59326   esac
59327 
59328 done # for ac_tag
59329 
59330 
59331 as_fn_exit 0
59332 _ACEOF
59333 ac_clean_files=$ac_clean_files_save
59334 
59335 test $ac_write_fail = 0 ||
59336   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
59337 
59338 
59339 # configure is writing to config.log, and then calls config.status.
59340 # config.status does its own redirection, appending to config.log.
59341 # Unfortunately, on DOS this fails, as config.log is still kept open
59342 # by configure, so config.status won't be able to write to it; its
59343 # output is simply discarded.  So we exec the FD to /dev/null,
59344 # effectively closing config.log, so it can be properly (re)opened and
59345 # appended to by config.status.  When coming back to configure, we
59346 # need to make the FD available again.
59347 if test "$no_create" != yes; then
59348   ac_cs_success=:
59349   ac_config_status_args=
59350   test "$silent" = yes &&
59351     ac_config_status_args="$ac_config_status_args --quiet"
59352   exec 5>/dev/null
59353   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
59354   exec 5>>config.log
59355   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
59356   # would make configure fail if this is the last instruction.
59357   $ac_cs_success || as_fn_exit 1
59358 fi
59359 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
59360   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
59361 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
59362 fi
59363 
59364 
59365 # After AC_OUTPUT, we need to do final work
59366 
59367 
59368   # Try to move config.log (generated by autoconf) to the configure-support directory.
59369   if test -e ./config.log; then
59370     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
59371   fi
59372 
59373   # Rotate our log file (configure.log)
59374   if test -e "$OUTPUT_ROOT/configure.log.old"; then
59375     $RM -f "$OUTPUT_ROOT/configure.log.old"
59376   fi
59377   if test -e "$OUTPUT_ROOT/configure.log"; then
59378     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
59379   fi
59380 
59381   # Move configure.log from current directory to the build output root
59382   if test -e ./configure.log; then
59383     echo found it
59384     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
59385   fi
59386 
59387   # Make the compare script executable
59388   $CHMOD +x $OUTPUT_ROOT/compare.sh
59389 
59390 
59391 # Finally output some useful information to the user
59392 
59393   # Finally output some useful information to the user
59394 
59395   printf "\n"
59396   printf "====================================================\n"
59397   if test "x$no_create" != "xyes"; then
59398     if test "x$IS_RECONFIGURE" != "xyes"; then
59399       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
59400     else
59401       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
59402     fi
59403   else
59404     if test "x$IS_RECONFIGURE" != "xyes"; then
59405       printf "A configuration has been successfully checked but not created\n"
59406     else
59407       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
59408     fi
59409   fi
59410   if test "x$CONFIGURE_COMMAND_LINE" != x; then
59411     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
59412   else
59413     printf "using default settings.\n"
59414   fi
59415 
59416   printf "\n"
59417   printf "Configuration summary:\n"
59418   printf "* Debug level:    $DEBUG_LEVEL\n"
59419   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
59420   printf "* JDK variant:    $JDK_VARIANT\n"
59421   printf "* JVM variants:   $with_jvm_variants\n"
59422   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
59423   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
59424 
59425   printf "\n"
59426   printf "Tools summary:\n"
59427   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
59428     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
59429   fi
59430   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
59431   if test "x$TOOLCHAIN_VERSION" != "x"; then
59432     print_version=" $TOOLCHAIN_VERSION"
59433   fi
59434   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
59435   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
59436   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
59437 
59438   printf "\n"
59439   printf "Build performance summary:\n"
59440   printf "* Cores to use:   $JOBS\n"
59441   printf "* Memory limit:   $MEMORY_SIZE MB\n"
59442   if test "x$CCACHE_STATUS" != "x"; then
59443     printf "* ccache status:  $CCACHE_STATUS\n"
59444   fi
59445   printf "\n"
59446 
59447   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
59448     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
59449     printf "will result in longer build times.\n"
59450     printf "\n"
59451   fi
59452 
59453   if test "x$FOUND_ALT_VARIABLES" != "x"; then
59454     printf "WARNING: You have old-style ALT_ environment variables set.\n"
59455     printf "These are not respected, and will be ignored. It is recommended\n"
59456     printf "that you clean your environment. The following variables are set:\n"
59457     printf "$FOUND_ALT_VARIABLES\n"
59458     printf "\n"
59459   fi
59460 
59461   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
59462     printf "WARNING: Your build output directory is not on a local disk.\n"
59463     printf "This will severely degrade build performance!\n"
59464     printf "It is recommended that you create an output directory on a local disk,\n"
59465     printf "and run the configure script again from that directory.\n"
59466     printf "\n"
59467   fi
59468 
59469   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
59470     printf "WARNING: The result of this configuration has overridden an older\n"
59471     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
59472     printf "proper build. Failure to do so might result in strange build problems.\n"
59473     printf "\n"
59474   fi
59475 
59476   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
59477     printf "WARNING: The result of this configuration was not saved.\n"
59478     printf "You should run without '--no-create | -n' to create the configuration.\n"
59479     printf "\n"
59480   fi
59481 
59482 
59483 
59484   # Locate config.log.
59485   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
59486     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
59487   elif test -e "./config.log"; then
59488     CONFIG_LOG_PATH="."
59489   fi
59490 
59491   if test -e "$CONFIG_LOG_PATH/config.log"; then
59492     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
59493     if test $? -eq 0; then
59494       printf "The following warnings were produced. Repeated here for convenience:\n"
59495       # We must quote sed expression (using []) to stop m4 from eating the [].
59496       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
59497       printf "\n"
59498     fi
59499   fi
59500