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 TEST_JOBS
 650 JOBS
 651 MEMORY_SIZE
 652 NUM_CORES
 653 BUILD_FAILURE_HANDLER
 654 ENABLE_INTREE_EC
 655 JVM_VARIANT_CORE
 656 JVM_VARIANT_ZEROSHARK
 657 JVM_VARIANT_ZERO
 658 JVM_VARIANT_HOTSPOT
 659 JVM_VARIANT_MINIMAL1
 660 JVM_VARIANT_CLIENT
 661 JVM_VARIANT_SERVER
 662 JVM_VARIANTS_COMMA
 663 TEST_IN_BUILD
 664 HOTSPOT_MAKE_ARGS
 665 MACOSX_UNIVERSAL
 666 DEBUG_CLASSFILES
 667 FASTDEBUG
 668 VARIANT
 669 USE_NEW_HOTSPOT_BUILD
 670 LIBZIP_CAN_USE_MMAP
 671 LIBDL
 672 LIBM
 673 USE_EXTERNAL_LCMS
 674 LCMS_LIBS
 675 LCMS_CFLAGS
 676 USE_EXTERNAL_LIBZ
 677 USE_EXTERNAL_LIBPNG
 678 PNG_LIBS
 679 PNG_CFLAGS
 680 USE_EXTERNAL_LIBGIF
 681 USE_EXTERNAL_LIBJPEG
 682 LLVM_LIBS
 683 LLVM_LDFLAGS
 684 LLVM_CFLAGS
 685 LLVM_CONFIG
 686 LIBFFI_LIBS
 687 LIBFFI_CFLAGS
 688 ALSA_LIBS
 689 ALSA_CFLAGS
 690 FREETYPE_BUNDLE_LIB_PATH
 691 FREETYPE_LIBS
 692 FREETYPE_CFLAGS
 693 CUPS_CFLAGS
 694 X_EXTRA_LIBS
 695 X_LIBS
 696 X_PRE_LIBS
 697 X_CFLAGS
 698 XMKMF
 699 MSVCP_DLL
 700 MSVCR_DLL
 701 LIBCXX
 702 STATIC_CXX_SETTING
 703 FIXPATH_DETACH_FLAG
 704 FIXPATH
 705 VALID_JVM_FEATURES
 706 JVM_FEATURES_custom
 707 JVM_FEATURES_zeroshark
 708 JVM_FEATURES_zero
 709 JVM_FEATURES_minimal
 710 JVM_FEATURES_core
 711 JVM_FEATURES_client
 712 JVM_FEATURES_server
 713 INCLUDE_DTRACE
 714 GCOV_ENABLED
 715 STRIP_POLICY
 716 DEBUG_BINARIES
 717 ZIP_EXTERNAL_DEBUG_SYMBOLS
 718 COPY_DEBUG_SYMBOLS
 719 COMPILE_WITH_DEBUG_SYMBOLS
 720 CFLAGS_WARNINGS_ARE_ERRORS
 721 BUILD_CC_DISABLE_WARNING_PREFIX
 722 DISABLE_WARNING_PREFIX
 723 HOTSPOT_SET_WARNINGS_AS_ERRORS
 724 WARNINGS_AS_ERRORS
 725 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 726 ZERO_ARCHFLAG
 727 LDFLAGS_TESTEXE
 728 LDFLAGS_TESTLIB
 729 CXXFLAGS_TESTEXE
 730 CXXFLAGS_TESTLIB
 731 CFLAGS_TESTEXE
 732 CFLAGS_TESTLIB
 733 OPENJDK_BUILD_JVM_LIBS
 734 OPENJDK_BUILD_JVM_ASFLAGS
 735 OPENJDK_BUILD_JVM_LDFLAGS
 736 OPENJDK_BUILD_JVM_CFLAGS
 737 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 738 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 739 OPENJDK_BUILD_JDKEXE_LIBS
 740 OPENJDK_BUILD_JDKLIB_LIBS
 741 OPENJDK_BUILD_LDFLAGS_JDKEXE
 742 OPENJDK_BUILD_LDFLAGS_JDKLIB
 743 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 744 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 745 OPENJDK_BUILD_CFLAGS_JDKEXE
 746 OPENJDK_BUILD_CFLAGS_JDKLIB
 747 OPENJDK_BUILD_CXXSTD_CXXFLAG
 748 JVM_LIBS
 749 JVM_ASFLAGS
 750 JVM_LDFLAGS
 751 JVM_CFLAGS
 752 LDFLAGS_HASH_STYLE
 753 LDFLAGS_CXX_JDK
 754 JDKEXE_LIBS
 755 JDKLIB_LIBS
 756 LDFLAGS_JDKEXE
 757 LDFLAGS_JDKLIB
 758 CXXFLAGS_JDKEXE
 759 CXXFLAGS_JDKLIB
 760 CFLAGS_JDKEXE
 761 CFLAGS_JDKLIB
 762 MACOSX_VERSION_MIN
 763 NO_LIFETIME_DSE_CFLAG
 764 NO_NULL_POINTER_CHECK_CFLAG
 765 CXXSTD_CXXFLAG
 766 CXX_O_FLAG_SIZE
 767 CXX_O_FLAG_NONE
 768 CXX_O_FLAG_DEBUG
 769 CXX_O_FLAG_NORM
 770 CXX_O_FLAG_HI
 771 CXX_O_FLAG_HIGHEST
 772 CXX_O_FLAG_HIGHEST_JVM
 773 C_O_FLAG_SIZE
 774 C_O_FLAG_NONE
 775 C_O_FLAG_DEBUG
 776 C_O_FLAG_NORM
 777 C_O_FLAG_HI
 778 C_O_FLAG_HIGHEST
 779 C_O_FLAG_HIGHEST_JVM
 780 JVM_CFLAGS_SYMBOLS
 781 CXXFLAGS_DEBUG_SYMBOLS
 782 CFLAGS_DEBUG_SYMBOLS
 783 CXX_FLAG_DEPS
 784 C_FLAG_DEPS
 785 SHARED_LIBRARY_FLAGS
 786 SET_SHARED_LIBRARY_MAPFILE
 787 SET_SHARED_LIBRARY_NAME
 788 SET_SHARED_LIBRARY_ORIGIN
 789 SET_EXECUTABLE_ORIGIN
 790 CXX_FLAG_REORDER
 791 C_FLAG_REORDER
 792 JVM_RCFLAGS
 793 RC_FLAGS
 794 AR_OUT_OPTION
 795 LD_OUT_OPTION
 796 EXE_OUT_OPTION
 797 CC_OUT_OPTION
 798 STRIPFLAGS
 799 ARFLAGS
 800 COMPILER_BINDCMD_FILE_FLAG
 801 COMPILER_COMMAND_FILE_FLAG
 802 COMPILER_TARGET_BITS_FLAG
 803 JT_HOME
 804 JTREGEXE
 805 HOTSPOT_TOOLCHAIN_TYPE
 806 USING_BROKEN_SUSE_LD
 807 PACKAGE_PATH
 808 USE_CLANG
 809 HOTSPOT_LD
 810 HOTSPOT_CXX
 811 HOTSPOT_RC
 812 HOTSPOT_MT
 813 BUILD_AS
 814 BUILD_LDCXX
 815 BUILD_LD
 816 BUILD_STRIP
 817 BUILD_OBJCOPY
 818 BUILD_AR
 819 BUILD_NM
 820 BUILD_CXX
 821 BUILD_CC
 822 BUILD_SYSROOT_LDFLAGS
 823 BUILD_SYSROOT_CFLAGS
 824 ac_ct_OBJDUMP
 825 OBJDUMP
 826 ac_ct_OBJCOPY
 827 OBJCOPY
 828 ac_ct_NM
 829 ac_ct_STRIP
 830 GNM
 831 NM
 832 STRIP
 833 MSBUILD
 834 DUMPBIN
 835 RC
 836 MT
 837 LIPO
 838 ac_ct_AR
 839 AR
 840 AS
 841 LDCXX
 842 LD
 843 CXXCPP
 844 CPP
 845 CXX_VERSION_NUMBER
 846 CC_VERSION_NUMBER
 847 ac_ct_CXX
 848 CXXFLAGS
 849 CXX
 850 TOOLCHAIN_PATH_CXX
 851 POTENTIAL_CXX
 852 OBJEXT
 853 EXEEXT
 854 ac_ct_CC
 855 CPPFLAGS
 856 LDFLAGS
 857 CFLAGS
 858 CC
 859 TOOLCHAIN_PATH_CC
 860 POTENTIAL_CC
 861 TOOLCHAIN_VERSION
 862 VS_LIB
 863 VS_INCLUDE
 864 VS_PATH
 865 CYGWIN_LINK
 866 SYSROOT_LDFLAGS
 867 SYSROOT_CFLAGS
 868 EXTRA_LDFLAGS
 869 EXTRA_CXXFLAGS
 870 EXTRA_CFLAGS
 871 LEGACY_EXTRA_LDFLAGS
 872 LEGACY_EXTRA_CXXFLAGS
 873 LEGACY_EXTRA_CFLAGS
 874 EXE_SUFFIX
 875 OBJ_SUFFIX
 876 STATIC_LIBRARY
 877 SHARED_LIBRARY
 878 STATIC_LIBRARY_SUFFIX
 879 SHARED_LIBRARY_SUFFIX
 880 LIBRARY_PREFIX
 881 TOOLCHAIN_TYPE
 882 STATIC_BUILD
 883 IMPORT_MODULES_MAKE
 884 IMPORT_MODULES_SRC
 885 IMPORT_MODULES_CONF
 886 IMPORT_MODULES_LIBS
 887 IMPORT_MODULES_CMDS
 888 IMPORT_MODULES_CLASSES
 889 BUILD_HOTSPOT
 890 HOTSPOT_DIST
 891 BUILD_OUTPUT
 892 JDK_TOPDIR
 893 NASHORN_TOPDIR
 894 HOTSPOT_TOPDIR
 895 JAXWS_TOPDIR
 896 JAXP_TOPDIR
 897 CORBA_TOPDIR
 898 LANGTOOLS_TOPDIR
 899 EXTERNAL_BUILDJDK
 900 BUILD_JDK
 901 CREATE_BUILDJDK
 902 JLINK
 903 JMOD
 904 BOOT_JDK_BITS
 905 JAVAC_FLAGS
 906 BOOT_JDK_MODULAR
 907 BOOT_JDK_SOURCETARGET
 908 JARSIGNER
 909 JAR
 910 JAVAH
 911 JAVAC
 912 JAVA
 913 BOOT_JDK
 914 JAVA_CHECK
 915 JAVAC_CHECK
 916 VERSION_IS_GA
 917 VERSION_SHORT
 918 VERSION_STRING
 919 VERSION_NUMBER_FOUR_POSITIONS
 920 VERSION_NUMBER
 921 VERSION_OPT
 922 VERSION_BUILD
 923 VERSION_PRE
 924 VERSION_PATCH
 925 VERSION_SECURITY
 926 VERSION_MINOR
 927 VERSION_MAJOR
 928 MACOSX_BUNDLE_ID_BASE
 929 MACOSX_BUNDLE_NAME_BASE
 930 HOTSPOT_VM_DISTRO
 931 COMPANY_NAME
 932 JDK_RC_PLATFORM_NAME
 933 PRODUCT_SUFFIX
 934 PRODUCT_NAME
 935 LAUNCHER_NAME
 936 JLINK_KEEP_PACKAGED_MODULES
 937 COPYRIGHT_YEAR
 938 COMPRESS_JARS
 939 INCLUDE_SA
 940 UNLIMITED_CRYPTO
 941 CACERTS_FILE
 942 BUILD_HEADLESS
 943 SUPPORT_HEADFUL
 944 SUPPORT_HEADLESS
 945 DEFAULT_MAKE_TARGET
 946 OS_VERSION_MICRO
 947 OS_VERSION_MINOR
 948 OS_VERSION_MAJOR
 949 PKG_CONFIG
 950 BASH_ARGS
 951 SETFILE
 952 CODESIGN
 953 XATTR
 954 DSYMUTIL
 955 IS_GNU_TIME
 956 PATCH
 957 DTRACE
 958 TIME
 959 STAT
 960 HG
 961 READELF
 962 OTOOL
 963 LDD
 964 ZIP
 965 UNZIP
 966 FIND_DELETE
 967 OUTPUT_SYNC
 968 OUTPUT_SYNC_SUPPORTED
 969 CHECK_TOOLSDIR_MAKE
 970 CHECK_TOOLSDIR_GMAKE
 971 CHECK_MAKE
 972 CHECK_GMAKE
 973 MAKE
 974 PKGHANDLER
 975 CONFIGURESUPPORT_OUTPUTDIR
 976 OUTPUT_ROOT
 977 CONF_NAME
 978 SPEC
 979 SDKROOT
 980 XCODEBUILD
 981 VALID_JVM_VARIANTS
 982 JVM_VARIANTS
 983 DEBUG_LEVEL
 984 HOTSPOT_DEBUG_LEVEL
 985 JDK_VARIANT
 986 SET_OPENJDK
 987 USERNAME
 988 CANONICAL_TOPDIR
 989 ORIGINAL_TOPDIR
 990 TOPDIR
 991 PATH_SEP
 992 ZERO_ARCHDEF
 993 HOTSPOT_BUILD_CPU_DEFINE
 994 HOTSPOT_BUILD_CPU_ARCH
 995 HOTSPOT_BUILD_CPU
 996 HOTSPOT_BUILD_OS_TYPE
 997 HOTSPOT_BUILD_OS
 998 OPENJDK_BUILD_OS_EXPORT_DIR
 999 OPENJDK_BUILD_CPU_JLI_CFLAGS
1000 OPENJDK_BUILD_CPU_OSARCH
1001 OPENJDK_BUILD_CPU_ISADIR
1002 OPENJDK_BUILD_CPU_LIBDIR
1003 OPENJDK_BUILD_CPU_LEGACY_LIB
1004 OPENJDK_BUILD_CPU_LEGACY
1005 HOTSPOT_TARGET_CPU_DEFINE
1006 HOTSPOT_TARGET_CPU_ARCH
1007 HOTSPOT_TARGET_CPU
1008 HOTSPOT_TARGET_OS_TYPE
1009 HOTSPOT_TARGET_OS
1010 DEFINE_CROSS_COMPILE_ARCH
1011 LP64
1012 OPENJDK_TARGET_OS_EXPORT_DIR
1013 OPENJDK_TARGET_CPU_JLI_CFLAGS
1014 OPENJDK_TARGET_CPU_OSARCH
1015 OPENJDK_TARGET_CPU_ISADIR
1016 OPENJDK_TARGET_CPU_LIBDIR
1017 OPENJDK_TARGET_CPU_LEGACY_LIB
1018 OPENJDK_TARGET_CPU_LEGACY
1019 REQUIRED_OS_VERSION
1020 REQUIRED_OS_NAME
1021 COMPILE_TYPE
1022 OPENJDK_TARGET_CPU_ENDIAN
1023 OPENJDK_TARGET_CPU_BITS
1024 OPENJDK_TARGET_CPU_ARCH
1025 OPENJDK_TARGET_CPU
1026 OPENJDK_TARGET_OS_ENV
1027 OPENJDK_TARGET_OS_TYPE
1028 OPENJDK_TARGET_OS
1029 OPENJDK_BUILD_CPU_ENDIAN
1030 OPENJDK_BUILD_CPU_BITS
1031 OPENJDK_BUILD_CPU_ARCH
1032 OPENJDK_BUILD_CPU
1033 OPENJDK_BUILD_OS_ENV
1034 OPENJDK_BUILD_OS_TYPE
1035 OPENJDK_BUILD_OS
1036 OPENJDK_BUILD_AUTOCONF_NAME
1037 OPENJDK_TARGET_AUTOCONF_NAME
1038 target_os
1039 target_vendor
1040 target_cpu
1041 target
1042 host_os
1043 host_vendor
1044 host_cpu
1045 host
1046 build_os
1047 build_vendor
1048 build_cpu
1049 build
1050 NICE
1051 CPIO
1052 DF
1053 READLINK
1054 CYGPATH
1055 SED
1056 FGREP
1057 EGREP
1058 GREP
1059 AWK
1060 XARGS
1061 WHICH
1062 WC
1063 UNIQ
1064 UNAME
1065 TR
1066 TOUCH
1067 TEE
1068 TAR
1069 TAIL
1070 SORT
1071 SH
1072 RMDIR
1073 RM
1074 PRINTF
1075 NAWK
1076 MV
1077 MKTEMP
1078 MKDIR
1079 LS
1080 LN
1081 HEAD
1082 FIND
1083 FILE
1084 EXPR
1085 ECHO
1086 DIRNAME
1087 DIFF
1088 DATE
1089 CUT
1090 CP
1091 COMM
1092 CMP
1093 CHMOD
1094 CAT
1095 BASH
1096 BASENAME
1097 DATE_WHEN_CONFIGURED
1098 ORIGINAL_PATH
1099 CONFIGURE_COMMAND_LINE
1100 target_alias
1101 host_alias
1102 build_alias
1103 LIBS
1104 ECHO_T
1105 ECHO_N
1106 ECHO_C
1107 DEFS
1108 mandir
1109 localedir
1110 libdir
1111 psdir
1112 pdfdir
1113 dvidir
1114 htmldir
1115 infodir
1116 docdir
1117 oldincludedir
1118 includedir
1119 localstatedir
1120 sharedstatedir
1121 sysconfdir
1122 datadir
1123 datarootdir
1124 libexecdir
1125 sbindir
1126 bindir
1127 program_transform_name
1128 prefix
1129 exec_prefix
1130 PACKAGE_URL
1131 PACKAGE_BUGREPORT
1132 PACKAGE_STRING
1133 PACKAGE_VERSION
1134 PACKAGE_TARNAME
1135 PACKAGE_NAME
1136 PATH_SEPARATOR
1137 SHELL'
1138 ac_subst_files=''
1139 ac_user_opts='
1140 enable_option_checking
1141 with_target_bits
1142 enable_openjdk_only
1143 with_custom_make_dir
1144 with_jdk_variant
1145 enable_debug
1146 with_debug_level
1147 with_jvm_variants
1148 with_devkit
1149 with_sys_root
1150 with_sysroot
1151 with_tools_dir
1152 with_toolchain_path
1153 with_extra_path
1154 with_sdk_name
1155 with_conf_name
1156 with_output_sync
1157 with_default_make_target
1158 enable_headful
1159 with_cacerts_file
1160 enable_unlimited_crypto
1161 with_copyright_year
1162 enable_keep_packaged_modules
1163 with_milestone
1164 with_update_version
1165 with_user_release_suffix
1166 with_build_number
1167 with_version_string
1168 with_version_pre
1169 with_version_opt
1170 with_version_build
1171 with_version_major
1172 with_version_minor
1173 with_version_security
1174 with_version_patch
1175 with_boot_jdk
1176 with_build_jdk
1177 with_add_source_root
1178 with_override_source_root
1179 with_adds_and_overrides
1180 with_override_langtools
1181 with_override_corba
1182 with_override_jaxp
1183 with_override_jaxws
1184 with_override_hotspot
1185 with_override_nashorn
1186 with_override_jdk
1187 with_import_hotspot
1188 with_import_modules
1189 enable_static_build
1190 with_toolchain_type
1191 with_extra_cflags
1192 with_extra_cxxflags
1193 with_extra_ldflags
1194 with_toolchain_version
1195 with_build_devkit
1196 with_jtreg
1197 enable_warnings_as_errors
1198 with_native_debug_symbols
1199 enable_debug_symbols
1200 enable_zip_debug_info
1201 enable_native_coverage
1202 enable_dtrace
1203 with_jvm_features
1204 with_jvm_interpreter
1205 with_stdc__lib
1206 with_msvcr_dll
1207 with_msvcp_dll
1208 with_x
1209 with_cups
1210 with_cups_include
1211 with_freetype
1212 with_freetype_include
1213 with_freetype_lib
1214 with_freetype_src
1215 enable_freetype_bundling
1216 with_alsa
1217 with_alsa_include
1218 with_alsa_lib
1219 with_libffi
1220 with_libffi_include
1221 with_libffi_lib
1222 with_libjpeg
1223 with_giflib
1224 with_libpng
1225 with_zlib
1226 with_lcms
1227 with_dxsdk
1228 with_dxsdk_lib
1229 with_dxsdk_include
1230 enable_new_hotspot_build
1231 enable_hotspot_test_in_build
1232 enable_jtreg_failure_handler
1233 with_num_cores
1234 with_memory_size
1235 with_jobs
1236 with_test_jobs
1237 with_boot_jdk_jvmargs
1238 with_sjavac_server_java
1239 enable_sjavac
1240 enable_javac_server
1241 enable_icecc
1242 enable_precompiled_headers
1243 enable_ccache
1244 with_ccache_dir
1245 '
1246       ac_precious_vars='build_alias
1247 host_alias
1248 target_alias
1249 BASENAME
1250 BASH
1251 CAT
1252 CHMOD
1253 CMP
1254 COMM
1255 CP
1256 CUT
1257 DATE
1258 DIFF
1259 DIRNAME
1260 ECHO
1261 EXPR
1262 FILE
1263 FIND
1264 HEAD
1265 LN
1266 LS
1267 MKDIR
1268 MKTEMP
1269 MV
1270 NAWK
1271 PRINTF
1272 RM
1273 RMDIR
1274 SH
1275 SORT
1276 TAIL
1277 TAR
1278 TEE
1279 TOUCH
1280 TR
1281 UNAME
1282 UNIQ
1283 WC
1284 WHICH
1285 XARGS
1286 AWK
1287 GREP
1288 EGREP
1289 FGREP
1290 SED
1291 CYGPATH
1292 READLINK
1293 DF
1294 CPIO
1295 NICE
1296 MAKE
1297 UNZIP
1298 ZIP
1299 LDD
1300 OTOOL
1301 READELF
1302 HG
1303 STAT
1304 TIME
1305 DTRACE
1306 PATCH
1307 DSYMUTIL
1308 XATTR
1309 CODESIGN
1310 SETFILE
1311 PKG_CONFIG
1312 JAVA
1313 JAVAC
1314 JAVAH
1315 JAR
1316 JARSIGNER
1317 CC
1318 CFLAGS
1319 LDFLAGS
1320 LIBS
1321 CPPFLAGS
1322 CXX
1323 CXXFLAGS
1324 CCC
1325 CPP
1326 CXXCPP
1327 AS
1328 AR
1329 LIPO
1330 STRIP
1331 NM
1332 GNM
1333 OBJCOPY
1334 OBJDUMP
1335 BUILD_CC
1336 BUILD_CXX
1337 BUILD_NM
1338 BUILD_AR
1339 BUILD_OBJCOPY
1340 BUILD_STRIP
1341 JTREGEXE
1342 XMKMF
1343 FREETYPE_CFLAGS
1344 FREETYPE_LIBS
1345 ALSA_CFLAGS
1346 ALSA_LIBS
1347 LIBFFI_CFLAGS
1348 LIBFFI_LIBS
1349 PNG_CFLAGS
1350 PNG_LIBS
1351 LCMS_CFLAGS
1352 LCMS_LIBS
1353 ICECC_CMD
1354 ICECC_CREATE_ENV
1355 ICECC_WRAPPER
1356 CCACHE'
1357 
1358 
1359 # Initialize some variables set by options.
1360 ac_init_help=
1361 ac_init_version=false
1362 ac_unrecognized_opts=
1363 ac_unrecognized_sep=
1364 # The variables have the same names as the options, with
1365 # dashes changed to underlines.
1366 cache_file=/dev/null
1367 exec_prefix=NONE
1368 no_create=
1369 no_recursion=
1370 prefix=NONE
1371 program_prefix=NONE
1372 program_suffix=NONE
1373 program_transform_name=s,x,x,
1374 silent=
1375 site=
1376 srcdir=
1377 verbose=
1378 x_includes=NONE
1379 x_libraries=NONE
1380 
1381 # Installation directory options.
1382 # These are left unexpanded so users can "make install exec_prefix=/foo"
1383 # and all the variables that are supposed to be based on exec_prefix
1384 # by default will actually change.
1385 # Use braces instead of parens because sh, perl, etc. also accept them.
1386 # (The list follows the same order as the GNU Coding Standards.)
1387 bindir='${exec_prefix}/bin'
1388 sbindir='${exec_prefix}/sbin'
1389 libexecdir='${exec_prefix}/libexec'
1390 datarootdir='${prefix}/share'
1391 datadir='${datarootdir}'
1392 sysconfdir='${prefix}/etc'
1393 sharedstatedir='${prefix}/com'
1394 localstatedir='${prefix}/var'
1395 includedir='${prefix}/include'
1396 oldincludedir='/usr/include'
1397 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398 infodir='${datarootdir}/info'
1399 htmldir='${docdir}'
1400 dvidir='${docdir}'
1401 pdfdir='${docdir}'
1402 psdir='${docdir}'
1403 libdir='${exec_prefix}/lib'
1404 localedir='${datarootdir}/locale'
1405 mandir='${datarootdir}/man'
1406 
1407 ac_prev=
1408 ac_dashdash=
1409 for ac_option
1410 do
1411   # If the previous option needs an argument, assign it.
1412   if test -n "$ac_prev"; then
1413     eval $ac_prev=\$ac_option
1414     ac_prev=
1415     continue
1416   fi
1417 
1418   case $ac_option in
1419   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420   *=)   ac_optarg= ;;
1421   *)    ac_optarg=yes ;;
1422   esac
1423 
1424   # Accept the important Cygnus configure options, so we can diagnose typos.
1425 
1426   case $ac_dashdash$ac_option in
1427   --)
1428     ac_dashdash=yes ;;
1429 
1430   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431     ac_prev=bindir ;;
1432   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433     bindir=$ac_optarg ;;
1434 
1435   -build | --build | --buil | --bui | --bu)
1436     ac_prev=build_alias ;;
1437   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438     build_alias=$ac_optarg ;;
1439 
1440   -cache-file | --cache-file | --cache-fil | --cache-fi \
1441   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442     ac_prev=cache_file ;;
1443   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445     cache_file=$ac_optarg ;;
1446 
1447   --config-cache | -C)
1448     cache_file=config.cache ;;
1449 
1450   -datadir | --datadir | --datadi | --datad)
1451     ac_prev=datadir ;;
1452   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453     datadir=$ac_optarg ;;
1454 
1455   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456   | --dataroo | --dataro | --datar)
1457     ac_prev=datarootdir ;;
1458   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460     datarootdir=$ac_optarg ;;
1461 
1462   -disable-* | --disable-*)
1463     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464     # Reject names that are not valid shell variable names.
1465     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466       as_fn_error $? "invalid feature name: $ac_useropt"
1467     ac_useropt_orig=$ac_useropt
1468     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469     case $ac_user_opts in
1470       *"
1471 "enable_$ac_useropt"
1472 "*) ;;
1473       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474          ac_unrecognized_sep=', ';;
1475     esac
1476     eval enable_$ac_useropt=no ;;
1477 
1478   -docdir | --docdir | --docdi | --doc | --do)
1479     ac_prev=docdir ;;
1480   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481     docdir=$ac_optarg ;;
1482 
1483   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484     ac_prev=dvidir ;;
1485   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486     dvidir=$ac_optarg ;;
1487 
1488   -enable-* | --enable-*)
1489     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490     # Reject names that are not valid shell variable names.
1491     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492       as_fn_error $? "invalid feature name: $ac_useropt"
1493     ac_useropt_orig=$ac_useropt
1494     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495     case $ac_user_opts in
1496       *"
1497 "enable_$ac_useropt"
1498 "*) ;;
1499       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500          ac_unrecognized_sep=', ';;
1501     esac
1502     eval enable_$ac_useropt=\$ac_optarg ;;
1503 
1504   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506   | --exec | --exe | --ex)
1507     ac_prev=exec_prefix ;;
1508   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510   | --exec=* | --exe=* | --ex=*)
1511     exec_prefix=$ac_optarg ;;
1512 
1513   -gas | --gas | --ga | --g)
1514     # Obsolete; use --with-gas.
1515     with_gas=yes ;;
1516 
1517   -help | --help | --hel | --he | -h)
1518     ac_init_help=long ;;
1519   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520     ac_init_help=recursive ;;
1521   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522     ac_init_help=short ;;
1523 
1524   -host | --host | --hos | --ho)
1525     ac_prev=host_alias ;;
1526   -host=* | --host=* | --hos=* | --ho=*)
1527     host_alias=$ac_optarg ;;
1528 
1529   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530     ac_prev=htmldir ;;
1531   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532   | --ht=*)
1533     htmldir=$ac_optarg ;;
1534 
1535   -includedir | --includedir | --includedi | --included | --include \
1536   | --includ | --inclu | --incl | --inc)
1537     ac_prev=includedir ;;
1538   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539   | --includ=* | --inclu=* | --incl=* | --inc=*)
1540     includedir=$ac_optarg ;;
1541 
1542   -infodir | --infodir | --infodi | --infod | --info | --inf)
1543     ac_prev=infodir ;;
1544   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545     infodir=$ac_optarg ;;
1546 
1547   -libdir | --libdir | --libdi | --libd)
1548     ac_prev=libdir ;;
1549   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550     libdir=$ac_optarg ;;
1551 
1552   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553   | --libexe | --libex | --libe)
1554     ac_prev=libexecdir ;;
1555   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556   | --libexe=* | --libex=* | --libe=*)
1557     libexecdir=$ac_optarg ;;
1558 
1559   -localedir | --localedir | --localedi | --localed | --locale)
1560     ac_prev=localedir ;;
1561   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562     localedir=$ac_optarg ;;
1563 
1564   -localstatedir | --localstatedir | --localstatedi | --localstated \
1565   | --localstate | --localstat | --localsta | --localst | --locals)
1566     ac_prev=localstatedir ;;
1567   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569     localstatedir=$ac_optarg ;;
1570 
1571   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572     ac_prev=mandir ;;
1573   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574     mandir=$ac_optarg ;;
1575 
1576   -nfp | --nfp | --nf)
1577     # Obsolete; use --without-fp.
1578     with_fp=no ;;
1579 
1580   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581   | --no-cr | --no-c | -n)
1582     no_create=yes ;;
1583 
1584   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586     no_recursion=yes ;;
1587 
1588   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590   | --oldin | --oldi | --old | --ol | --o)
1591     ac_prev=oldincludedir ;;
1592   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595     oldincludedir=$ac_optarg ;;
1596 
1597   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598     ac_prev=prefix ;;
1599   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600     prefix=$ac_optarg ;;
1601 
1602   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603   | --program-pre | --program-pr | --program-p)
1604     ac_prev=program_prefix ;;
1605   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607     program_prefix=$ac_optarg ;;
1608 
1609   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610   | --program-suf | --program-su | --program-s)
1611     ac_prev=program_suffix ;;
1612   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614     program_suffix=$ac_optarg ;;
1615 
1616   -program-transform-name | --program-transform-name \
1617   | --program-transform-nam | --program-transform-na \
1618   | --program-transform-n | --program-transform- \
1619   | --program-transform | --program-transfor \
1620   | --program-transfo | --program-transf \
1621   | --program-trans | --program-tran \
1622   | --progr-tra | --program-tr | --program-t)
1623     ac_prev=program_transform_name ;;
1624   -program-transform-name=* | --program-transform-name=* \
1625   | --program-transform-nam=* | --program-transform-na=* \
1626   | --program-transform-n=* | --program-transform-=* \
1627   | --program-transform=* | --program-transfor=* \
1628   | --program-transfo=* | --program-transf=* \
1629   | --program-trans=* | --program-tran=* \
1630   | --progr-tra=* | --program-tr=* | --program-t=*)
1631     program_transform_name=$ac_optarg ;;
1632 
1633   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634     ac_prev=pdfdir ;;
1635   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636     pdfdir=$ac_optarg ;;
1637 
1638   -psdir | --psdir | --psdi | --psd | --ps)
1639     ac_prev=psdir ;;
1640   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641     psdir=$ac_optarg ;;
1642 
1643   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644   | -silent | --silent | --silen | --sile | --sil)
1645     silent=yes ;;
1646 
1647   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648     ac_prev=sbindir ;;
1649   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650   | --sbi=* | --sb=*)
1651     sbindir=$ac_optarg ;;
1652 
1653   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655   | --sharedst | --shareds | --shared | --share | --shar \
1656   | --sha | --sh)
1657     ac_prev=sharedstatedir ;;
1658   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661   | --sha=* | --sh=*)
1662     sharedstatedir=$ac_optarg ;;
1663 
1664   -site | --site | --sit)
1665     ac_prev=site ;;
1666   -site=* | --site=* | --sit=*)
1667     site=$ac_optarg ;;
1668 
1669   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670     ac_prev=srcdir ;;
1671   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672     srcdir=$ac_optarg ;;
1673 
1674   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675   | --syscon | --sysco | --sysc | --sys | --sy)
1676     ac_prev=sysconfdir ;;
1677   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679     sysconfdir=$ac_optarg ;;
1680 
1681   -target | --target | --targe | --targ | --tar | --ta | --t)
1682     ac_prev=target_alias ;;
1683   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684     target_alias=$ac_optarg ;;
1685 
1686   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687     verbose=yes ;;
1688 
1689   -version | --version | --versio | --versi | --vers | -V)
1690     ac_init_version=: ;;
1691 
1692   -with-* | --with-*)
1693     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694     # Reject names that are not valid shell variable names.
1695     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696       as_fn_error $? "invalid package name: $ac_useropt"
1697     ac_useropt_orig=$ac_useropt
1698     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699     case $ac_user_opts in
1700       *"
1701 "with_$ac_useropt"
1702 "*) ;;
1703       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704          ac_unrecognized_sep=', ';;
1705     esac
1706     eval with_$ac_useropt=\$ac_optarg ;;
1707 
1708   -without-* | --without-*)
1709     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710     # Reject names that are not valid shell variable names.
1711     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712       as_fn_error $? "invalid package name: $ac_useropt"
1713     ac_useropt_orig=$ac_useropt
1714     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715     case $ac_user_opts in
1716       *"
1717 "with_$ac_useropt"
1718 "*) ;;
1719       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720          ac_unrecognized_sep=', ';;
1721     esac
1722     eval with_$ac_useropt=no ;;
1723 
1724   --x)
1725     # Obsolete; use --with-x.
1726     with_x=yes ;;
1727 
1728   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729   | --x-incl | --x-inc | --x-in | --x-i)
1730     ac_prev=x_includes ;;
1731   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733     x_includes=$ac_optarg ;;
1734 
1735   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737     ac_prev=x_libraries ;;
1738   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740     x_libraries=$ac_optarg ;;
1741 
1742   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743 Try \`$0 --help' for more information"
1744     ;;
1745 
1746   *=*)
1747     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748     # Reject names that are not valid shell variable names.
1749     case $ac_envvar in #(
1750       '' | [0-9]* | *[!_$as_cr_alnum]* )
1751       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752     esac
1753     eval $ac_envvar=\$ac_optarg
1754     export $ac_envvar ;;
1755 
1756   *)
1757     # FIXME: should be removed in autoconf 3.0.
1758     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762     ;;
1763 
1764   esac
1765 done
1766 
1767 if test -n "$ac_prev"; then
1768   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769   as_fn_error $? "missing argument to $ac_option"
1770 fi
1771 
1772 if test -n "$ac_unrecognized_opts"; then
1773   case $enable_option_checking in
1774     no) ;;
1775     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777   esac
1778 fi
1779 
1780 # Check all directory arguments for consistency.
1781 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782                 datadir sysconfdir sharedstatedir localstatedir includedir \
1783                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784                 libdir localedir mandir
1785 do
1786   eval ac_val=\$$ac_var
1787   # Remove trailing slashes.
1788   case $ac_val in
1789     */ )
1790       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791       eval $ac_var=\$ac_val;;
1792   esac
1793   # Be sure to have absolute directory names.
1794   case $ac_val in
1795     [\\/$]* | ?:[\\/]* )  continue;;
1796     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797   esac
1798   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799 done
1800 
1801 # There might be people who depend on the old broken behavior: `$host'
1802 # used to hold the argument of --host etc.
1803 # FIXME: To remove some day.
1804 build=$build_alias
1805 host=$host_alias
1806 target=$target_alias
1807 
1808 # FIXME: To remove some day.
1809 if test "x$host_alias" != x; then
1810   if test "x$build_alias" = x; then
1811     cross_compiling=maybe
1812   elif test "x$build_alias" != "x$host_alias"; then
1813     cross_compiling=yes
1814   fi
1815 fi
1816 
1817 ac_tool_prefix=
1818 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819 
1820 test "$silent" = yes && exec 6>/dev/null
1821 
1822 
1823 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824 ac_ls_di=`ls -di .` &&
1825 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826   as_fn_error $? "working directory cannot be determined"
1827 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828   as_fn_error $? "pwd does not report name of working directory"
1829 
1830 
1831 # Find the source files, if location was not specified.
1832 if test -z "$srcdir"; then
1833   ac_srcdir_defaulted=yes
1834   # Try the directory containing this script, then the parent directory.
1835   ac_confdir=`$as_dirname -- "$as_myself" ||
1836 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837          X"$as_myself" : 'X\(//\)[^/]' \| \
1838          X"$as_myself" : 'X\(//\)$' \| \
1839          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840 $as_echo X"$as_myself" |
1841     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842             s//\1/
1843             q
1844           }
1845           /^X\(\/\/\)[^/].*/{
1846             s//\1/
1847             q
1848           }
1849           /^X\(\/\/\)$/{
1850             s//\1/
1851             q
1852           }
1853           /^X\(\/\).*/{
1854             s//\1/
1855             q
1856           }
1857           s/.*/./; q'`
1858   srcdir=$ac_confdir
1859   if test ! -r "$srcdir/$ac_unique_file"; then
1860     srcdir=..
1861   fi
1862 else
1863   ac_srcdir_defaulted=no
1864 fi
1865 if test ! -r "$srcdir/$ac_unique_file"; then
1866   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868 fi
1869 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870 ac_abs_confdir=`(
1871         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872         pwd)`
1873 # When building in place, set srcdir=.
1874 if test "$ac_abs_confdir" = "$ac_pwd"; then
1875   srcdir=.
1876 fi
1877 # Remove unnecessary trailing slashes from srcdir.
1878 # Double slashes in file names in object file debugging info
1879 # mess up M-x gdb in Emacs.
1880 case $srcdir in
1881 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882 esac
1883 for ac_var in $ac_precious_vars; do
1884   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885   eval ac_env_${ac_var}_value=\$${ac_var}
1886   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888 done
1889 
1890 #
1891 # Report the --help message.
1892 #
1893 if test "$ac_init_help" = "long"; then
1894   # Omit some internal or obsolete options to make the list less imposing.
1895   # This message is too long to be a string in the A/UX 3.1 sh.
1896   cat <<_ACEOF
1897 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898 
1899 Usage: $0 [OPTION]... [VAR=VALUE]...
1900 
1901 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902 VAR=VALUE.  See below for descriptions of some of the useful variables.
1903 
1904 Defaults for the options are specified in brackets.
1905 
1906 Configuration:
1907   -h, --help              display this help and exit
1908       --help=short        display options specific to this package
1909       --help=recursive    display the short help of all the included packages
1910   -V, --version           display version information and exit
1911   -q, --quiet, --silent   do not print \`checking ...' messages
1912       --cache-file=FILE   cache test results in FILE [disabled]
1913   -C, --config-cache      alias for \`--cache-file=config.cache'
1914   -n, --no-create         do not create output files
1915       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916 
1917 Installation directories:
1918   --prefix=PREFIX         install architecture-independent files in PREFIX
1919                           [$ac_default_prefix]
1920   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                           [PREFIX]
1922 
1923 By default, \`make install' will install all the files in
1924 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926 for instance \`--prefix=\$HOME'.
1927 
1928 For better control, use the options below.
1929 
1930 Fine tuning of the installation directories:
1931   --bindir=DIR            user executables [EPREFIX/bin]
1932   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933   --libexecdir=DIR        program executables [EPREFIX/libexec]
1934   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937   --libdir=DIR            object code libraries [EPREFIX/lib]
1938   --includedir=DIR        C header files [PREFIX/include]
1939   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942   --infodir=DIR           info documentation [DATAROOTDIR/info]
1943   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944   --mandir=DIR            man documentation [DATAROOTDIR/man]
1945   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946   --htmldir=DIR           html documentation [DOCDIR]
1947   --dvidir=DIR            dvi documentation [DOCDIR]
1948   --pdfdir=DIR            pdf documentation [DOCDIR]
1949   --psdir=DIR             ps documentation [DOCDIR]
1950 _ACEOF
1951 
1952   cat <<\_ACEOF
1953 
1954 X features:
1955   --x-includes=DIR    X include files are in DIR
1956   --x-libraries=DIR   X library files are in DIR
1957 
1958 System types:
1959   --build=BUILD     configure for building on BUILD [guessed]
1960   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961   --target=TARGET   configure for building compilers for TARGET [HOST]
1962 _ACEOF
1963 fi
1964 
1965 if test -n "$ac_init_help"; then
1966   case $ac_init_help in
1967      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968    esac
1969   cat <<\_ACEOF
1970 
1971 Optional Features:
1972   --disable-option-checking  ignore unrecognized --enable/--with options
1973   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975   --enable-openjdk-only   suppress building custom source even if present
1976                           [disabled]
1977   --enable-debug          set the debug level to fastdebug (shorthand for
1978                           --with-debug-level=fastdebug) [disabled]
1979   --disable-headful       disable building headful support (graphical UI
1980                           support) [enabled]
1981   --enable-unlimited-crypto
1982                           Enable unlimited crypto policy [disabled]
1983   --disable-keep-packaged-modules
1984                           Do not keep packaged modules in jdk image [enable]
1985   --enable-static-build   enable static library build [disabled]
1986   --disable-warnings-as-errors
1987                           do not consider native warnings to be an error
1988                           [enabled]
1989   --enable-debug-symbols  Deprecated. Option is kept for backwards
1990                           compatibility and is ignored
1991   --enable-zip-debug-info Deprecated. Option is kept for backwards
1992                           compatibility and is ignored
1993   --enable-native-coverage
1994                           enable native compilation with code coverage
1995                           data[disabled]
1996   --enable-dtrace[=yes/no/auto]
1997                           enable dtrace. Default is auto, where dtrace is
1998                           enabled if all dependencies are present.
1999   --disable-freetype-bundling
2000                           disable bundling of the freetype library with the
2001                           build result [enabled on Windows or when using
2002                           --with-freetype, disabled otherwise]
2003   --disable-new-hotspot-build
2004                           disable the new hotspot build system (use the old)
2005                           [enabled]
2006   --enable-hotspot-test-in-build
2007                           run the Queens test after Hotspot build [disabled]
2008   --enable-jtreg-failure-handler
2009                           forces build of the jtreg failure handler to be
2010                           enabled, missing dependencies become fatal errors.
2011                           Default is auto, where the failure handler is built
2012                           if all dependencies are present and otherwise just
2013                           disabled.
2014   --enable-sjavac         use sjavac to do fast incremental compiles
2015                           [disabled]
2016   --disable-javac-server  disable javac server [enabled]
2017   --enable-icecc          enable distribted compilation of native code using
2018                           icecc/icecream [disabled]
2019   --disable-precompiled-headers
2020                           disable using precompiled headers when compiling C++
2021                           [enabled]
2022   --enable-ccache         enable using ccache to speed up recompilations
2023                           [disabled]
2024 
2025 Optional Packages:
2026   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2027   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2028   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2029                           support it), e.g. --with-target-bits=32 [guessed]
2030   --with-custom-make-dir  Deprecated. Option is kept for backwards
2031                           compatibility and is ignored
2032   --with-jdk-variant      JDK variant to build (normal) [normal]
2033   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2034                           optimized) [release]
2035   --with-jvm-variants     JVM variants (separated by commas) to build
2036                           (server,client,minimal,core,zero,zeroshark,custom)
2037                           [server]
2038   --with-devkit           use this devkit for compilers, tools and resources
2039   --with-sys-root         alias for --with-sysroot for backwards compatability
2040   --with-sysroot          use this directory as sysroot
2041   --with-tools-dir        alias for --with-toolchain-path for backwards
2042                           compatibility
2043   --with-toolchain-path   prepend these directories when searching for
2044                           toolchain binaries (compilers etc)
2045   --with-extra-path       prepend these directories to the default path
2046   --with-sdk-name         use the platform SDK of the given name. [macosx]
2047   --with-conf-name        use this as the name of the configuration [generated
2048                           from important configuration options]
2049   --with-output-sync      set make output sync type if supported by make.
2050                           [recurse]
2051   --with-default-make-target
2052                           set the default make target [exploded-image]
2053   --with-cacerts-file     specify alternative cacerts file
2054   --with-copyright-year   Set copyright year value for build [current year]
2055   --with-milestone        Deprecated. Option is kept for backwards
2056                           compatibility and is ignored
2057   --with-update-version   Deprecated. Option is kept for backwards
2058                           compatibility and is ignored
2059   --with-user-release-suffix
2060                           Deprecated. Option is kept for backwards
2061                           compatibility and is ignored
2062   --with-build-number     Deprecated. Option is kept for backwards
2063                           compatibility and is ignored
2064   --with-version-string   Set version string [calculated]
2065   --with-version-pre      Set the base part of the version 'PRE' field
2066                           (pre-release identifier) ['internal']
2067   --with-version-opt      Set version 'OPT' field (build metadata)
2068                           [<timestamp>.<user>.<dirname>]
2069   --with-version-build    Set version 'BUILD' field (build number) [not
2070                           specified]
2071   --with-version-major    Set version 'MAJOR' field (first number) [current
2072                           source value]
2073   --with-version-minor    Set version 'MINOR' field (second number) [current
2074                           source value]
2075   --with-version-security Set version 'SECURITY' field (third number) [current
2076                           source value]
2077   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2078                           specified]
2079   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2080   --with-build-jdk        path to JDK of same version as is being built[the
2081                           newly built JDK]
2082   --with-add-source-root  Deprecated. Option is kept for backwards
2083                           compatibility and is ignored
2084   --with-override-source-root
2085                           Deprecated. Option is kept for backwards
2086                           compatibility and is ignored
2087   --with-adds-and-overrides
2088                           Deprecated. Option is kept for backwards
2089                           compatibility and is ignored
2090   --with-override-langtools
2091                           Deprecated. Option is kept for backwards
2092                           compatibility and is ignored
2093   --with-override-corba   Deprecated. Option is kept for backwards
2094                           compatibility and is ignored
2095   --with-override-jaxp    Deprecated. Option is kept for backwards
2096                           compatibility and is ignored
2097   --with-override-jaxws   Deprecated. Option is kept for backwards
2098                           compatibility and is ignored
2099   --with-override-hotspot Deprecated. Option is kept for backwards
2100                           compatibility and is ignored
2101   --with-override-nashorn Deprecated. Option is kept for backwards
2102                           compatibility and is ignored
2103   --with-override-jdk     Deprecated. Option is kept for backwards
2104                           compatibility and is ignored
2105   --with-import-hotspot   import hotspot binaries from this jdk image or
2106                           hotspot build dist dir instead of building from
2107                           source
2108   --with-import-modules   import a set of prebuilt modules either as a zip
2109                           file or an exploded directory
2110   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2111                           to show possible values [platform dependent]
2112   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2113   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2114   --with-extra-ldflags    extra flags to be used when linking jdk
2115   --with-toolchain-version
2116                           the version of the toolchain to look for, use
2117                           '--help' to show possible values [platform
2118                           dependent]
2119   --with-build-devkit     Devkit to use for the build platform toolchain
2120   --with-jtreg            Regression Test Harness [probed]
2121   --with-native-debug-symbols
2122                           set the native debug symbol configuration (none,
2123                           internal, external, zipped) [varying]
2124   --with-jvm-features     additional JVM features to enable (separated by
2125                           comma), use '--help' to show possible values [none]
2126   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2127                           compatibility and is ignored
2128   --with-stdc++lib=<static>,<dynamic>,<default>
2129                           force linking of the C++ runtime on Linux to either
2130                           static or dynamic, default is static with dynamic as
2131                           fallback
2132   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2133                           (Windows only) [probed]
2134   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2135                           (Windows only) [probed]
2136   --with-x                use the X Window System
2137   --with-cups             specify prefix directory for the cups package
2138                           (expecting the headers under PATH/include)
2139   --with-cups-include     specify directory for the cups include files
2140   --with-freetype         specify prefix directory for the freetype package
2141                           (expecting the libraries under PATH/lib and the
2142                           headers under PATH/include)
2143   --with-freetype-include specify directory for the freetype include files
2144   --with-freetype-lib     specify directory for the freetype library
2145   --with-freetype-src     specify directory with freetype sources to
2146                           automatically build the library (experimental,
2147                           Windows-only)
2148   --with-alsa             specify prefix directory for the alsa package
2149                           (expecting the libraries under PATH/lib and the
2150                           headers under PATH/include)
2151   --with-alsa-include     specify directory for the alsa include files
2152   --with-alsa-lib         specify directory for the alsa library
2153   --with-libffi           specify prefix directory for the libffi package
2154                           (expecting the libraries under PATH/lib and the
2155                           headers under PATH/include)
2156   --with-libffi-include   specify directory for the libffi include files
2157   --with-libffi-lib       specify directory for the libffi library
2158   --with-libjpeg          use libjpeg from build system or OpenJDK source
2159                           (system, bundled) [bundled]
2160   --with-giflib           use giflib from build system or OpenJDK source
2161                           (system, bundled) [bundled]
2162   --with-libpng           use libpng from build system or OpenJDK source
2163                           (system, bundled) [bundled]
2164   --with-zlib             use zlib from build system or OpenJDK source
2165                           (system, bundled) [bundled]
2166   --with-lcms             use lcms2 from build system or OpenJDK source
2167                           (system, bundled) [bundled]
2168   --with-dxsdk            Deprecated. Option is kept for backwards
2169                           compatibility and is ignored
2170   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2171                           compatibility and is ignored
2172   --with-dxsdk-include    Deprecated. Option is kept for backwards
2173                           compatibility and is ignored
2174   --with-num-cores        number of cores in the build system, e.g.
2175                           --with-num-cores=8 [probed]
2176   --with-memory-size      memory (in MB) available in the build system, e.g.
2177                           --with-memory-size=1024 [probed]
2178   --with-jobs             number of parallel jobs to let make run [calculated
2179                           based on cores and memory]
2180   --with-test-jobs        number of parallel tests jobs to run [based on build
2181                           jobs]
2182   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2183                           invocations of boot JDK, overriding the default
2184                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2185                           -enableassertions"
2186   --with-sjavac-server-java
2187                           use this java binary for running the sjavac
2188                           background server [Boot JDK java]
2189   --with-ccache-dir       where to store ccache files [~/.ccache]
2190 
2191 Some influential environment variables:
2192   BASENAME    Override default value for BASENAME
2193   BASH        Override default value for BASH
2194   CAT         Override default value for CAT
2195   CHMOD       Override default value for CHMOD
2196   CMP         Override default value for CMP
2197   COMM        Override default value for COMM
2198   CP          Override default value for CP
2199   CUT         Override default value for CUT
2200   DATE        Override default value for DATE
2201   DIFF        Override default value for DIFF
2202   DIRNAME     Override default value for DIRNAME
2203   ECHO        Override default value for ECHO
2204   EXPR        Override default value for EXPR
2205   FILE        Override default value for FILE
2206   FIND        Override default value for FIND
2207   HEAD        Override default value for HEAD
2208   LN          Override default value for LN
2209   LS          Override default value for LS
2210   MKDIR       Override default value for MKDIR
2211   MKTEMP      Override default value for MKTEMP
2212   MV          Override default value for MV
2213   NAWK        Override default value for NAWK
2214   PRINTF      Override default value for PRINTF
2215   RM          Override default value for RM
2216   RMDIR       Override default value for RMDIR
2217   SH          Override default value for SH
2218   SORT        Override default value for SORT
2219   TAIL        Override default value for TAIL
2220   TAR         Override default value for TAR
2221   TEE         Override default value for TEE
2222   TOUCH       Override default value for TOUCH
2223   TR          Override default value for TR
2224   UNAME       Override default value for UNAME
2225   UNIQ        Override default value for UNIQ
2226   WC          Override default value for WC
2227   WHICH       Override default value for WHICH
2228   XARGS       Override default value for XARGS
2229   AWK         Override default value for AWK
2230   GREP        Override default value for GREP
2231   EGREP       Override default value for EGREP
2232   FGREP       Override default value for FGREP
2233   SED         Override default value for SED
2234   CYGPATH     Override default value for CYGPATH
2235   READLINK    Override default value for READLINK
2236   DF          Override default value for DF
2237   CPIO        Override default value for CPIO
2238   NICE        Override default value for NICE
2239   MAKE        Override default value for MAKE
2240   UNZIP       Override default value for UNZIP
2241   ZIP         Override default value for ZIP
2242   LDD         Override default value for LDD
2243   OTOOL       Override default value for OTOOL
2244   READELF     Override default value for READELF
2245   HG          Override default value for HG
2246   STAT        Override default value for STAT
2247   TIME        Override default value for TIME
2248   DTRACE      Override default value for DTRACE
2249   PATCH       Override default value for PATCH
2250   DSYMUTIL    Override default value for DSYMUTIL
2251   XATTR       Override default value for XATTR
2252   CODESIGN    Override default value for CODESIGN
2253   SETFILE     Override default value for SETFILE
2254   PKG_CONFIG  path to pkg-config utility
2255   JAVA        Override default value for JAVA
2256   JAVAC       Override default value for JAVAC
2257   JAVAH       Override default value for JAVAH
2258   JAR         Override default value for JAR
2259   JARSIGNER   Override default value for JARSIGNER
2260   CC          C compiler command
2261   CFLAGS      C compiler flags
2262   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2263               nonstandard directory <lib dir>
2264   LIBS        libraries to pass to the linker, e.g. -l<library>
2265   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2266               you have headers in a nonstandard directory <include dir>
2267   CXX         C++ compiler command
2268   CXXFLAGS    C++ compiler flags
2269   CPP         C preprocessor
2270   CXXCPP      C++ preprocessor
2271   AS          Override default value for AS
2272   AR          Override default value for AR
2273   LIPO        Override default value for LIPO
2274   STRIP       Override default value for STRIP
2275   NM          Override default value for NM
2276   GNM         Override default value for GNM
2277   OBJCOPY     Override default value for OBJCOPY
2278   OBJDUMP     Override default value for OBJDUMP
2279   BUILD_CC    Override default value for BUILD_CC
2280   BUILD_CXX   Override default value for BUILD_CXX
2281   BUILD_NM    Override default value for BUILD_NM
2282   BUILD_AR    Override default value for BUILD_AR
2283   BUILD_OBJCOPY
2284               Override default value for BUILD_OBJCOPY
2285   BUILD_STRIP Override default value for BUILD_STRIP
2286   JTREGEXE    Override default value for JTREGEXE
2287   XMKMF       Path to xmkmf, Makefile generator for X Window System
2288   FREETYPE_CFLAGS
2289               C compiler flags for FREETYPE, overriding pkg-config
2290   FREETYPE_LIBS
2291               linker flags for FREETYPE, overriding pkg-config
2292   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2293   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2294   LIBFFI_CFLAGS
2295               C compiler flags for LIBFFI, overriding pkg-config
2296   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2297   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2298   PNG_LIBS    linker flags for PNG, overriding pkg-config
2299   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2300   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2301   ICECC_CMD   Override default value for ICECC_CMD
2302   ICECC_CREATE_ENV
2303               Override default value for ICECC_CREATE_ENV
2304   ICECC_WRAPPER
2305               Override default value for ICECC_WRAPPER
2306   CCACHE      Override default value for CCACHE
2307 
2308 Use these variables to override the choices made by `configure' or to help
2309 it to find libraries and programs with nonstandard names/locations.
2310 
2311 Report bugs to <build-dev@openjdk.java.net>.
2312 OpenJDK home page: <http://openjdk.java.net>.
2313 _ACEOF
2314 ac_status=$?
2315 fi
2316 
2317 if test "$ac_init_help" = "recursive"; then
2318   # If there are subdirs, report their specific --help.
2319   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2320     test -d "$ac_dir" ||
2321       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2322       continue
2323     ac_builddir=.
2324 
2325 case "$ac_dir" in
2326 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2327 *)
2328   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2329   # A ".." for each directory in $ac_dir_suffix.
2330   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2331   case $ac_top_builddir_sub in
2332   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2333   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2334   esac ;;
2335 esac
2336 ac_abs_top_builddir=$ac_pwd
2337 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2338 # for backward compatibility:
2339 ac_top_builddir=$ac_top_build_prefix
2340 
2341 case $srcdir in
2342   .)  # We are building in place.
2343     ac_srcdir=.
2344     ac_top_srcdir=$ac_top_builddir_sub
2345     ac_abs_top_srcdir=$ac_pwd ;;
2346   [\\/]* | ?:[\\/]* )  # Absolute name.
2347     ac_srcdir=$srcdir$ac_dir_suffix;
2348     ac_top_srcdir=$srcdir
2349     ac_abs_top_srcdir=$srcdir ;;
2350   *) # Relative name.
2351     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2352     ac_top_srcdir=$ac_top_build_prefix$srcdir
2353     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2354 esac
2355 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2356 
2357     cd "$ac_dir" || { ac_status=$?; continue; }
2358     # Check for guested configure.
2359     if test -f "$ac_srcdir/configure.gnu"; then
2360       echo &&
2361       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2362     elif test -f "$ac_srcdir/configure"; then
2363       echo &&
2364       $SHELL "$ac_srcdir/configure" --help=recursive
2365     else
2366       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2367     fi || ac_status=$?
2368     cd "$ac_pwd" || { ac_status=$?; break; }
2369   done
2370 fi
2371 
2372 test -n "$ac_init_help" && exit $ac_status
2373 if $ac_init_version; then
2374   cat <<\_ACEOF
2375 OpenJDK configure jdk9
2376 generated by GNU Autoconf 2.69
2377 
2378 Copyright (C) 2012 Free Software Foundation, Inc.
2379 This configure script is free software; the Free Software Foundation
2380 gives unlimited permission to copy, distribute and modify it.
2381 _ACEOF
2382   exit
2383 fi
2384 
2385 ## ------------------------ ##
2386 ## Autoconf initialization. ##
2387 ## ------------------------ ##
2388 
2389 # ac_fn_c_try_compile LINENO
2390 # --------------------------
2391 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2392 ac_fn_c_try_compile ()
2393 {
2394   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395   rm -f conftest.$ac_objext
2396   if { { ac_try="$ac_compile"
2397 case "(($ac_try" in
2398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2399   *) ac_try_echo=$ac_try;;
2400 esac
2401 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2402 $as_echo "$ac_try_echo"; } >&5
2403   (eval "$ac_compile") 2>conftest.err
2404   ac_status=$?
2405   if test -s conftest.err; then
2406     grep -v '^ *+' conftest.err >conftest.er1
2407     cat conftest.er1 >&5
2408     mv -f conftest.er1 conftest.err
2409   fi
2410   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2411   test $ac_status = 0; } && {
2412          test -z "$ac_c_werror_flag" ||
2413          test ! -s conftest.err
2414        } && test -s conftest.$ac_objext; then :
2415   ac_retval=0
2416 else
2417   $as_echo "$as_me: failed program was:" >&5
2418 sed 's/^/| /' conftest.$ac_ext >&5
2419 
2420         ac_retval=1
2421 fi
2422   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2423   as_fn_set_status $ac_retval
2424 
2425 } # ac_fn_c_try_compile
2426 
2427 # ac_fn_cxx_try_compile LINENO
2428 # ----------------------------
2429 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2430 ac_fn_cxx_try_compile ()
2431 {
2432   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2433   rm -f conftest.$ac_objext
2434   if { { ac_try="$ac_compile"
2435 case "(($ac_try" in
2436   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2437   *) ac_try_echo=$ac_try;;
2438 esac
2439 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2440 $as_echo "$ac_try_echo"; } >&5
2441   (eval "$ac_compile") 2>conftest.err
2442   ac_status=$?
2443   if test -s conftest.err; then
2444     grep -v '^ *+' conftest.err >conftest.er1
2445     cat conftest.er1 >&5
2446     mv -f conftest.er1 conftest.err
2447   fi
2448   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2449   test $ac_status = 0; } && {
2450          test -z "$ac_cxx_werror_flag" ||
2451          test ! -s conftest.err
2452        } && test -s conftest.$ac_objext; then :
2453   ac_retval=0
2454 else
2455   $as_echo "$as_me: failed program was:" >&5
2456 sed 's/^/| /' conftest.$ac_ext >&5
2457 
2458         ac_retval=1
2459 fi
2460   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2461   as_fn_set_status $ac_retval
2462 
2463 } # ac_fn_cxx_try_compile
2464 
2465 # ac_fn_c_try_cpp LINENO
2466 # ----------------------
2467 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2468 ac_fn_c_try_cpp ()
2469 {
2470   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471   if { { ac_try="$ac_cpp conftest.$ac_ext"
2472 case "(($ac_try" in
2473   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2474   *) ac_try_echo=$ac_try;;
2475 esac
2476 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2477 $as_echo "$ac_try_echo"; } >&5
2478   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2479   ac_status=$?
2480   if test -s conftest.err; then
2481     grep -v '^ *+' conftest.err >conftest.er1
2482     cat conftest.er1 >&5
2483     mv -f conftest.er1 conftest.err
2484   fi
2485   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2486   test $ac_status = 0; } > conftest.i && {
2487          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2488          test ! -s conftest.err
2489        }; then :
2490   ac_retval=0
2491 else
2492   $as_echo "$as_me: failed program was:" >&5
2493 sed 's/^/| /' conftest.$ac_ext >&5
2494 
2495     ac_retval=1
2496 fi
2497   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2498   as_fn_set_status $ac_retval
2499 
2500 } # ac_fn_c_try_cpp
2501 
2502 # ac_fn_cxx_try_cpp LINENO
2503 # ------------------------
2504 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2505 ac_fn_cxx_try_cpp ()
2506 {
2507   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2508   if { { ac_try="$ac_cpp conftest.$ac_ext"
2509 case "(($ac_try" in
2510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2511   *) ac_try_echo=$ac_try;;
2512 esac
2513 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2514 $as_echo "$ac_try_echo"; } >&5
2515   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2516   ac_status=$?
2517   if test -s conftest.err; then
2518     grep -v '^ *+' conftest.err >conftest.er1
2519     cat conftest.er1 >&5
2520     mv -f conftest.er1 conftest.err
2521   fi
2522   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2523   test $ac_status = 0; } > conftest.i && {
2524          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2525          test ! -s conftest.err
2526        }; then :
2527   ac_retval=0
2528 else
2529   $as_echo "$as_me: failed program was:" >&5
2530 sed 's/^/| /' conftest.$ac_ext >&5
2531 
2532     ac_retval=1
2533 fi
2534   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2535   as_fn_set_status $ac_retval
2536 
2537 } # ac_fn_cxx_try_cpp
2538 
2539 # ac_fn_c_try_link LINENO
2540 # -----------------------
2541 # Try to link conftest.$ac_ext, and return whether this succeeded.
2542 ac_fn_c_try_link ()
2543 {
2544   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2545   rm -f conftest.$ac_objext conftest$ac_exeext
2546   if { { ac_try="$ac_link"
2547 case "(($ac_try" in
2548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2549   *) ac_try_echo=$ac_try;;
2550 esac
2551 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2552 $as_echo "$ac_try_echo"; } >&5
2553   (eval "$ac_link") 2>conftest.err
2554   ac_status=$?
2555   if test -s conftest.err; then
2556     grep -v '^ *+' conftest.err >conftest.er1
2557     cat conftest.er1 >&5
2558     mv -f conftest.er1 conftest.err
2559   fi
2560   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2561   test $ac_status = 0; } && {
2562          test -z "$ac_c_werror_flag" ||
2563          test ! -s conftest.err
2564        } && test -s conftest$ac_exeext && {
2565          test "$cross_compiling" = yes ||
2566          test -x conftest$ac_exeext
2567        }; then :
2568   ac_retval=0
2569 else
2570   $as_echo "$as_me: failed program was:" >&5
2571 sed 's/^/| /' conftest.$ac_ext >&5
2572 
2573         ac_retval=1
2574 fi
2575   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2576   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2577   # interfere with the next link command; also delete a directory that is
2578   # left behind by Apple's compiler.  We do this before executing the actions.
2579   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2580   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2581   as_fn_set_status $ac_retval
2582 
2583 } # ac_fn_c_try_link
2584 
2585 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2586 # ---------------------------------------------------------
2587 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2588 # the include files in INCLUDES and setting the cache variable VAR
2589 # accordingly.
2590 ac_fn_cxx_check_header_mongrel ()
2591 {
2592   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2593   if eval \${$3+:} false; then :
2594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2595 $as_echo_n "checking for $2... " >&6; }
2596 if eval \${$3+:} false; then :
2597   $as_echo_n "(cached) " >&6
2598 fi
2599 eval ac_res=\$$3
2600                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2601 $as_echo "$ac_res" >&6; }
2602 else
2603   # Is the header compilable?
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2605 $as_echo_n "checking $2 usability... " >&6; }
2606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607 /* end confdefs.h.  */
2608 $4
2609 #include <$2>
2610 _ACEOF
2611 if ac_fn_cxx_try_compile "$LINENO"; then :
2612   ac_header_compiler=yes
2613 else
2614   ac_header_compiler=no
2615 fi
2616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2618 $as_echo "$ac_header_compiler" >&6; }
2619 
2620 # Is the header present?
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2622 $as_echo_n "checking $2 presence... " >&6; }
2623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624 /* end confdefs.h.  */
2625 #include <$2>
2626 _ACEOF
2627 if ac_fn_cxx_try_cpp "$LINENO"; then :
2628   ac_header_preproc=yes
2629 else
2630   ac_header_preproc=no
2631 fi
2632 rm -f conftest.err conftest.i conftest.$ac_ext
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2634 $as_echo "$ac_header_preproc" >&6; }
2635 
2636 # So?  What about this header?
2637 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2638   yes:no: )
2639     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2640 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2641     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2642 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2643     ;;
2644   no:yes:* )
2645     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2646 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2647     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2648 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2649     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2650 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2651     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2652 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2653     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2654 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2655 ( $as_echo "## ----------------------------------------- ##
2656 ## Report this to build-dev@openjdk.java.net ##
2657 ## ----------------------------------------- ##"
2658      ) | sed "s/^/$as_me: WARNING:     /" >&2
2659     ;;
2660 esac
2661   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2662 $as_echo_n "checking for $2... " >&6; }
2663 if eval \${$3+:} false; then :
2664   $as_echo_n "(cached) " >&6
2665 else
2666   eval "$3=\$ac_header_compiler"
2667 fi
2668 eval ac_res=\$$3
2669                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2670 $as_echo "$ac_res" >&6; }
2671 fi
2672   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2673 
2674 } # ac_fn_cxx_check_header_mongrel
2675 
2676 # ac_fn_cxx_try_run LINENO
2677 # ------------------------
2678 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2679 # that executables *can* be run.
2680 ac_fn_cxx_try_run ()
2681 {
2682   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2683   if { { ac_try="$ac_link"
2684 case "(($ac_try" in
2685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2686   *) ac_try_echo=$ac_try;;
2687 esac
2688 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2689 $as_echo "$ac_try_echo"; } >&5
2690   (eval "$ac_link") 2>&5
2691   ac_status=$?
2692   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2693   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2694   { { case "(($ac_try" in
2695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696   *) ac_try_echo=$ac_try;;
2697 esac
2698 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2699 $as_echo "$ac_try_echo"; } >&5
2700   (eval "$ac_try") 2>&5
2701   ac_status=$?
2702   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2703   test $ac_status = 0; }; }; then :
2704   ac_retval=0
2705 else
2706   $as_echo "$as_me: program exited with status $ac_status" >&5
2707        $as_echo "$as_me: failed program was:" >&5
2708 sed 's/^/| /' conftest.$ac_ext >&5
2709 
2710        ac_retval=$ac_status
2711 fi
2712   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2713   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2714   as_fn_set_status $ac_retval
2715 
2716 } # ac_fn_cxx_try_run
2717 
2718 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2719 # ---------------------------------------------------------
2720 # Tests whether HEADER exists and can be compiled using the include files in
2721 # INCLUDES, setting the cache variable VAR accordingly.
2722 ac_fn_cxx_check_header_compile ()
2723 {
2724   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2725   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2726 $as_echo_n "checking for $2... " >&6; }
2727 if eval \${$3+:} false; then :
2728   $as_echo_n "(cached) " >&6
2729 else
2730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2731 /* end confdefs.h.  */
2732 $4
2733 #include <$2>
2734 _ACEOF
2735 if ac_fn_cxx_try_compile "$LINENO"; then :
2736   eval "$3=yes"
2737 else
2738   eval "$3=no"
2739 fi
2740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2741 fi
2742 eval ac_res=\$$3
2743                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2744 $as_echo "$ac_res" >&6; }
2745   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2746 
2747 } # ac_fn_cxx_check_header_compile
2748 
2749 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2750 # ----------------------------------------------
2751 # Tries to find the compile-time value of EXPR in a program that includes
2752 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2753 # computed
2754 ac_fn_cxx_compute_int ()
2755 {
2756   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2757   if test "$cross_compiling" = yes; then
2758     # Depending upon the size, compute the lo and hi bounds.
2759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2760 /* end confdefs.h.  */
2761 $4
2762 int
2763 main ()
2764 {
2765 static int test_array [1 - 2 * !(($2) >= 0)];
2766 test_array [0] = 0;
2767 return test_array [0];
2768 
2769   ;
2770   return 0;
2771 }
2772 _ACEOF
2773 if ac_fn_cxx_try_compile "$LINENO"; then :
2774   ac_lo=0 ac_mid=0
2775   while :; do
2776     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2777 /* end confdefs.h.  */
2778 $4
2779 int
2780 main ()
2781 {
2782 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2783 test_array [0] = 0;
2784 return test_array [0];
2785 
2786   ;
2787   return 0;
2788 }
2789 _ACEOF
2790 if ac_fn_cxx_try_compile "$LINENO"; then :
2791   ac_hi=$ac_mid; break
2792 else
2793   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2794                         if test $ac_lo -le $ac_mid; then
2795                           ac_lo= ac_hi=
2796                           break
2797                         fi
2798                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2799 fi
2800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2801   done
2802 else
2803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2804 /* end confdefs.h.  */
2805 $4
2806 int
2807 main ()
2808 {
2809 static int test_array [1 - 2 * !(($2) < 0)];
2810 test_array [0] = 0;
2811 return test_array [0];
2812 
2813   ;
2814   return 0;
2815 }
2816 _ACEOF
2817 if ac_fn_cxx_try_compile "$LINENO"; then :
2818   ac_hi=-1 ac_mid=-1
2819   while :; do
2820     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2821 /* end confdefs.h.  */
2822 $4
2823 int
2824 main ()
2825 {
2826 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2827 test_array [0] = 0;
2828 return test_array [0];
2829 
2830   ;
2831   return 0;
2832 }
2833 _ACEOF
2834 if ac_fn_cxx_try_compile "$LINENO"; then :
2835   ac_lo=$ac_mid; break
2836 else
2837   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2838                         if test $ac_mid -le $ac_hi; then
2839                           ac_lo= ac_hi=
2840                           break
2841                         fi
2842                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2843 fi
2844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2845   done
2846 else
2847   ac_lo= ac_hi=
2848 fi
2849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850 fi
2851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2852 # Binary search between lo and hi bounds.
2853 while test "x$ac_lo" != "x$ac_hi"; do
2854   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2856 /* end confdefs.h.  */
2857 $4
2858 int
2859 main ()
2860 {
2861 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2862 test_array [0] = 0;
2863 return test_array [0];
2864 
2865   ;
2866   return 0;
2867 }
2868 _ACEOF
2869 if ac_fn_cxx_try_compile "$LINENO"; then :
2870   ac_hi=$ac_mid
2871 else
2872   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2873 fi
2874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2875 done
2876 case $ac_lo in #((
2877 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2878 '') ac_retval=1 ;;
2879 esac
2880   else
2881     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882 /* end confdefs.h.  */
2883 $4
2884 static long int longval () { return $2; }
2885 static unsigned long int ulongval () { return $2; }
2886 #include <stdio.h>
2887 #include <stdlib.h>
2888 int
2889 main ()
2890 {
2891 
2892   FILE *f = fopen ("conftest.val", "w");
2893   if (! f)
2894     return 1;
2895   if (($2) < 0)
2896     {
2897       long int i = longval ();
2898       if (i != ($2))
2899         return 1;
2900       fprintf (f, "%ld", i);
2901     }
2902   else
2903     {
2904       unsigned long int i = ulongval ();
2905       if (i != ($2))
2906         return 1;
2907       fprintf (f, "%lu", i);
2908     }
2909   /* Do not output a trailing newline, as this causes \r\n confusion
2910      on some platforms.  */
2911   return ferror (f) || fclose (f) != 0;
2912 
2913   ;
2914   return 0;
2915 }
2916 _ACEOF
2917 if ac_fn_cxx_try_run "$LINENO"; then :
2918   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2919 else
2920   ac_retval=1
2921 fi
2922 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2923   conftest.$ac_objext conftest.beam conftest.$ac_ext
2924 rm -f conftest.val
2925 
2926   fi
2927   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2928   as_fn_set_status $ac_retval
2929 
2930 } # ac_fn_cxx_compute_int
2931 
2932 # ac_fn_cxx_try_link LINENO
2933 # -------------------------
2934 # Try to link conftest.$ac_ext, and return whether this succeeded.
2935 ac_fn_cxx_try_link ()
2936 {
2937   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2938   rm -f conftest.$ac_objext conftest$ac_exeext
2939   if { { ac_try="$ac_link"
2940 case "(($ac_try" in
2941   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942   *) ac_try_echo=$ac_try;;
2943 esac
2944 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2945 $as_echo "$ac_try_echo"; } >&5
2946   (eval "$ac_link") 2>conftest.err
2947   ac_status=$?
2948   if test -s conftest.err; then
2949     grep -v '^ *+' conftest.err >conftest.er1
2950     cat conftest.er1 >&5
2951     mv -f conftest.er1 conftest.err
2952   fi
2953   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2954   test $ac_status = 0; } && {
2955          test -z "$ac_cxx_werror_flag" ||
2956          test ! -s conftest.err
2957        } && test -s conftest$ac_exeext && {
2958          test "$cross_compiling" = yes ||
2959          test -x conftest$ac_exeext
2960        }; then :
2961   ac_retval=0
2962 else
2963   $as_echo "$as_me: failed program was:" >&5
2964 sed 's/^/| /' conftest.$ac_ext >&5
2965 
2966         ac_retval=1
2967 fi
2968   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2969   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2970   # interfere with the next link command; also delete a directory that is
2971   # left behind by Apple's compiler.  We do this before executing the actions.
2972   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2973   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2974   as_fn_set_status $ac_retval
2975 
2976 } # ac_fn_cxx_try_link
2977 
2978 # ac_fn_cxx_check_func LINENO FUNC VAR
2979 # ------------------------------------
2980 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2981 ac_fn_cxx_check_func ()
2982 {
2983   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2984   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2985 $as_echo_n "checking for $2... " >&6; }
2986 if eval \${$3+:} false; then :
2987   $as_echo_n "(cached) " >&6
2988 else
2989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2990 /* end confdefs.h.  */
2991 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2992    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2993 #define $2 innocuous_$2
2994 
2995 /* System header to define __stub macros and hopefully few prototypes,
2996     which can conflict with char $2 (); below.
2997     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2998     <limits.h> exists even on freestanding compilers.  */
2999 
3000 #ifdef __STDC__
3001 # include <limits.h>
3002 #else
3003 # include <assert.h>
3004 #endif
3005 
3006 #undef $2
3007 
3008 /* Override any GCC internal prototype to avoid an error.
3009    Use char because int might match the return type of a GCC
3010    builtin and then its argument prototype would still apply.  */
3011 #ifdef __cplusplus
3012 extern "C"
3013 #endif
3014 char $2 ();
3015 /* The GNU C library defines this for functions which it implements
3016     to always fail with ENOSYS.  Some functions are actually named
3017     something starting with __ and the normal name is an alias.  */
3018 #if defined __stub_$2 || defined __stub___$2
3019 choke me
3020 #endif
3021 
3022 int
3023 main ()
3024 {
3025 return $2 ();
3026   ;
3027   return 0;
3028 }
3029 _ACEOF
3030 if ac_fn_cxx_try_link "$LINENO"; then :
3031   eval "$3=yes"
3032 else
3033   eval "$3=no"
3034 fi
3035 rm -f core conftest.err conftest.$ac_objext \
3036     conftest$ac_exeext conftest.$ac_ext
3037 fi
3038 eval ac_res=\$$3
3039                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3040 $as_echo "$ac_res" >&6; }
3041   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3042 
3043 } # ac_fn_cxx_check_func
3044 
3045 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3046 # -------------------------------------------------------
3047 # Tests whether HEADER exists and can be compiled using the include files in
3048 # INCLUDES, setting the cache variable VAR accordingly.
3049 ac_fn_c_check_header_compile ()
3050 {
3051   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3052   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3053 $as_echo_n "checking for $2... " >&6; }
3054 if eval \${$3+:} false; then :
3055   $as_echo_n "(cached) " >&6
3056 else
3057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3058 /* end confdefs.h.  */
3059 $4
3060 #include <$2>
3061 _ACEOF
3062 if ac_fn_c_try_compile "$LINENO"; then :
3063   eval "$3=yes"
3064 else
3065   eval "$3=no"
3066 fi
3067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3068 fi
3069 eval ac_res=\$$3
3070                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3071 $as_echo "$ac_res" >&6; }
3072   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3073 
3074 } # ac_fn_c_check_header_compile
3075 cat >config.log <<_ACEOF
3076 This file contains any messages produced by compilers while
3077 running configure, to aid debugging if configure makes a mistake.
3078 
3079 It was created by OpenJDK $as_me jdk9, which was
3080 generated by GNU Autoconf 2.69.  Invocation command line was
3081 
3082   $ $0 $@
3083 
3084 _ACEOF
3085 exec 5>>config.log
3086 {
3087 cat <<_ASUNAME
3088 ## --------- ##
3089 ## Platform. ##
3090 ## --------- ##
3091 
3092 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3093 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3094 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3095 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3096 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3097 
3098 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3099 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3100 
3101 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3102 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3103 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3104 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3105 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3106 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3107 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3108 
3109 _ASUNAME
3110 
3111 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3112 for as_dir in $PATH
3113 do
3114   IFS=$as_save_IFS
3115   test -z "$as_dir" && as_dir=.
3116     $as_echo "PATH: $as_dir"
3117   done
3118 IFS=$as_save_IFS
3119 
3120 } >&5
3121 
3122 cat >&5 <<_ACEOF
3123 
3124 
3125 ## ----------- ##
3126 ## Core tests. ##
3127 ## ----------- ##
3128 
3129 _ACEOF
3130 
3131 
3132 # Keep a trace of the command line.
3133 # Strip out --no-create and --no-recursion so they do not pile up.
3134 # Strip out --silent because we don't want to record it for future runs.
3135 # Also quote any args containing shell meta-characters.
3136 # Make two passes to allow for proper duplicate-argument suppression.
3137 ac_configure_args=
3138 ac_configure_args0=
3139 ac_configure_args1=
3140 ac_must_keep_next=false
3141 for ac_pass in 1 2
3142 do
3143   for ac_arg
3144   do
3145     case $ac_arg in
3146     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3147     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3148     | -silent | --silent | --silen | --sile | --sil)
3149       continue ;;
3150     *\'*)
3151       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3152     esac
3153     case $ac_pass in
3154     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3155     2)
3156       as_fn_append ac_configure_args1 " '$ac_arg'"
3157       if test $ac_must_keep_next = true; then
3158         ac_must_keep_next=false # Got value, back to normal.
3159       else
3160         case $ac_arg in
3161           *=* | --config-cache | -C | -disable-* | --disable-* \
3162           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3163           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3164           | -with-* | --with-* | -without-* | --without-* | --x)
3165             case "$ac_configure_args0 " in
3166               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3167             esac
3168             ;;
3169           -* ) ac_must_keep_next=true ;;
3170         esac
3171       fi
3172       as_fn_append ac_configure_args " '$ac_arg'"
3173       ;;
3174     esac
3175   done
3176 done
3177 { ac_configure_args0=; unset ac_configure_args0;}
3178 { ac_configure_args1=; unset ac_configure_args1;}
3179 
3180 # When interrupted or exit'd, cleanup temporary files, and complete
3181 # config.log.  We remove comments because anyway the quotes in there
3182 # would cause problems or look ugly.
3183 # WARNING: Use '\'' to represent an apostrophe within the trap.
3184 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3185 trap 'exit_status=$?
3186   # Save into config.log some information that might help in debugging.
3187   {
3188     echo
3189 
3190     $as_echo "## ---------------- ##
3191 ## Cache variables. ##
3192 ## ---------------- ##"
3193     echo
3194     # The following way of writing the cache mishandles newlines in values,
3195 (
3196   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3197     eval ac_val=\$$ac_var
3198     case $ac_val in #(
3199     *${as_nl}*)
3200       case $ac_var in #(
3201       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3202 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3203       esac
3204       case $ac_var in #(
3205       _ | IFS | as_nl) ;; #(
3206       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3207       *) { eval $ac_var=; unset $ac_var;} ;;
3208       esac ;;
3209     esac
3210   done
3211   (set) 2>&1 |
3212     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3213     *${as_nl}ac_space=\ *)
3214       sed -n \
3215         "s/'\''/'\''\\\\'\'''\''/g;
3216           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3217       ;; #(
3218     *)
3219       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3220       ;;
3221     esac |
3222     sort
3223 )
3224     echo
3225 
3226     $as_echo "## ----------------- ##
3227 ## Output variables. ##
3228 ## ----------------- ##"
3229     echo
3230     for ac_var in $ac_subst_vars
3231     do
3232       eval ac_val=\$$ac_var
3233       case $ac_val in
3234       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3235       esac
3236       $as_echo "$ac_var='\''$ac_val'\''"
3237     done | sort
3238     echo
3239 
3240     if test -n "$ac_subst_files"; then
3241       $as_echo "## ------------------- ##
3242 ## File substitutions. ##
3243 ## ------------------- ##"
3244       echo
3245       for ac_var in $ac_subst_files
3246       do
3247         eval ac_val=\$$ac_var
3248         case $ac_val in
3249         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3250         esac
3251         $as_echo "$ac_var='\''$ac_val'\''"
3252       done | sort
3253       echo
3254     fi
3255 
3256     if test -s confdefs.h; then
3257       $as_echo "## ----------- ##
3258 ## confdefs.h. ##
3259 ## ----------- ##"
3260       echo
3261       cat confdefs.h
3262       echo
3263     fi
3264     test "$ac_signal" != 0 &&
3265       $as_echo "$as_me: caught signal $ac_signal"
3266     $as_echo "$as_me: exit $exit_status"
3267   } >&5
3268   rm -f core *.core core.conftest.* &&
3269     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3270     exit $exit_status
3271 ' 0
3272 for ac_signal in 1 2 13 15; do
3273   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3274 done
3275 ac_signal=0
3276 
3277 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3278 rm -f -r conftest* confdefs.h
3279 
3280 $as_echo "/* confdefs.h */" > confdefs.h
3281 
3282 # Predefined preprocessor variables.
3283 
3284 cat >>confdefs.h <<_ACEOF
3285 #define PACKAGE_NAME "$PACKAGE_NAME"
3286 _ACEOF
3287 
3288 cat >>confdefs.h <<_ACEOF
3289 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3290 _ACEOF
3291 
3292 cat >>confdefs.h <<_ACEOF
3293 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3294 _ACEOF
3295 
3296 cat >>confdefs.h <<_ACEOF
3297 #define PACKAGE_STRING "$PACKAGE_STRING"
3298 _ACEOF
3299 
3300 cat >>confdefs.h <<_ACEOF
3301 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3302 _ACEOF
3303 
3304 cat >>confdefs.h <<_ACEOF
3305 #define PACKAGE_URL "$PACKAGE_URL"
3306 _ACEOF
3307 
3308 
3309 # Let the site file select an alternate cache file if it wants to.
3310 # Prefer an explicitly selected file to automatically selected ones.
3311 ac_site_file1=NONE
3312 ac_site_file2=NONE
3313 if test -n "$CONFIG_SITE"; then
3314   # We do not want a PATH search for config.site.
3315   case $CONFIG_SITE in #((
3316     -*)  ac_site_file1=./$CONFIG_SITE;;
3317     */*) ac_site_file1=$CONFIG_SITE;;
3318     *)   ac_site_file1=./$CONFIG_SITE;;
3319   esac
3320 elif test "x$prefix" != xNONE; then
3321   ac_site_file1=$prefix/share/config.site
3322   ac_site_file2=$prefix/etc/config.site
3323 else
3324   ac_site_file1=$ac_default_prefix/share/config.site
3325   ac_site_file2=$ac_default_prefix/etc/config.site
3326 fi
3327 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3328 do
3329   test "x$ac_site_file" = xNONE && continue
3330   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3331     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3332 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3333     sed 's/^/| /' "$ac_site_file" >&5
3334     . "$ac_site_file" \
3335       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3336 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3337 as_fn_error $? "failed to load site script $ac_site_file
3338 See \`config.log' for more details" "$LINENO" 5; }
3339   fi
3340 done
3341 
3342 if test -r "$cache_file"; then
3343   # Some versions of bash will fail to source /dev/null (special files
3344   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3345   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3346     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3347 $as_echo "$as_me: loading cache $cache_file" >&6;}
3348     case $cache_file in
3349       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3350       *)                      . "./$cache_file";;
3351     esac
3352   fi
3353 else
3354   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3355 $as_echo "$as_me: creating cache $cache_file" >&6;}
3356   >$cache_file
3357 fi
3358 
3359 # Check that the precious variables saved in the cache have kept the same
3360 # value.
3361 ac_cache_corrupted=false
3362 for ac_var in $ac_precious_vars; do
3363   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3364   eval ac_new_set=\$ac_env_${ac_var}_set
3365   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3366   eval ac_new_val=\$ac_env_${ac_var}_value
3367   case $ac_old_set,$ac_new_set in
3368     set,)
3369       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3370 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3371       ac_cache_corrupted=: ;;
3372     ,set)
3373       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3374 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3375       ac_cache_corrupted=: ;;
3376     ,);;
3377     *)
3378       if test "x$ac_old_val" != "x$ac_new_val"; then
3379         # differences in whitespace do not lead to failure.
3380         ac_old_val_w=`echo x $ac_old_val`
3381         ac_new_val_w=`echo x $ac_new_val`
3382         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3383           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3384 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3385           ac_cache_corrupted=:
3386         else
3387           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3388 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3389           eval $ac_var=\$ac_old_val
3390         fi
3391         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3392 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3393         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3394 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3395       fi;;
3396   esac
3397   # Pass precious variables to config.status.
3398   if test "$ac_new_set" = set; then
3399     case $ac_new_val in
3400     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3401     *) ac_arg=$ac_var=$ac_new_val ;;
3402     esac
3403     case " $ac_configure_args " in
3404       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3405       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3406     esac
3407   fi
3408 done
3409 if $ac_cache_corrupted; then
3410   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3411 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3412   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3413 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3414   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3415 fi
3416 ## -------------------- ##
3417 ## Main body of script. ##
3418 ## -------------------- ##
3419 
3420 ac_ext=c
3421 ac_cpp='$CPP $CPPFLAGS'
3422 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3423 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3424 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3425 
3426 
3427 
3428 ac_aux_dir=
3429 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3430   if test -f "$ac_dir/install-sh"; then
3431     ac_aux_dir=$ac_dir
3432     ac_install_sh="$ac_aux_dir/install-sh -c"
3433     break
3434   elif test -f "$ac_dir/install.sh"; then
3435     ac_aux_dir=$ac_dir
3436     ac_install_sh="$ac_aux_dir/install.sh -c"
3437     break
3438   elif test -f "$ac_dir/shtool"; then
3439     ac_aux_dir=$ac_dir
3440     ac_install_sh="$ac_aux_dir/shtool install -c"
3441     break
3442   fi
3443 done
3444 if test -z "$ac_aux_dir"; then
3445   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
3446 fi
3447 
3448 # These three variables are undocumented and unsupported,
3449 # and are intended to be withdrawn in a future Autoconf release.
3450 # They can cause serious problems if a builder's source tree is in a directory
3451 # whose full name contains unusual characters.
3452 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3453 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3454 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3455 
3456 
3457 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3458 
3459 #
3460 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3461 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3462 #
3463 # This code is free software; you can redistribute it and/or modify it
3464 # under the terms of the GNU General Public License version 2 only, as
3465 # published by the Free Software Foundation.  Oracle designates this
3466 # particular file as subject to the "Classpath" exception as provided
3467 # by Oracle in the LICENSE file that accompanied this code.
3468 #
3469 # This code is distributed in the hope that it will be useful, but WITHOUT
3470 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3471 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3472 # version 2 for more details (a copy is included in the LICENSE file that
3473 # accompanied this code).
3474 #
3475 # You should have received a copy of the GNU General Public License version
3476 # 2 along with this work; if not, write to the Free Software Foundation,
3477 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3478 #
3479 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3480 # or visit www.oracle.com if you need additional information or have any
3481 # questions.
3482 #
3483 
3484 #
3485 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3486 #
3487 # This program is free software; you can redistribute it and/or modify
3488 # it under the terms of the GNU General Public License as published by
3489 # the Free Software Foundation; either version 2 of the License, or
3490 # (at your option) any later version.
3491 #
3492 # This program is distributed in the hope that it will be useful, but
3493 # WITHOUT ANY WARRANTY; without even the implied warranty of
3494 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3495 # General Public License for more details.
3496 #
3497 # You should have received a copy of the GNU General Public License
3498 # along with this program; if not, write to the Free Software
3499 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3500 #
3501 # As a special exception to the GNU General Public License, if you
3502 # distribute this file as part of a program that contains a
3503 # configuration script generated by Autoconf, you may include it under
3504 # the same distribution terms that you use for the rest of that program.
3505 
3506 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3507 # ----------------------------------
3508 # PKG_PROG_PKG_CONFIG
3509 
3510 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3511 #
3512 # Check to see whether a particular set of modules exists.  Similar
3513 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3514 #
3515 #
3516 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3517 # this or PKG_CHECK_MODULES is called, or make sure to call
3518 # PKG_CHECK_EXISTS manually
3519 # --------------------------------------------------------------
3520 
3521 
3522 
3523 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3524 # ---------------------------------------------
3525 # _PKG_CONFIG
3526 
3527 # _PKG_SHORT_ERRORS_SUPPORTED
3528 # -----------------------------
3529 # _PKG_SHORT_ERRORS_SUPPORTED
3530 
3531 
3532 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3533 # [ACTION-IF-NOT-FOUND])
3534 #
3535 #
3536 # Note that if there is a possibility the first call to
3537 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3538 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3539 #
3540 #
3541 # --------------------------------------------------------------
3542 # PKG_CHECK_MODULES
3543 
3544 
3545 # Include these first...
3546 #
3547 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3548 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3549 #
3550 # This code is free software; you can redistribute it and/or modify it
3551 # under the terms of the GNU General Public License version 2 only, as
3552 # published by the Free Software Foundation.  Oracle designates this
3553 # particular file as subject to the "Classpath" exception as provided
3554 # by Oracle in the LICENSE file that accompanied this code.
3555 #
3556 # This code is distributed in the hope that it will be useful, but WITHOUT
3557 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3558 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3559 # version 2 for more details (a copy is included in the LICENSE file that
3560 # accompanied this code).
3561 #
3562 # You should have received a copy of the GNU General Public License version
3563 # 2 along with this work; if not, write to the Free Software Foundation,
3564 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3565 #
3566 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3567 # or visit www.oracle.com if you need additional information or have any
3568 # questions.
3569 #
3570 
3571 # Create a function/macro that takes a series of named arguments. The call is
3572 # similar to AC_DEFUN, but the setup of the function looks like this:
3573 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3574 # ... do something
3575 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3576 # ])
3577 # A star (*) in front of a named argument means that it is required and it's
3578 # presence will be verified. To pass e.g. the first value as a normal indexed
3579 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3580 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3581 # "ARG_FOO".
3582 #
3583 # The generated function can be called like this:
3584 # MYFUNC(FOO: [foo-val],
3585 #     BAR: [
3586 #         $ECHO hello world
3587 #     ])
3588 # Note that the argument value must start on the same line as the argument name.
3589 #
3590 # Argument 1: Name of the function to define
3591 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3592 # Argument 3: Argument array to treat as named, typically $@
3593 # Argument 4: The main function body
3594 
3595 
3596 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3597 # If so, then append $1 to $2 \
3598 # Also set JVM_ARG_OK to true/false depending on outcome.
3599 
3600 
3601 # Appends a string to a path variable, only adding the : when needed.
3602 
3603 
3604 # Prepends a string to a path variable, only adding the : when needed.
3605 
3606 
3607 # This will make sure the given variable points to a full and proper
3608 # path. This means:
3609 # 1) There will be no spaces in the path. On unix platforms,
3610 #    spaces in the path will result in an error. On Windows,
3611 #    the path will be rewritten using short-style to be space-free.
3612 # 2) The path will be absolute, and it will be in unix-style (on
3613 #     cygwin).
3614 # $1: The name of the variable to fix
3615 
3616 
3617 # This will make sure the given variable points to a executable
3618 # with a full and proper path. This means:
3619 # 1) There will be no spaces in the path. On unix platforms,
3620 #    spaces in the path will result in an error. On Windows,
3621 #    the path will be rewritten using short-style to be space-free.
3622 # 2) The path will be absolute, and it will be in unix-style (on
3623 #     cygwin).
3624 # Any arguments given to the executable is preserved.
3625 # If the input variable does not have a directory specification, then
3626 # it need to be in the PATH.
3627 # $1: The name of the variable to fix
3628 
3629 
3630 
3631 
3632 # Register a --with argument but mark it as deprecated
3633 # $1: The name of the with argument to deprecate, not including --with-
3634 
3635 
3636 # Register a --enable argument but mark it as deprecated
3637 # $1: The name of the with argument to deprecate, not including --enable-
3638 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3639 # $3: Messages to user.
3640 
3641 
3642 
3643 
3644 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3645 # $1: variable to check
3646 
3647 
3648 # Check that there are no unprocessed overridden variables left.
3649 # If so, they are an incorrect argument and we will exit with an error.
3650 
3651 
3652 # Setup a tool for the given variable. If correctly specified by the user,
3653 # use that value, otherwise search for the tool using the supplied code snippet.
3654 # $1: variable to set
3655 # $2: code snippet to call to look for the tool
3656 # $3: code snippet to call if variable was used to find tool
3657 
3658 
3659 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3660 # $1: variable to set
3661 # $2: executable name (or list of names) to look for
3662 
3663 
3664 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3665 # $1: variable to set
3666 # $2: executable name (or list of names) to look for
3667 
3668 
3669 # Like BASIC_PATH_PROGS but fails if no tool was found.
3670 # $1: variable to set
3671 # $2: executable name (or list of names) to look for
3672 
3673 
3674 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3675 # $1: variable to set
3676 # $2: autoconf macro to call to look for the special tool
3677 
3678 
3679 # Setup the most fundamental tools that relies on not much else to set up,
3680 # but is used by much of the early bootstrap code.
3681 
3682 
3683 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3684 
3685 
3686 # Evaluates platform specific overrides for devkit variables.
3687 # $1: Name of variable
3688 
3689 
3690 
3691 
3692 
3693 
3694 #%%% Simple tools %%%
3695 
3696 # Check if we have found a usable version of make
3697 # $1: the path to a potential make binary (or empty)
3698 # $2: the description on how we found this
3699 
3700 
3701 
3702 
3703 # Goes looking for a usable version of GNU make.
3704 
3705 
3706 
3707 
3708 
3709 
3710 # Check if build directory is on local disk. If not possible to determine,
3711 # we prefer to claim it's local.
3712 # Argument 1: directory to test
3713 # Argument 2: what to do if it is on local disk
3714 # Argument 3: what to do otherwise (remote disk or failure)
3715 
3716 
3717 # Check that source files have basic read permissions set. This might
3718 # not be the case in cygwin in certain conditions.
3719 
3720 
3721 
3722 
3723 # Check for support for specific options in bash
3724 
3725 
3726 ################################################################################
3727 #
3728 # Default make target
3729 #
3730 
3731 
3732 # Code to run after AC_OUTPUT
3733 
3734 
3735 #
3736 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738 #
3739 # This code is free software; you can redistribute it and/or modify it
3740 # under the terms of the GNU General Public License version 2 only, as
3741 # published by the Free Software Foundation.  Oracle designates this
3742 # particular file as subject to the "Classpath" exception as provided
3743 # by Oracle in the LICENSE file that accompanied this code.
3744 #
3745 # This code is distributed in the hope that it will be useful, but WITHOUT
3746 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748 # version 2 for more details (a copy is included in the LICENSE file that
3749 # accompanied this code).
3750 #
3751 # You should have received a copy of the GNU General Public License version
3752 # 2 along with this work; if not, write to the Free Software Foundation,
3753 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754 #
3755 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756 # or visit www.oracle.com if you need additional information or have any
3757 # questions.
3758 #
3759 
3760 
3761 
3762 
3763 
3764 # Helper function which possibly converts a path using DOS-style short mode.
3765 # If so, the updated path is stored in $new_path.
3766 # $1: The path to check
3767 
3768 
3769 # Helper function which possibly converts a path using DOS-style short mode.
3770 # If so, the updated path is stored in $new_path.
3771 # $1: The path to check
3772 
3773 
3774 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3775 # and could probably be heavily simplified. However, all changes in this
3776 # area tend to need lot of testing in different scenarios, and in lack of
3777 # proper unit testing, cleaning this up has not been deemed worth the effort
3778 # at the moment.
3779 
3780 
3781 
3782 
3783 
3784 
3785 
3786 
3787 
3788 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3789 
3790 
3791 
3792 
3793 # ... then the rest
3794 #
3795 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3796 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3797 #
3798 # This code is free software; you can redistribute it and/or modify it
3799 # under the terms of the GNU General Public License version 2 only, as
3800 # published by the Free Software Foundation.  Oracle designates this
3801 # particular file as subject to the "Classpath" exception as provided
3802 # by Oracle in the LICENSE file that accompanied this code.
3803 #
3804 # This code is distributed in the hope that it will be useful, but WITHOUT
3805 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3806 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3807 # version 2 for more details (a copy is included in the LICENSE file that
3808 # accompanied this code).
3809 #
3810 # You should have received a copy of the GNU General Public License version
3811 # 2 along with this work; if not, write to the Free Software Foundation,
3812 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3813 #
3814 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3815 # or visit www.oracle.com if you need additional information or have any
3816 # questions.
3817 #
3818 
3819 ########################################################################
3820 # This file handles detection of the Boot JDK. The Boot JDK detection
3821 # process has been developed as a response to solve a complex real-world
3822 # problem. Initially, it was simple, but it has grown as platform after
3823 # platform, idiosyncracy after idiosyncracy has been supported.
3824 #
3825 # The basic idea is this:
3826 # 1) You need an acceptable *) JDK to use as a Boot JDK
3827 # 2) There are several ways to locate a JDK, that are mostly platform
3828 #    dependent **)
3829 # 3) You can have multiple JDKs installed
3830 # 4) If possible, configure should try to dig out an acceptable JDK
3831 #    automatically, without having to resort to command-line options
3832 #
3833 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3834 #     javac) and not a JRE, etc.
3835 #
3836 # **) On Windows we typically use a well-known path.
3837 #     On MacOSX we typically use the tool java_home.
3838 #     On Linux we typically find javac in the $PATH, and then follow a
3839 #     chain of symlinks that often ends up in a real JDK.
3840 #
3841 # This leads to the code where we check in different ways to locate a
3842 # JDK, and if one is found, check if it is acceptable. If not, we print
3843 # our reasons for rejecting it (useful when debugging non-working
3844 # configure situations) and continue checking the next one.
3845 ########################################################################
3846 
3847 # Execute the check given as argument, and verify the result
3848 # If the Boot JDK was previously found, do nothing
3849 # $1 A command line (typically autoconf macro) to execute
3850 
3851 
3852 # Test: Is bootjdk explicitely set by command line arguments?
3853 
3854 
3855 # Test: Is $JAVA_HOME set?
3856 
3857 
3858 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3859 
3860 
3861 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3862 # $1: Argument to the java_home binary (optional)
3863 
3864 
3865 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3866 
3867 
3868 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3869 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3870 # $1 = Path to directory containing jdk installations.
3871 # $2 = String to append to the found JDK directory to get the proper JDK home
3872 
3873 
3874 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3875 # environmental variable as base for where to look.
3876 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3877 
3878 
3879 # Test: Is there a JDK installed in default, well-known locations?
3880 
3881 
3882 # Check that a command-line tool in the Boot JDK is correct
3883 # $1 = name of variable to assign
3884 # $2 = name of binary
3885 
3886 
3887 ###############################################################################
3888 #
3889 # We need a Boot JDK to bootstrap the build.
3890 #
3891 
3892 
3893 
3894 
3895 
3896 # BUILD_JDK: the location of the latest JDK that can run
3897 #   on the host system and supports the target class file version
3898 #   generated in this JDK build.  This variable should only be
3899 #   used after the launchers are built.
3900 #
3901 
3902 # Execute the check given as argument, and verify the result.
3903 # If the JDK was previously found, do nothing.
3904 # $1 A command line (typically autoconf macro) to execute
3905 
3906 
3907 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3908 # is different than the host system doing the build (e.g. cross-compilation),
3909 # a special BUILD_JDK is built as part of the build process.  An external
3910 # prebuilt BUILD_JDK can also be supplied.
3911 
3912 
3913 #
3914 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3915 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3916 #
3917 # This code is free software; you can redistribute it and/or modify it
3918 # under the terms of the GNU General Public License version 2 only, as
3919 # published by the Free Software Foundation.  Oracle designates this
3920 # particular file as subject to the "Classpath" exception as provided
3921 # by Oracle in the LICENSE file that accompanied this code.
3922 #
3923 # This code is distributed in the hope that it will be useful, but WITHOUT
3924 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3925 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3926 # version 2 for more details (a copy is included in the LICENSE file that
3927 # accompanied this code).
3928 #
3929 # You should have received a copy of the GNU General Public License version
3930 # 2 along with this work; if not, write to the Free Software Foundation,
3931 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3932 #
3933 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3934 # or visit www.oracle.com if you need additional information or have any
3935 # questions.
3936 #
3937 
3938 
3939 
3940 
3941 
3942 
3943 
3944 
3945 
3946 
3947 
3948 
3949 
3950 
3951 
3952 
3953 
3954 ################################################################################
3955 #
3956 # Runs icecc-create-env once and prints the error if it fails
3957 #
3958 # $1: arguments to icecc-create-env
3959 # $2: log file
3960 #
3961 
3962 
3963 ################################################################################
3964 #
3965 # Optionally enable distributed compilation of native code using icecc/icecream
3966 #
3967 
3968 
3969 
3970 
3971 
3972 
3973 
3974 #
3975 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3976 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977 #
3978 # This code is free software; you can redistribute it and/or modify it
3979 # under the terms of the GNU General Public License version 2 only, as
3980 # published by the Free Software Foundation.  Oracle designates this
3981 # particular file as subject to the "Classpath" exception as provided
3982 # by Oracle in the LICENSE file that accompanied this code.
3983 #
3984 # This code is distributed in the hope that it will be useful, but WITHOUT
3985 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987 # version 2 for more details (a copy is included in the LICENSE file that
3988 # accompanied this code).
3989 #
3990 # You should have received a copy of the GNU General Public License version
3991 # 2 along with this work; if not, write to the Free Software Foundation,
3992 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993 #
3994 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995 # or visit www.oracle.com if you need additional information or have any
3996 # questions.
3997 #
3998 
3999 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4000 # corresponding configure arguments instead
4001 
4002 
4003 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4004 # that configure can use them while detecting compilers.
4005 # TOOLCHAIN_TYPE is available here.
4006 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4007 
4008 
4009 
4010 
4011 
4012 
4013 # Documentation on common flags used for solstudio in HIGHEST.
4014 #
4015 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4016 #          done with care, there are some assumptions below that need to
4017 #          be understood about the use of pointers, and IEEE behavior.
4018 #
4019 # -fns: Use non-standard floating point mode (not IEEE 754)
4020 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4021 # -fsingle: Use single precision floating point with 'float'
4022 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4023 #   (Source with excessing pointer casting and data access with mixed
4024 #    pointer types are not recommended)
4025 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4026 #   (If you expect perfect errno behavior, do not use this)
4027 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4028 # -xrestrict: Pointer parameters to functions do not overlap
4029 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4030 #    If you pass in multiple pointers to the same data, do not use this)
4031 # -xlibmil: Inline some library routines
4032 #   (If you expect perfect errno behavior, do not use this)
4033 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4034 #   (If you expect perfect errno behavior, do not use this)
4035 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4036 
4037     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4038     # Bug?
4039     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4040     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4041     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4042     #fi
4043 
4044 
4045 
4046 
4047 
4048 
4049 ################################################################################
4050 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4051 #      conditionals against.
4052 # $2 - Optional prefix for each variable defined.
4053 
4054 
4055 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4056 #                                  IF_FALSE: [RUN-IF-FALSE])
4057 # ------------------------------------------------------------
4058 # Check that the C compiler supports an argument
4059 
4060 
4061 
4062 
4063 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4064 #                                    IF_FALSE: [RUN-IF-FALSE])
4065 # ------------------------------------------------------------
4066 # Check that the C++ compiler supports an argument
4067 
4068 
4069 
4070 
4071 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4072 #                                IF_FALSE: [RUN-IF-FALSE])
4073 # ------------------------------------------------------------
4074 # Check that the C and C++ compilers support an argument
4075 
4076 
4077 
4078 
4079 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4080 #                                   IF_FALSE: [RUN-IF-FALSE])
4081 # ------------------------------------------------------------
4082 # Check that the linker support an argument
4083 
4084 
4085 
4086 
4087 
4088 
4089 
4090 
4091 #
4092 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4093 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4094 #
4095 # This code is free software; you can redistribute it and/or modify it
4096 # under the terms of the GNU General Public License version 2 only, as
4097 # published by the Free Software Foundation.  Oracle designates this
4098 # particular file as subject to the "Classpath" exception as provided
4099 # by Oracle in the LICENSE file that accompanied this code.
4100 #
4101 # This code is distributed in the hope that it will be useful, but WITHOUT
4102 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4103 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4104 # version 2 for more details (a copy is included in the LICENSE file that
4105 # accompanied this code).
4106 #
4107 # You should have received a copy of the GNU General Public License version
4108 # 2 along with this work; if not, write to the Free Software Foundation,
4109 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4110 #
4111 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4112 # or visit www.oracle.com if you need additional information or have any
4113 # questions.
4114 #
4115 
4116 
4117 
4118 
4119 
4120 cygwin_help() {
4121   case $1 in
4122     unzip)
4123       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4124       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4125       ;;
4126     zip)
4127       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4128       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4129       ;;
4130     make)
4131       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4132       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4133       ;;
4134     freetype)
4135       HELP_MSG="
4136 The freetype library can now be build during the configure process.
4137 Download the freetype sources and unpack them into an arbitrary directory:
4138 
4139 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4140 tar -xzf freetype-2.5.3.tar.gz
4141 
4142 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4143 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4144 builds or into '<freetype_src>/lib32' for 32-bit builds.
4145 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4146 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4147 
4148 Alternatively you can unpack the sources like this to use the default directory:
4149 
4150 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4151       ;;
4152   esac
4153 }
4154 
4155 msys_help() {
4156   PKGHANDLER_COMMAND=""
4157 }
4158 
4159 apt_help() {
4160   case $1 in
4161     reduced)
4162       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4163     devkit)
4164       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4165     openjdk)
4166       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4167     alsa)
4168       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4169     cups)
4170       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4171     freetype)
4172       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4173     ffi)
4174       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4175     x11)
4176       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4177     ccache)
4178       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4179     dtrace)
4180       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4181   esac
4182 }
4183 
4184 yum_help() {
4185   case $1 in
4186     devkit)
4187       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4188     openjdk)
4189       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4190     alsa)
4191       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4192     cups)
4193       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4194     freetype)
4195       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4196     x11)
4197       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4198     ccache)
4199       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4200   esac
4201 }
4202 
4203 port_help() {
4204   PKGHANDLER_COMMAND=""
4205 }
4206 
4207 pkgutil_help() {
4208   PKGHANDLER_COMMAND=""
4209 }
4210 
4211 pkgadd_help() {
4212   PKGHANDLER_COMMAND=""
4213 }
4214 
4215 # This function will check if we're called from the "configure" wrapper while
4216 # printing --help. If so, we will print out additional information that can
4217 # only be extracted within the autoconf script, and then exit. This must be
4218 # called at the very beginning in configure.ac.
4219 
4220 
4221 
4222 
4223 
4224 
4225 #
4226 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4227 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4228 #
4229 # This code is free software; you can redistribute it and/or modify it
4230 # under the terms of the GNU General Public License version 2 only, as
4231 # published by the Free Software Foundation.  Oracle designates this
4232 # particular file as subject to the "Classpath" exception as provided
4233 # by Oracle in the LICENSE file that accompanied this code.
4234 #
4235 # This code is distributed in the hope that it will be useful, but WITHOUT
4236 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4237 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4238 # version 2 for more details (a copy is included in the LICENSE file that
4239 # accompanied this code).
4240 #
4241 # You should have received a copy of the GNU General Public License version
4242 # 2 along with this work; if not, write to the Free Software Foundation,
4243 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4244 #
4245 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4246 # or visit www.oracle.com if you need additional information or have any
4247 # questions.
4248 #
4249 
4250 # All valid JVM features, regardless of platform
4251 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4252     fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4253 
4254 # All valid JVM variants
4255 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4256 
4257 ###############################################################################
4258 # Check if the specified JVM variant should be built. To be used in shell if
4259 # constructs, like this:
4260 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4261 #
4262 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4263 
4264 # Definition kept in one line to allow inlining in if statements.
4265 # Additional [] needed to keep m4 from mangling shell constructs.
4266 
4267 
4268 ###############################################################################
4269 # Check if the specified JVM features are explicitly enabled. To be used in
4270 # shell if constructs, like this:
4271 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4272 #
4273 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4274 
4275 # Definition kept in one line to allow inlining in if statements.
4276 # Additional [] needed to keep m4 from mangling shell constructs.
4277 
4278 
4279 ###############################################################################
4280 # Check which variants of the JVM that we want to build. Available variants are:
4281 #   server: normal interpreter, and a tiered C1/C2 compiler
4282 #   client: normal interpreter, and C1 (no C2 compiler)
4283 #   minimal: reduced form of client with optional features stripped out
4284 #   core: normal interpreter only, no compiler
4285 #   zero: C++ based interpreter only, no compiler
4286 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4287 #   custom: baseline JVM with no default features
4288 #
4289 
4290 
4291 ###############################################################################
4292 # Check if dtrace should be enabled and has all prerequisites present.
4293 #
4294 
4295 
4296 ###############################################################################
4297 # Set up all JVM features for each JVM variant.
4298 #
4299 
4300 
4301 ###############################################################################
4302 # Validate JVM features once all setup is complete, including custom setup.
4303 #
4304 
4305 
4306 ###############################################################################
4307 # Support for old hotspot build. Remove once new hotspot build has proven
4308 # to work satisfactory.
4309 #
4310 
4311 
4312 #
4313 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4314 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4315 #
4316 # This code is free software; you can redistribute it and/or modify it
4317 # under the terms of the GNU General Public License version 2 only, as
4318 # published by the Free Software Foundation.  Oracle designates this
4319 # particular file as subject to the "Classpath" exception as provided
4320 # by Oracle in the LICENSE file that accompanied this code.
4321 #
4322 # This code is distributed in the hope that it will be useful, but WITHOUT
4323 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4324 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4325 # version 2 for more details (a copy is included in the LICENSE file that
4326 # accompanied this code).
4327 #
4328 # You should have received a copy of the GNU General Public License version
4329 # 2 along with this work; if not, write to the Free Software Foundation,
4330 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4331 #
4332 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4333 # or visit www.oracle.com if you need additional information or have any
4334 # questions.
4335 #
4336 
4337 ###############################################################################
4338 # Check which variant of the JDK that we want to build.
4339 # Currently we have:
4340 #    normal:   standard edition
4341 # but the custom make system may add other variants
4342 #
4343 # Effectively the JDK variant gives a name to a specific set of
4344 # modules to compile into the JDK.
4345 
4346 
4347 ###############################################################################
4348 # Set the debug level
4349 #    release: no debug information, all optimizations, no asserts.
4350 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4351 #    fastdebug: debug information (-g), all optimizations, all asserts
4352 #    slowdebug: debug information (-g), no optimizations, all asserts
4353 
4354 
4355 ###############################################################################
4356 #
4357 # Should we build only OpenJDK even if closed sources are present?
4358 #
4359 
4360 
4361 
4362 
4363 ###############################################################################
4364 #
4365 # Enable or disable the elliptic curve crypto implementation
4366 #
4367 
4368 
4369 
4370 
4371 ################################################################################
4372 #
4373 # Gcov coverage data for hotspot
4374 #
4375 
4376 
4377 ################################################################################
4378 #
4379 # Static build support.  When enabled will generate static
4380 # libraries instead of shared libraries for all JDK libs.
4381 #
4382 
4383 
4384 ################################################################################
4385 #
4386 # jlink options.
4387 # We always keep packaged modules in JDK image.
4388 #
4389 
4390 
4391 ################################################################################
4392 #
4393 # Check if building of the jtreg failure handler should be enabled.
4394 #
4395 
4396 
4397 #
4398 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4399 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4400 #
4401 # This code is free software; you can redistribute it and/or modify it
4402 # under the terms of the GNU General Public License version 2 only, as
4403 # published by the Free Software Foundation.  Oracle designates this
4404 # particular file as subject to the "Classpath" exception as provided
4405 # by Oracle in the LICENSE file that accompanied this code.
4406 #
4407 # This code is distributed in the hope that it will be useful, but WITHOUT
4408 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4409 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4410 # version 2 for more details (a copy is included in the LICENSE file that
4411 # accompanied this code).
4412 #
4413 # You should have received a copy of the GNU General Public License version
4414 # 2 along with this work; if not, write to the Free Software Foundation,
4415 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4416 #
4417 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4418 # or visit www.oracle.com if you need additional information or have any
4419 # questions.
4420 #
4421 
4422 ###############################################################################
4423 #
4424 # Setup version numbers
4425 #
4426 
4427 # Verify that a given string represents a valid version number, and assign it
4428 # to a variable.
4429 
4430 # Argument 1: the variable to assign to
4431 # Argument 2: the value given by the user
4432 
4433 
4434 
4435 
4436 #
4437 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4438 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4439 #
4440 # This code is free software; you can redistribute it and/or modify it
4441 # under the terms of the GNU General Public License version 2 only, as
4442 # published by the Free Software Foundation.  Oracle designates this
4443 # particular file as subject to the "Classpath" exception as provided
4444 # by Oracle in the LICENSE file that accompanied this code.
4445 #
4446 # This code is distributed in the hope that it will be useful, but WITHOUT
4447 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4448 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4449 # version 2 for more details (a copy is included in the LICENSE file that
4450 # accompanied this code).
4451 #
4452 # You should have received a copy of the GNU General Public License version
4453 # 2 along with this work; if not, write to the Free Software Foundation,
4454 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4455 #
4456 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4457 # or visit www.oracle.com if you need additional information or have any
4458 # questions.
4459 #
4460 
4461 # Major library component reside in separate files.
4462 #
4463 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4464 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4465 #
4466 # This code is free software; you can redistribute it and/or modify it
4467 # under the terms of the GNU General Public License version 2 only, as
4468 # published by the Free Software Foundation.  Oracle designates this
4469 # particular file as subject to the "Classpath" exception as provided
4470 # by Oracle in the LICENSE file that accompanied this code.
4471 #
4472 # This code is distributed in the hope that it will be useful, but WITHOUT
4473 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4474 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4475 # version 2 for more details (a copy is included in the LICENSE file that
4476 # accompanied this code).
4477 #
4478 # You should have received a copy of the GNU General Public License version
4479 # 2 along with this work; if not, write to the Free Software Foundation,
4480 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4481 #
4482 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4483 # or visit www.oracle.com if you need additional information or have any
4484 # questions.
4485 #
4486 
4487 ################################################################################
4488 # Setup alsa (Advanced Linux Sound Architecture)
4489 ################################################################################
4490 
4491 
4492 #
4493 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4494 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4495 #
4496 # This code is free software; you can redistribute it and/or modify it
4497 # under the terms of the GNU General Public License version 2 only, as
4498 # published by the Free Software Foundation.  Oracle designates this
4499 # particular file as subject to the "Classpath" exception as provided
4500 # by Oracle in the LICENSE file that accompanied this code.
4501 #
4502 # This code is distributed in the hope that it will be useful, but WITHOUT
4503 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4504 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4505 # version 2 for more details (a copy is included in the LICENSE file that
4506 # accompanied this code).
4507 #
4508 # You should have received a copy of the GNU General Public License version
4509 # 2 along with this work; if not, write to the Free Software Foundation,
4510 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4511 #
4512 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4513 # or visit www.oracle.com if you need additional information or have any
4514 # questions.
4515 #
4516 
4517 ################################################################################
4518 # Setup bundled libraries.
4519 #
4520 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4521 # OpenJDK repository. Default is to use these libraries as bundled, but they
4522 # might be replaced by en external version by the user.
4523 ################################################################################
4524 
4525 
4526 ################################################################################
4527 # Setup libjpeg
4528 ################################################################################
4529 
4530 
4531 ################################################################################
4532 # Setup giflib
4533 ################################################################################
4534 
4535 
4536 ################################################################################
4537 # Setup libpng
4538 ################################################################################
4539 
4540 
4541 ################################################################################
4542 # Setup zlib
4543 ################################################################################
4544 
4545 
4546 ################################################################################
4547 # Setup lcms (Little CMS)
4548 ################################################################################
4549 
4550 
4551 #
4552 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4553 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4554 #
4555 # This code is free software; you can redistribute it and/or modify it
4556 # under the terms of the GNU General Public License version 2 only, as
4557 # published by the Free Software Foundation.  Oracle designates this
4558 # particular file as subject to the "Classpath" exception as provided
4559 # by Oracle in the LICENSE file that accompanied this code.
4560 #
4561 # This code is distributed in the hope that it will be useful, but WITHOUT
4562 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4563 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4564 # version 2 for more details (a copy is included in the LICENSE file that
4565 # accompanied this code).
4566 #
4567 # You should have received a copy of the GNU General Public License version
4568 # 2 along with this work; if not, write to the Free Software Foundation,
4569 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4570 #
4571 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4572 # or visit www.oracle.com if you need additional information or have any
4573 # questions.
4574 #
4575 
4576 ################################################################################
4577 # Setup cups (Common Unix Printing System)
4578 ################################################################################
4579 
4580 
4581 #
4582 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4583 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4584 #
4585 # This code is free software; you can redistribute it and/or modify it
4586 # under the terms of the GNU General Public License version 2 only, as
4587 # published by the Free Software Foundation.  Oracle designates this
4588 # particular file as subject to the "Classpath" exception as provided
4589 # by Oracle in the LICENSE file that accompanied this code.
4590 #
4591 # This code is distributed in the hope that it will be useful, but WITHOUT
4592 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4593 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4594 # version 2 for more details (a copy is included in the LICENSE file that
4595 # accompanied this code).
4596 #
4597 # You should have received a copy of the GNU General Public License version
4598 # 2 along with this work; if not, write to the Free Software Foundation,
4599 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4600 #
4601 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4602 # or visit www.oracle.com if you need additional information or have any
4603 # questions.
4604 #
4605 
4606 ################################################################################
4607 # Setup libffi (Foreign Function Interface)
4608 ################################################################################
4609 
4610 
4611 #
4612 # Copyright (c) 2011, 2015, 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 # Build the freetype lib from source
4638 ################################################################################
4639 
4640 
4641 ################################################################################
4642 # Check if a potential freeype library match is correct and usable
4643 ################################################################################
4644 
4645 
4646 ################################################################################
4647 # Setup freetype (The FreeType2 font rendering library)
4648 ################################################################################
4649 
4650 
4651 #
4652 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4653 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4654 #
4655 # This code is free software; you can redistribute it and/or modify it
4656 # under the terms of the GNU General Public License version 2 only, as
4657 # published by the Free Software Foundation.  Oracle designates this
4658 # particular file as subject to the "Classpath" exception as provided
4659 # by Oracle in the LICENSE file that accompanied this code.
4660 #
4661 # This code is distributed in the hope that it will be useful, but WITHOUT
4662 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4663 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4664 # version 2 for more details (a copy is included in the LICENSE file that
4665 # accompanied this code).
4666 #
4667 # You should have received a copy of the GNU General Public License version
4668 # 2 along with this work; if not, write to the Free Software Foundation,
4669 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4670 #
4671 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4672 # or visit www.oracle.com if you need additional information or have any
4673 # questions.
4674 #
4675 
4676 ################################################################################
4677 # Setup the standard C/C++ runtime libraries.
4678 #
4679 # Most importantly, determine if stdc++ should be linked statically or
4680 # dynamically.
4681 ################################################################################
4682 
4683 
4684 #
4685 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4686 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4687 #
4688 # This code is free software; you can redistribute it and/or modify it
4689 # under the terms of the GNU General Public License version 2 only, as
4690 # published by the Free Software Foundation.  Oracle designates this
4691 # particular file as subject to the "Classpath" exception as provided
4692 # by Oracle in the LICENSE file that accompanied this code.
4693 #
4694 # This code is distributed in the hope that it will be useful, but WITHOUT
4695 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4696 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4697 # version 2 for more details (a copy is included in the LICENSE file that
4698 # accompanied this code).
4699 #
4700 # You should have received a copy of the GNU General Public License version
4701 # 2 along with this work; if not, write to the Free Software Foundation,
4702 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4703 #
4704 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4705 # or visit www.oracle.com if you need additional information or have any
4706 # questions.
4707 #
4708 
4709 ################################################################################
4710 # Setup X11 Windows system
4711 ################################################################################
4712 
4713 
4714 
4715 ################################################################################
4716 # Determine which libraries are needed for this configuration
4717 ################################################################################
4718 
4719 
4720 ################################################################################
4721 # Parse library options, and setup needed libraries
4722 ################################################################################
4723 
4724 
4725 ################################################################################
4726 # Setup llvm (Low-Level VM)
4727 ################################################################################
4728 
4729 
4730 ################################################################################
4731 # Setup various libraries, typically small system libraries
4732 ################################################################################
4733 
4734 
4735 #
4736 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4737 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4738 #
4739 # This code is free software; you can redistribute it and/or modify it
4740 # under the terms of the GNU General Public License version 2 only, as
4741 # published by the Free Software Foundation.  Oracle designates this
4742 # particular file as subject to the "Classpath" exception as provided
4743 # by Oracle in the LICENSE file that accompanied this code.
4744 #
4745 # This code is distributed in the hope that it will be useful, but WITHOUT
4746 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4747 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4748 # version 2 for more details (a copy is included in the LICENSE file that
4749 # accompanied this code).
4750 #
4751 # You should have received a copy of the GNU General Public License version
4752 # 2 along with this work; if not, write to the Free Software Foundation,
4753 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4754 #
4755 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4756 # or visit www.oracle.com if you need additional information or have any
4757 # questions.
4758 #
4759 
4760 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4761 # Converts autoconf style CPU name to OpenJDK style, into
4762 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4763 
4764 
4765 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4766 # Converts autoconf style OS name to OpenJDK style, into
4767 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4768 
4769 
4770 # Expects $host_os $host_cpu $build_os and $build_cpu
4771 # and $with_target_bits to have been setup!
4772 #
4773 # Translate the standard triplet(quadruplet) definition
4774 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4775 # OPENJDK_BUILD_OS, etc.
4776 
4777 
4778 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4779 # accordingly. Must be done after setting up build and target system, but before
4780 # doing anything else with these values.
4781 
4782 
4783 # Setup the legacy variables, for controlling the old makefiles.
4784 #
4785 
4786 
4787 # $1 - Either TARGET or BUILD to setup the variables for.
4788 
4789 
4790 
4791 
4792 #%%% Build and target systems %%%
4793 
4794 
4795 
4796 
4797 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4798 # Add -mX to various FLAGS variables.
4799 
4800 
4801 
4802 
4803 
4804 
4805 #
4806 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4807 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4808 #
4809 # This code is free software; you can redistribute it and/or modify it
4810 # under the terms of the GNU General Public License version 2 only, as
4811 # published by the Free Software Foundation.  Oracle designates this
4812 # particular file as subject to the "Classpath" exception as provided
4813 # by Oracle in the LICENSE file that accompanied this code.
4814 #
4815 # This code is distributed in the hope that it will be useful, but WITHOUT
4816 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4817 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4818 # version 2 for more details (a copy is included in the LICENSE file that
4819 # accompanied this code).
4820 #
4821 # You should have received a copy of the GNU General Public License version
4822 # 2 along with this work; if not, write to the Free Software Foundation,
4823 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4824 #
4825 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4826 # or visit www.oracle.com if you need additional information or have any
4827 # questions.
4828 #
4829 
4830 
4831 
4832 
4833 
4834 
4835 
4836 ################################################################################
4837 # Define a mechanism for importing extra prebuilt modules
4838 #
4839 
4840 
4841 
4842 #
4843 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4844 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4845 #
4846 # This code is free software; you can redistribute it and/or modify it
4847 # under the terms of the GNU General Public License version 2 only, as
4848 # published by the Free Software Foundation.  Oracle designates this
4849 # particular file as subject to the "Classpath" exception as provided
4850 # by Oracle in the LICENSE file that accompanied this code.
4851 #
4852 # This code is distributed in the hope that it will be useful, but WITHOUT
4853 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4854 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4855 # version 2 for more details (a copy is included in the LICENSE file that
4856 # accompanied this code).
4857 #
4858 # You should have received a copy of the GNU General Public License version
4859 # 2 along with this work; if not, write to the Free Software Foundation,
4860 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4861 #
4862 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4863 # or visit www.oracle.com if you need additional information or have any
4864 # questions.
4865 #
4866 
4867 ########################################################################
4868 # This file is responsible for detecting, verifying and setting up the
4869 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4870 # proper paths to the binaries, but it will not setup any flags.
4871 #
4872 # The binaries used is determined by the toolchain type, which is the family of
4873 # compilers and related tools that are used.
4874 ########################################################################
4875 
4876 
4877 # All valid toolchains, regardless of platform (used by help.m4)
4878 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4879 
4880 # These toolchains are valid on different platforms
4881 VALID_TOOLCHAINS_linux="gcc clang"
4882 VALID_TOOLCHAINS_solaris="solstudio"
4883 VALID_TOOLCHAINS_macosx="gcc clang"
4884 VALID_TOOLCHAINS_aix="xlc"
4885 VALID_TOOLCHAINS_windows="microsoft"
4886 
4887 # Toolchain descriptions
4888 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4889 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4890 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4891 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4892 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4893 
4894 # Minimum supported versions, empty means unspecified
4895 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4896 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4897 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4898 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4899 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4900 
4901 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4902 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4903 
4904 
4905 # Check if the configured compiler (C and C++) is of a specific version or
4906 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4907 #
4908 # Arguments:
4909 #   VERSION:   The version string to check against the found version
4910 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4911 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4912 
4913 
4914 
4915 
4916 # Setup a number of variables describing how native output files are
4917 # named on this platform/toolchain.
4918 
4919 
4920 # Determine which toolchain type to use, and make sure it is valid for this
4921 # platform. Setup various information about the selected toolchain.
4922 
4923 
4924 # Before we start detecting the toolchain executables, we might need some
4925 # special setup, e.g. additional paths etc.
4926 
4927 
4928 # Restore path, etc
4929 
4930 
4931 # Check if a compiler is of the toolchain type we expect, and save the version
4932 # information from it. If the compiler does not match the expected type,
4933 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4934 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4935 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4936 #
4937 # $1 = compiler to test (CC or CXX)
4938 # $2 = human readable name of compiler (C or C++)
4939 
4940 
4941 # Try to locate the given C or C++ compiler in the path, or otherwise.
4942 #
4943 # $1 = compiler to test (CC or CXX)
4944 # $2 = human readable name of compiler (C or C++)
4945 # $3 = list of compiler names to search for
4946 
4947 
4948 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4949 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4950 # archiver (AR). Verify that the compilers are correct according to the
4951 # toolchain type.
4952 
4953 
4954 # Setup additional tools that is considered a part of the toolchain, but not the
4955 # core part. Many of these are highly platform-specific and do not exist,
4956 # and/or are not needed on all platforms.
4957 
4958 
4959 # Setup the build tools (i.e, the compiler and linker used to build programs
4960 # that should be run on the build platform, not the target platform, as a build
4961 # helper). Since the non-cross-compile case uses the normal, target compilers
4962 # for this, we can only do this after these have been setup.
4963 
4964 
4965 # Setup legacy variables that are still needed as alternative ways to refer to
4966 # parts of the toolchain.
4967 
4968 
4969 # Do some additional checks on the detected tools.
4970 
4971 
4972 # Setup the JTReg Regression Test Harness.
4973 
4974 
4975 #
4976 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4977 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4978 #
4979 # This code is free software; you can redistribute it and/or modify it
4980 # under the terms of the GNU General Public License version 2 only, as
4981 # published by the Free Software Foundation.  Oracle designates this
4982 # particular file as subject to the "Classpath" exception as provided
4983 # by Oracle in the LICENSE file that accompanied this code.
4984 #
4985 # This code is distributed in the hope that it will be useful, but WITHOUT
4986 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4987 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4988 # version 2 for more details (a copy is included in the LICENSE file that
4989 # accompanied this code).
4990 #
4991 # You should have received a copy of the GNU General Public License version
4992 # 2 along with this work; if not, write to the Free Software Foundation,
4993 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4994 #
4995 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4996 # or visit www.oracle.com if you need additional information or have any
4997 # questions.
4998 #
4999 
5000 ################################################################################
5001 # The order of these defines the priority by which we try to find them.
5002 VALID_VS_VERSIONS="2013 2012 2010"
5003 
5004 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5005 VS_VERSION_INTERNAL_2010=100
5006 VS_MSVCR_2010=msvcr100.dll
5007 # We don't use msvcp on Visual Studio 2010
5008 #VS_MSVCP_2010=msvcp100.dll
5009 VS_ENVVAR_2010="VS100COMNTOOLS"
5010 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5011 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5012 VS_VS_PLATFORM_NAME_2010="v100"
5013 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5014 
5015 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5016 VS_VERSION_INTERNAL_2012=110
5017 VS_MSVCR_2012=msvcr110.dll
5018 VS_MSVCP_2012=msvcp110.dll
5019 VS_ENVVAR_2012="VS110COMNTOOLS"
5020 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5021 VS_SDK_INSTALLDIR_2012=
5022 VS_VS_PLATFORM_NAME_2012="v110"
5023 VS_SDK_PLATFORM_NAME_2012=
5024 
5025 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5026 VS_VERSION_INTERNAL_2013=120
5027 VS_MSVCR_2013=msvcr120.dll
5028 VS_MSVCP_2013=msvcp120.dll
5029 VS_ENVVAR_2013="VS120COMNTOOLS"
5030 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5031 VS_SDK_INSTALLDIR_2013=
5032 VS_VS_PLATFORM_NAME_2013="v120"
5033 VS_SDK_PLATFORM_NAME_2013=
5034 
5035 ################################################################################
5036 
5037 
5038 
5039 ################################################################################
5040 
5041 
5042 
5043 ################################################################################
5044 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5045 # build environment and assigns it to VS_ENV_CMD
5046 
5047 
5048 ################################################################################
5049 
5050 
5051 
5052 ################################################################################
5053 # Check if the VS env variables were setup prior to running configure.
5054 # If not, then find vcvarsall.bat and run it automatically, and integrate
5055 # the set env variables into the spec file.
5056 
5057 
5058 
5059 
5060 
5061 
5062 
5063 
5064 
5065 
5066 
5067 
5068 
5069 
5070 # This line needs to be here, verbatim, after all includes and the dummy hook
5071 # definitions. It is replaced with custom functionality when building
5072 # custom sources.
5073 #CUSTOM_AUTOCONF_INCLUDE
5074 
5075 # Do not change or remove the following line, it is needed for consistency checks:
5076 DATE_WHEN_GENERATED=1462806878
5077 
5078 ###############################################################################
5079 #
5080 # Initialization / Boot-strapping
5081 #
5082 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5083 # thus it jumps back and forth, each time gaining something needed later on.
5084 #
5085 ###############################################################################
5086 
5087 # If we are requested to print additional help, do that and then exit.
5088 # This must be the very first call.
5089 
5090   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5091 
5092     # Print available toolchains
5093     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5094     $PRINTF "Which are valid to use depends on the build platform.\n"
5095     for toolchain in $VALID_TOOLCHAINS_all; do
5096       # Use indirect variable referencing
5097       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5098       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5099       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5100     done
5101     $PRINTF "\n"
5102 
5103     # Print available jvm features
5104     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5105     $PRINTF "Which are valid to use depends on the target platform.\n  "
5106     $PRINTF "%s " $VALID_JVM_FEATURES
5107     $PRINTF "\n"
5108 
5109     # And now exit directly
5110     exit 0
5111   fi
5112 
5113 
5114 # Basic initialization that must happen first of all in the normal process.
5115 
5116   # Save the original command line. This is passed to us by the wrapper configure script.
5117 
5118   # Save the path variable before it gets changed
5119   ORIGINAL_PATH="$PATH"
5120 
5121   DATE_WHEN_CONFIGURED=`LANG=C date`
5122 
5123   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5124 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5125   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5126 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5127 
5128 
5129   # Start with tools that do not need have cross compilation support
5130   # and can be expected to be found in the default PATH. These tools are
5131   # used by configure.
5132 
5133   # First are all the simple required tools.
5134 
5135 
5136 
5137   # Publish this variable in the help.
5138 
5139 
5140   if [ -z "${BASENAME+x}" ]; then
5141     # The variable is not set by user, try to locate tool using the code snippet
5142     for ac_prog in basename
5143 do
5144   # Extract the first word of "$ac_prog", so it can be a program name with args.
5145 set dummy $ac_prog; ac_word=$2
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147 $as_echo_n "checking for $ac_word... " >&6; }
5148 if ${ac_cv_path_BASENAME+:} false; then :
5149   $as_echo_n "(cached) " >&6
5150 else
5151   case $BASENAME in
5152   [\\/]* | ?:[\\/]*)
5153   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5154   ;;
5155   *)
5156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5157 for as_dir in $PATH
5158 do
5159   IFS=$as_save_IFS
5160   test -z "$as_dir" && as_dir=.
5161     for ac_exec_ext in '' $ac_executable_extensions; do
5162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5163     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5165     break 2
5166   fi
5167 done
5168   done
5169 IFS=$as_save_IFS
5170 
5171   ;;
5172 esac
5173 fi
5174 BASENAME=$ac_cv_path_BASENAME
5175 if test -n "$BASENAME"; then
5176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5177 $as_echo "$BASENAME" >&6; }
5178 else
5179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5180 $as_echo "no" >&6; }
5181 fi
5182 
5183 
5184   test -n "$BASENAME" && break
5185 done
5186 
5187   else
5188     # The variable is set, but is it from the command line or the environment?
5189 
5190     # Try to remove the string !BASENAME! from our list.
5191     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5192     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5193       # If it failed, the variable was not from the command line. Ignore it,
5194       # but warn the user (except for BASH, which is always set by the calling BASH).
5195       if test "xBASENAME" != xBASH; then
5196         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5197 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5198       fi
5199       # Try to locate tool using the code snippet
5200       for ac_prog in basename
5201 do
5202   # Extract the first word of "$ac_prog", so it can be a program name with args.
5203 set dummy $ac_prog; ac_word=$2
5204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5205 $as_echo_n "checking for $ac_word... " >&6; }
5206 if ${ac_cv_path_BASENAME+:} false; then :
5207   $as_echo_n "(cached) " >&6
5208 else
5209   case $BASENAME in
5210   [\\/]* | ?:[\\/]*)
5211   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5212   ;;
5213   *)
5214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5215 for as_dir in $PATH
5216 do
5217   IFS=$as_save_IFS
5218   test -z "$as_dir" && as_dir=.
5219     for ac_exec_ext in '' $ac_executable_extensions; do
5220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5221     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5223     break 2
5224   fi
5225 done
5226   done
5227 IFS=$as_save_IFS
5228 
5229   ;;
5230 esac
5231 fi
5232 BASENAME=$ac_cv_path_BASENAME
5233 if test -n "$BASENAME"; then
5234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5235 $as_echo "$BASENAME" >&6; }
5236 else
5237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238 $as_echo "no" >&6; }
5239 fi
5240 
5241 
5242   test -n "$BASENAME" && break
5243 done
5244 
5245     else
5246       # If it succeeded, then it was overridden by the user. We will use it
5247       # for the tool.
5248 
5249       # First remove it from the list of overridden variables, so we can test
5250       # for unknown variables in the end.
5251       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5252 
5253       # Check if we try to supply an empty value
5254       if test "x$BASENAME" = x; then
5255         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5256 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5258 $as_echo_n "checking for BASENAME... " >&6; }
5259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5260 $as_echo "disabled" >&6; }
5261       else
5262         # Check if the provided tool contains a complete path.
5263         tool_specified="$BASENAME"
5264         tool_basename="${tool_specified##*/}"
5265         if test "x$tool_basename" = "x$tool_specified"; then
5266           # A command without a complete path is provided, search $PATH.
5267           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5268 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5269           # Extract the first word of "$tool_basename", so it can be a program name with args.
5270 set dummy $tool_basename; ac_word=$2
5271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5272 $as_echo_n "checking for $ac_word... " >&6; }
5273 if ${ac_cv_path_BASENAME+:} false; then :
5274   $as_echo_n "(cached) " >&6
5275 else
5276   case $BASENAME in
5277   [\\/]* | ?:[\\/]*)
5278   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5279   ;;
5280   *)
5281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5282 for as_dir in $PATH
5283 do
5284   IFS=$as_save_IFS
5285   test -z "$as_dir" && as_dir=.
5286     for ac_exec_ext in '' $ac_executable_extensions; do
5287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5288     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5290     break 2
5291   fi
5292 done
5293   done
5294 IFS=$as_save_IFS
5295 
5296   ;;
5297 esac
5298 fi
5299 BASENAME=$ac_cv_path_BASENAME
5300 if test -n "$BASENAME"; then
5301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5302 $as_echo "$BASENAME" >&6; }
5303 else
5304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5305 $as_echo "no" >&6; }
5306 fi
5307 
5308 
5309           if test "x$BASENAME" = x; then
5310             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5311           fi
5312         else
5313           # Otherwise we believe it is a complete path. Use it as it is.
5314           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5315 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5316           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5317 $as_echo_n "checking for BASENAME... " >&6; }
5318           if test ! -x "$tool_specified"; then
5319             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5320 $as_echo "not found" >&6; }
5321             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5322           fi
5323           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5324 $as_echo "$tool_specified" >&6; }
5325         fi
5326       fi
5327     fi
5328 
5329   fi
5330 
5331 
5332 
5333   if test "x$BASENAME" = x; then
5334     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5335   fi
5336 
5337 
5338 
5339 
5340 
5341   # Publish this variable in the help.
5342 
5343 
5344   if [ -z "${BASH+x}" ]; then
5345     # The variable is not set by user, try to locate tool using the code snippet
5346     for ac_prog in bash
5347 do
5348   # Extract the first word of "$ac_prog", so it can be a program name with args.
5349 set dummy $ac_prog; ac_word=$2
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5351 $as_echo_n "checking for $ac_word... " >&6; }
5352 if ${ac_cv_path_BASH+:} false; then :
5353   $as_echo_n "(cached) " >&6
5354 else
5355   case $BASH in
5356   [\\/]* | ?:[\\/]*)
5357   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5358   ;;
5359   *)
5360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5361 for as_dir in $PATH
5362 do
5363   IFS=$as_save_IFS
5364   test -z "$as_dir" && as_dir=.
5365     for ac_exec_ext in '' $ac_executable_extensions; do
5366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5367     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5369     break 2
5370   fi
5371 done
5372   done
5373 IFS=$as_save_IFS
5374 
5375   ;;
5376 esac
5377 fi
5378 BASH=$ac_cv_path_BASH
5379 if test -n "$BASH"; then
5380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5381 $as_echo "$BASH" >&6; }
5382 else
5383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5384 $as_echo "no" >&6; }
5385 fi
5386 
5387 
5388   test -n "$BASH" && break
5389 done
5390 
5391   else
5392     # The variable is set, but is it from the command line or the environment?
5393 
5394     # Try to remove the string !BASH! from our list.
5395     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5396     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5397       # If it failed, the variable was not from the command line. Ignore it,
5398       # but warn the user (except for BASH, which is always set by the calling BASH).
5399       if test "xBASH" != xBASH; then
5400         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5401 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5402       fi
5403       # Try to locate tool using the code snippet
5404       for ac_prog in bash
5405 do
5406   # Extract the first word of "$ac_prog", so it can be a program name with args.
5407 set dummy $ac_prog; ac_word=$2
5408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5409 $as_echo_n "checking for $ac_word... " >&6; }
5410 if ${ac_cv_path_BASH+:} false; then :
5411   $as_echo_n "(cached) " >&6
5412 else
5413   case $BASH in
5414   [\\/]* | ?:[\\/]*)
5415   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5416   ;;
5417   *)
5418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5419 for as_dir in $PATH
5420 do
5421   IFS=$as_save_IFS
5422   test -z "$as_dir" && as_dir=.
5423     for ac_exec_ext in '' $ac_executable_extensions; do
5424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5425     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5426     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5427     break 2
5428   fi
5429 done
5430   done
5431 IFS=$as_save_IFS
5432 
5433   ;;
5434 esac
5435 fi
5436 BASH=$ac_cv_path_BASH
5437 if test -n "$BASH"; then
5438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5439 $as_echo "$BASH" >&6; }
5440 else
5441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5442 $as_echo "no" >&6; }
5443 fi
5444 
5445 
5446   test -n "$BASH" && break
5447 done
5448 
5449     else
5450       # If it succeeded, then it was overridden by the user. We will use it
5451       # for the tool.
5452 
5453       # First remove it from the list of overridden variables, so we can test
5454       # for unknown variables in the end.
5455       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5456 
5457       # Check if we try to supply an empty value
5458       if test "x$BASH" = x; then
5459         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5460 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5461         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5462 $as_echo_n "checking for BASH... " >&6; }
5463         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5464 $as_echo "disabled" >&6; }
5465       else
5466         # Check if the provided tool contains a complete path.
5467         tool_specified="$BASH"
5468         tool_basename="${tool_specified##*/}"
5469         if test "x$tool_basename" = "x$tool_specified"; then
5470           # A command without a complete path is provided, search $PATH.
5471           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5472 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5473           # Extract the first word of "$tool_basename", so it can be a program name with args.
5474 set dummy $tool_basename; ac_word=$2
5475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5476 $as_echo_n "checking for $ac_word... " >&6; }
5477 if ${ac_cv_path_BASH+:} false; then :
5478   $as_echo_n "(cached) " >&6
5479 else
5480   case $BASH in
5481   [\\/]* | ?:[\\/]*)
5482   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5483   ;;
5484   *)
5485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5486 for as_dir in $PATH
5487 do
5488   IFS=$as_save_IFS
5489   test -z "$as_dir" && as_dir=.
5490     for ac_exec_ext in '' $ac_executable_extensions; do
5491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5492     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5494     break 2
5495   fi
5496 done
5497   done
5498 IFS=$as_save_IFS
5499 
5500   ;;
5501 esac
5502 fi
5503 BASH=$ac_cv_path_BASH
5504 if test -n "$BASH"; then
5505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5506 $as_echo "$BASH" >&6; }
5507 else
5508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5509 $as_echo "no" >&6; }
5510 fi
5511 
5512 
5513           if test "x$BASH" = x; then
5514             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5515           fi
5516         else
5517           # Otherwise we believe it is a complete path. Use it as it is.
5518           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5519 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5520           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5521 $as_echo_n "checking for BASH... " >&6; }
5522           if test ! -x "$tool_specified"; then
5523             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5524 $as_echo "not found" >&6; }
5525             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5526           fi
5527           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5528 $as_echo "$tool_specified" >&6; }
5529         fi
5530       fi
5531     fi
5532 
5533   fi
5534 
5535 
5536 
5537   if test "x$BASH" = x; then
5538     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5539   fi
5540 
5541 
5542 
5543 
5544 
5545   # Publish this variable in the help.
5546 
5547 
5548   if [ -z "${CAT+x}" ]; then
5549     # The variable is not set by user, try to locate tool using the code snippet
5550     for ac_prog in cat
5551 do
5552   # Extract the first word of "$ac_prog", so it can be a program name with args.
5553 set dummy $ac_prog; ac_word=$2
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5555 $as_echo_n "checking for $ac_word... " >&6; }
5556 if ${ac_cv_path_CAT+:} false; then :
5557   $as_echo_n "(cached) " >&6
5558 else
5559   case $CAT in
5560   [\\/]* | ?:[\\/]*)
5561   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5562   ;;
5563   *)
5564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5565 for as_dir in $PATH
5566 do
5567   IFS=$as_save_IFS
5568   test -z "$as_dir" && as_dir=.
5569     for ac_exec_ext in '' $ac_executable_extensions; do
5570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5571     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5573     break 2
5574   fi
5575 done
5576   done
5577 IFS=$as_save_IFS
5578 
5579   ;;
5580 esac
5581 fi
5582 CAT=$ac_cv_path_CAT
5583 if test -n "$CAT"; then
5584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5585 $as_echo "$CAT" >&6; }
5586 else
5587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5588 $as_echo "no" >&6; }
5589 fi
5590 
5591 
5592   test -n "$CAT" && break
5593 done
5594 
5595   else
5596     # The variable is set, but is it from the command line or the environment?
5597 
5598     # Try to remove the string !CAT! from our list.
5599     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5600     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5601       # If it failed, the variable was not from the command line. Ignore it,
5602       # but warn the user (except for BASH, which is always set by the calling BASH).
5603       if test "xCAT" != xBASH; then
5604         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5605 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5606       fi
5607       # Try to locate tool using the code snippet
5608       for ac_prog in cat
5609 do
5610   # Extract the first word of "$ac_prog", so it can be a program name with args.
5611 set dummy $ac_prog; ac_word=$2
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5613 $as_echo_n "checking for $ac_word... " >&6; }
5614 if ${ac_cv_path_CAT+:} false; then :
5615   $as_echo_n "(cached) " >&6
5616 else
5617   case $CAT in
5618   [\\/]* | ?:[\\/]*)
5619   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5620   ;;
5621   *)
5622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5623 for as_dir in $PATH
5624 do
5625   IFS=$as_save_IFS
5626   test -z "$as_dir" && as_dir=.
5627     for ac_exec_ext in '' $ac_executable_extensions; do
5628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5629     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5631     break 2
5632   fi
5633 done
5634   done
5635 IFS=$as_save_IFS
5636 
5637   ;;
5638 esac
5639 fi
5640 CAT=$ac_cv_path_CAT
5641 if test -n "$CAT"; then
5642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5643 $as_echo "$CAT" >&6; }
5644 else
5645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5646 $as_echo "no" >&6; }
5647 fi
5648 
5649 
5650   test -n "$CAT" && break
5651 done
5652 
5653     else
5654       # If it succeeded, then it was overridden by the user. We will use it
5655       # for the tool.
5656 
5657       # First remove it from the list of overridden variables, so we can test
5658       # for unknown variables in the end.
5659       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5660 
5661       # Check if we try to supply an empty value
5662       if test "x$CAT" = x; then
5663         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5664 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5665         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5666 $as_echo_n "checking for CAT... " >&6; }
5667         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5668 $as_echo "disabled" >&6; }
5669       else
5670         # Check if the provided tool contains a complete path.
5671         tool_specified="$CAT"
5672         tool_basename="${tool_specified##*/}"
5673         if test "x$tool_basename" = "x$tool_specified"; then
5674           # A command without a complete path is provided, search $PATH.
5675           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5676 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5677           # Extract the first word of "$tool_basename", so it can be a program name with args.
5678 set dummy $tool_basename; ac_word=$2
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5680 $as_echo_n "checking for $ac_word... " >&6; }
5681 if ${ac_cv_path_CAT+:} false; then :
5682   $as_echo_n "(cached) " >&6
5683 else
5684   case $CAT in
5685   [\\/]* | ?:[\\/]*)
5686   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5687   ;;
5688   *)
5689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5690 for as_dir in $PATH
5691 do
5692   IFS=$as_save_IFS
5693   test -z "$as_dir" && as_dir=.
5694     for ac_exec_ext in '' $ac_executable_extensions; do
5695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5696     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5698     break 2
5699   fi
5700 done
5701   done
5702 IFS=$as_save_IFS
5703 
5704   ;;
5705 esac
5706 fi
5707 CAT=$ac_cv_path_CAT
5708 if test -n "$CAT"; then
5709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5710 $as_echo "$CAT" >&6; }
5711 else
5712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5713 $as_echo "no" >&6; }
5714 fi
5715 
5716 
5717           if test "x$CAT" = x; then
5718             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5719           fi
5720         else
5721           # Otherwise we believe it is a complete path. Use it as it is.
5722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5723 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5724           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5725 $as_echo_n "checking for CAT... " >&6; }
5726           if test ! -x "$tool_specified"; then
5727             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5728 $as_echo "not found" >&6; }
5729             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5730           fi
5731           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5732 $as_echo "$tool_specified" >&6; }
5733         fi
5734       fi
5735     fi
5736 
5737   fi
5738 
5739 
5740 
5741   if test "x$CAT" = x; then
5742     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5743   fi
5744 
5745 
5746 
5747 
5748 
5749   # Publish this variable in the help.
5750 
5751 
5752   if [ -z "${CHMOD+x}" ]; then
5753     # The variable is not set by user, try to locate tool using the code snippet
5754     for ac_prog in chmod
5755 do
5756   # Extract the first word of "$ac_prog", so it can be a program name with args.
5757 set dummy $ac_prog; ac_word=$2
5758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5759 $as_echo_n "checking for $ac_word... " >&6; }
5760 if ${ac_cv_path_CHMOD+:} false; then :
5761   $as_echo_n "(cached) " >&6
5762 else
5763   case $CHMOD in
5764   [\\/]* | ?:[\\/]*)
5765   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5766   ;;
5767   *)
5768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5769 for as_dir in $PATH
5770 do
5771   IFS=$as_save_IFS
5772   test -z "$as_dir" && as_dir=.
5773     for ac_exec_ext in '' $ac_executable_extensions; do
5774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5775     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5777     break 2
5778   fi
5779 done
5780   done
5781 IFS=$as_save_IFS
5782 
5783   ;;
5784 esac
5785 fi
5786 CHMOD=$ac_cv_path_CHMOD
5787 if test -n "$CHMOD"; then
5788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5789 $as_echo "$CHMOD" >&6; }
5790 else
5791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5792 $as_echo "no" >&6; }
5793 fi
5794 
5795 
5796   test -n "$CHMOD" && break
5797 done
5798 
5799   else
5800     # The variable is set, but is it from the command line or the environment?
5801 
5802     # Try to remove the string !CHMOD! from our list.
5803     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5804     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5805       # If it failed, the variable was not from the command line. Ignore it,
5806       # but warn the user (except for BASH, which is always set by the calling BASH).
5807       if test "xCHMOD" != xBASH; then
5808         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5809 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5810       fi
5811       # Try to locate tool using the code snippet
5812       for ac_prog in chmod
5813 do
5814   # Extract the first word of "$ac_prog", so it can be a program name with args.
5815 set dummy $ac_prog; ac_word=$2
5816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5817 $as_echo_n "checking for $ac_word... " >&6; }
5818 if ${ac_cv_path_CHMOD+:} false; then :
5819   $as_echo_n "(cached) " >&6
5820 else
5821   case $CHMOD in
5822   [\\/]* | ?:[\\/]*)
5823   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5824   ;;
5825   *)
5826   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5827 for as_dir in $PATH
5828 do
5829   IFS=$as_save_IFS
5830   test -z "$as_dir" && as_dir=.
5831     for ac_exec_ext in '' $ac_executable_extensions; do
5832   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5833     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5835     break 2
5836   fi
5837 done
5838   done
5839 IFS=$as_save_IFS
5840 
5841   ;;
5842 esac
5843 fi
5844 CHMOD=$ac_cv_path_CHMOD
5845 if test -n "$CHMOD"; then
5846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5847 $as_echo "$CHMOD" >&6; }
5848 else
5849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5850 $as_echo "no" >&6; }
5851 fi
5852 
5853 
5854   test -n "$CHMOD" && break
5855 done
5856 
5857     else
5858       # If it succeeded, then it was overridden by the user. We will use it
5859       # for the tool.
5860 
5861       # First remove it from the list of overridden variables, so we can test
5862       # for unknown variables in the end.
5863       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5864 
5865       # Check if we try to supply an empty value
5866       if test "x$CHMOD" = x; then
5867         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5868 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5869         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5870 $as_echo_n "checking for CHMOD... " >&6; }
5871         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5872 $as_echo "disabled" >&6; }
5873       else
5874         # Check if the provided tool contains a complete path.
5875         tool_specified="$CHMOD"
5876         tool_basename="${tool_specified##*/}"
5877         if test "x$tool_basename" = "x$tool_specified"; then
5878           # A command without a complete path is provided, search $PATH.
5879           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5880 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5881           # Extract the first word of "$tool_basename", so it can be a program name with args.
5882 set dummy $tool_basename; ac_word=$2
5883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5884 $as_echo_n "checking for $ac_word... " >&6; }
5885 if ${ac_cv_path_CHMOD+:} false; then :
5886   $as_echo_n "(cached) " >&6
5887 else
5888   case $CHMOD in
5889   [\\/]* | ?:[\\/]*)
5890   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5891   ;;
5892   *)
5893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5894 for as_dir in $PATH
5895 do
5896   IFS=$as_save_IFS
5897   test -z "$as_dir" && as_dir=.
5898     for ac_exec_ext in '' $ac_executable_extensions; do
5899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5900     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5902     break 2
5903   fi
5904 done
5905   done
5906 IFS=$as_save_IFS
5907 
5908   ;;
5909 esac
5910 fi
5911 CHMOD=$ac_cv_path_CHMOD
5912 if test -n "$CHMOD"; then
5913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5914 $as_echo "$CHMOD" >&6; }
5915 else
5916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5917 $as_echo "no" >&6; }
5918 fi
5919 
5920 
5921           if test "x$CHMOD" = x; then
5922             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5923           fi
5924         else
5925           # Otherwise we believe it is a complete path. Use it as it is.
5926           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5927 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5928           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5929 $as_echo_n "checking for CHMOD... " >&6; }
5930           if test ! -x "$tool_specified"; then
5931             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5932 $as_echo "not found" >&6; }
5933             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5934           fi
5935           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5936 $as_echo "$tool_specified" >&6; }
5937         fi
5938       fi
5939     fi
5940 
5941   fi
5942 
5943 
5944 
5945   if test "x$CHMOD" = x; then
5946     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5947   fi
5948 
5949 
5950 
5951 
5952 
5953   # Publish this variable in the help.
5954 
5955 
5956   if [ -z "${CMP+x}" ]; then
5957     # The variable is not set by user, try to locate tool using the code snippet
5958     for ac_prog in cmp
5959 do
5960   # Extract the first word of "$ac_prog", so it can be a program name with args.
5961 set dummy $ac_prog; ac_word=$2
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5963 $as_echo_n "checking for $ac_word... " >&6; }
5964 if ${ac_cv_path_CMP+:} false; then :
5965   $as_echo_n "(cached) " >&6
5966 else
5967   case $CMP in
5968   [\\/]* | ?:[\\/]*)
5969   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5970   ;;
5971   *)
5972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5973 for as_dir in $PATH
5974 do
5975   IFS=$as_save_IFS
5976   test -z "$as_dir" && as_dir=.
5977     for ac_exec_ext in '' $ac_executable_extensions; do
5978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5979     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5981     break 2
5982   fi
5983 done
5984   done
5985 IFS=$as_save_IFS
5986 
5987   ;;
5988 esac
5989 fi
5990 CMP=$ac_cv_path_CMP
5991 if test -n "$CMP"; then
5992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5993 $as_echo "$CMP" >&6; }
5994 else
5995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5996 $as_echo "no" >&6; }
5997 fi
5998 
5999 
6000   test -n "$CMP" && break
6001 done
6002 
6003   else
6004     # The variable is set, but is it from the command line or the environment?
6005 
6006     # Try to remove the string !CMP! from our list.
6007     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6008     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6009       # If it failed, the variable was not from the command line. Ignore it,
6010       # but warn the user (except for BASH, which is always set by the calling BASH).
6011       if test "xCMP" != xBASH; then
6012         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6013 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6014       fi
6015       # Try to locate tool using the code snippet
6016       for ac_prog in cmp
6017 do
6018   # Extract the first word of "$ac_prog", so it can be a program name with args.
6019 set dummy $ac_prog; ac_word=$2
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6021 $as_echo_n "checking for $ac_word... " >&6; }
6022 if ${ac_cv_path_CMP+:} false; then :
6023   $as_echo_n "(cached) " >&6
6024 else
6025   case $CMP in
6026   [\\/]* | ?:[\\/]*)
6027   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6028   ;;
6029   *)
6030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6031 for as_dir in $PATH
6032 do
6033   IFS=$as_save_IFS
6034   test -z "$as_dir" && as_dir=.
6035     for ac_exec_ext in '' $ac_executable_extensions; do
6036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6037     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6039     break 2
6040   fi
6041 done
6042   done
6043 IFS=$as_save_IFS
6044 
6045   ;;
6046 esac
6047 fi
6048 CMP=$ac_cv_path_CMP
6049 if test -n "$CMP"; then
6050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6051 $as_echo "$CMP" >&6; }
6052 else
6053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6054 $as_echo "no" >&6; }
6055 fi
6056 
6057 
6058   test -n "$CMP" && break
6059 done
6060 
6061     else
6062       # If it succeeded, then it was overridden by the user. We will use it
6063       # for the tool.
6064 
6065       # First remove it from the list of overridden variables, so we can test
6066       # for unknown variables in the end.
6067       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6068 
6069       # Check if we try to supply an empty value
6070       if test "x$CMP" = x; then
6071         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6072 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6073         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6074 $as_echo_n "checking for CMP... " >&6; }
6075         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6076 $as_echo "disabled" >&6; }
6077       else
6078         # Check if the provided tool contains a complete path.
6079         tool_specified="$CMP"
6080         tool_basename="${tool_specified##*/}"
6081         if test "x$tool_basename" = "x$tool_specified"; then
6082           # A command without a complete path is provided, search $PATH.
6083           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6084 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6085           # Extract the first word of "$tool_basename", so it can be a program name with args.
6086 set dummy $tool_basename; ac_word=$2
6087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6088 $as_echo_n "checking for $ac_word... " >&6; }
6089 if ${ac_cv_path_CMP+:} false; then :
6090   $as_echo_n "(cached) " >&6
6091 else
6092   case $CMP in
6093   [\\/]* | ?:[\\/]*)
6094   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6095   ;;
6096   *)
6097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6098 for as_dir in $PATH
6099 do
6100   IFS=$as_save_IFS
6101   test -z "$as_dir" && as_dir=.
6102     for ac_exec_ext in '' $ac_executable_extensions; do
6103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6104     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6106     break 2
6107   fi
6108 done
6109   done
6110 IFS=$as_save_IFS
6111 
6112   ;;
6113 esac
6114 fi
6115 CMP=$ac_cv_path_CMP
6116 if test -n "$CMP"; then
6117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6118 $as_echo "$CMP" >&6; }
6119 else
6120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6121 $as_echo "no" >&6; }
6122 fi
6123 
6124 
6125           if test "x$CMP" = x; then
6126             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6127           fi
6128         else
6129           # Otherwise we believe it is a complete path. Use it as it is.
6130           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6131 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6132           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6133 $as_echo_n "checking for CMP... " >&6; }
6134           if test ! -x "$tool_specified"; then
6135             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6136 $as_echo "not found" >&6; }
6137             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6138           fi
6139           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6140 $as_echo "$tool_specified" >&6; }
6141         fi
6142       fi
6143     fi
6144 
6145   fi
6146 
6147 
6148 
6149   if test "x$CMP" = x; then
6150     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6151   fi
6152 
6153 
6154 
6155 
6156 
6157   # Publish this variable in the help.
6158 
6159 
6160   if [ -z "${COMM+x}" ]; then
6161     # The variable is not set by user, try to locate tool using the code snippet
6162     for ac_prog in comm
6163 do
6164   # Extract the first word of "$ac_prog", so it can be a program name with args.
6165 set dummy $ac_prog; ac_word=$2
6166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6167 $as_echo_n "checking for $ac_word... " >&6; }
6168 if ${ac_cv_path_COMM+:} false; then :
6169   $as_echo_n "(cached) " >&6
6170 else
6171   case $COMM in
6172   [\\/]* | ?:[\\/]*)
6173   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6174   ;;
6175   *)
6176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6177 for as_dir in $PATH
6178 do
6179   IFS=$as_save_IFS
6180   test -z "$as_dir" && as_dir=.
6181     for ac_exec_ext in '' $ac_executable_extensions; do
6182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6183     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6185     break 2
6186   fi
6187 done
6188   done
6189 IFS=$as_save_IFS
6190 
6191   ;;
6192 esac
6193 fi
6194 COMM=$ac_cv_path_COMM
6195 if test -n "$COMM"; then
6196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6197 $as_echo "$COMM" >&6; }
6198 else
6199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6200 $as_echo "no" >&6; }
6201 fi
6202 
6203 
6204   test -n "$COMM" && break
6205 done
6206 
6207   else
6208     # The variable is set, but is it from the command line or the environment?
6209 
6210     # Try to remove the string !COMM! from our list.
6211     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6212     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6213       # If it failed, the variable was not from the command line. Ignore it,
6214       # but warn the user (except for BASH, which is always set by the calling BASH).
6215       if test "xCOMM" != xBASH; then
6216         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6217 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6218       fi
6219       # Try to locate tool using the code snippet
6220       for ac_prog in comm
6221 do
6222   # Extract the first word of "$ac_prog", so it can be a program name with args.
6223 set dummy $ac_prog; ac_word=$2
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225 $as_echo_n "checking for $ac_word... " >&6; }
6226 if ${ac_cv_path_COMM+:} false; then :
6227   $as_echo_n "(cached) " >&6
6228 else
6229   case $COMM in
6230   [\\/]* | ?:[\\/]*)
6231   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6232   ;;
6233   *)
6234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6235 for as_dir in $PATH
6236 do
6237   IFS=$as_save_IFS
6238   test -z "$as_dir" && as_dir=.
6239     for ac_exec_ext in '' $ac_executable_extensions; do
6240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6241     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6243     break 2
6244   fi
6245 done
6246   done
6247 IFS=$as_save_IFS
6248 
6249   ;;
6250 esac
6251 fi
6252 COMM=$ac_cv_path_COMM
6253 if test -n "$COMM"; then
6254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6255 $as_echo "$COMM" >&6; }
6256 else
6257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6258 $as_echo "no" >&6; }
6259 fi
6260 
6261 
6262   test -n "$COMM" && break
6263 done
6264 
6265     else
6266       # If it succeeded, then it was overridden by the user. We will use it
6267       # for the tool.
6268 
6269       # First remove it from the list of overridden variables, so we can test
6270       # for unknown variables in the end.
6271       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6272 
6273       # Check if we try to supply an empty value
6274       if test "x$COMM" = x; then
6275         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6276 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6277         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6278 $as_echo_n "checking for COMM... " >&6; }
6279         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6280 $as_echo "disabled" >&6; }
6281       else
6282         # Check if the provided tool contains a complete path.
6283         tool_specified="$COMM"
6284         tool_basename="${tool_specified##*/}"
6285         if test "x$tool_basename" = "x$tool_specified"; then
6286           # A command without a complete path is provided, search $PATH.
6287           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6288 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6289           # Extract the first word of "$tool_basename", so it can be a program name with args.
6290 set dummy $tool_basename; ac_word=$2
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6292 $as_echo_n "checking for $ac_word... " >&6; }
6293 if ${ac_cv_path_COMM+:} false; then :
6294   $as_echo_n "(cached) " >&6
6295 else
6296   case $COMM in
6297   [\\/]* | ?:[\\/]*)
6298   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6299   ;;
6300   *)
6301   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6302 for as_dir in $PATH
6303 do
6304   IFS=$as_save_IFS
6305   test -z "$as_dir" && as_dir=.
6306     for ac_exec_ext in '' $ac_executable_extensions; do
6307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6308     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6310     break 2
6311   fi
6312 done
6313   done
6314 IFS=$as_save_IFS
6315 
6316   ;;
6317 esac
6318 fi
6319 COMM=$ac_cv_path_COMM
6320 if test -n "$COMM"; then
6321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6322 $as_echo "$COMM" >&6; }
6323 else
6324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6325 $as_echo "no" >&6; }
6326 fi
6327 
6328 
6329           if test "x$COMM" = x; then
6330             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6331           fi
6332         else
6333           # Otherwise we believe it is a complete path. Use it as it is.
6334           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6335 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6336           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6337 $as_echo_n "checking for COMM... " >&6; }
6338           if test ! -x "$tool_specified"; then
6339             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6340 $as_echo "not found" >&6; }
6341             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6342           fi
6343           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6344 $as_echo "$tool_specified" >&6; }
6345         fi
6346       fi
6347     fi
6348 
6349   fi
6350 
6351 
6352 
6353   if test "x$COMM" = x; then
6354     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6355   fi
6356 
6357 
6358 
6359 
6360 
6361   # Publish this variable in the help.
6362 
6363 
6364   if [ -z "${CP+x}" ]; then
6365     # The variable is not set by user, try to locate tool using the code snippet
6366     for ac_prog in cp
6367 do
6368   # Extract the first word of "$ac_prog", so it can be a program name with args.
6369 set dummy $ac_prog; ac_word=$2
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6371 $as_echo_n "checking for $ac_word... " >&6; }
6372 if ${ac_cv_path_CP+:} false; then :
6373   $as_echo_n "(cached) " >&6
6374 else
6375   case $CP in
6376   [\\/]* | ?:[\\/]*)
6377   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6378   ;;
6379   *)
6380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6381 for as_dir in $PATH
6382 do
6383   IFS=$as_save_IFS
6384   test -z "$as_dir" && as_dir=.
6385     for ac_exec_ext in '' $ac_executable_extensions; do
6386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6387     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6389     break 2
6390   fi
6391 done
6392   done
6393 IFS=$as_save_IFS
6394 
6395   ;;
6396 esac
6397 fi
6398 CP=$ac_cv_path_CP
6399 if test -n "$CP"; then
6400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6401 $as_echo "$CP" >&6; }
6402 else
6403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6404 $as_echo "no" >&6; }
6405 fi
6406 
6407 
6408   test -n "$CP" && break
6409 done
6410 
6411   else
6412     # The variable is set, but is it from the command line or the environment?
6413 
6414     # Try to remove the string !CP! from our list.
6415     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6416     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6417       # If it failed, the variable was not from the command line. Ignore it,
6418       # but warn the user (except for BASH, which is always set by the calling BASH).
6419       if test "xCP" != xBASH; then
6420         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6421 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6422       fi
6423       # Try to locate tool using the code snippet
6424       for ac_prog in cp
6425 do
6426   # Extract the first word of "$ac_prog", so it can be a program name with args.
6427 set dummy $ac_prog; ac_word=$2
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6429 $as_echo_n "checking for $ac_word... " >&6; }
6430 if ${ac_cv_path_CP+:} false; then :
6431   $as_echo_n "(cached) " >&6
6432 else
6433   case $CP in
6434   [\\/]* | ?:[\\/]*)
6435   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6436   ;;
6437   *)
6438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6439 for as_dir in $PATH
6440 do
6441   IFS=$as_save_IFS
6442   test -z "$as_dir" && as_dir=.
6443     for ac_exec_ext in '' $ac_executable_extensions; do
6444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6445     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6447     break 2
6448   fi
6449 done
6450   done
6451 IFS=$as_save_IFS
6452 
6453   ;;
6454 esac
6455 fi
6456 CP=$ac_cv_path_CP
6457 if test -n "$CP"; then
6458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6459 $as_echo "$CP" >&6; }
6460 else
6461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462 $as_echo "no" >&6; }
6463 fi
6464 
6465 
6466   test -n "$CP" && break
6467 done
6468 
6469     else
6470       # If it succeeded, then it was overridden by the user. We will use it
6471       # for the tool.
6472 
6473       # First remove it from the list of overridden variables, so we can test
6474       # for unknown variables in the end.
6475       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6476 
6477       # Check if we try to supply an empty value
6478       if test "x$CP" = x; then
6479         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6480 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6481         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6482 $as_echo_n "checking for CP... " >&6; }
6483         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6484 $as_echo "disabled" >&6; }
6485       else
6486         # Check if the provided tool contains a complete path.
6487         tool_specified="$CP"
6488         tool_basename="${tool_specified##*/}"
6489         if test "x$tool_basename" = "x$tool_specified"; then
6490           # A command without a complete path is provided, search $PATH.
6491           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6492 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6493           # Extract the first word of "$tool_basename", so it can be a program name with args.
6494 set dummy $tool_basename; ac_word=$2
6495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6496 $as_echo_n "checking for $ac_word... " >&6; }
6497 if ${ac_cv_path_CP+:} false; then :
6498   $as_echo_n "(cached) " >&6
6499 else
6500   case $CP in
6501   [\\/]* | ?:[\\/]*)
6502   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6503   ;;
6504   *)
6505   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6506 for as_dir in $PATH
6507 do
6508   IFS=$as_save_IFS
6509   test -z "$as_dir" && as_dir=.
6510     for ac_exec_ext in '' $ac_executable_extensions; do
6511   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6512     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6514     break 2
6515   fi
6516 done
6517   done
6518 IFS=$as_save_IFS
6519 
6520   ;;
6521 esac
6522 fi
6523 CP=$ac_cv_path_CP
6524 if test -n "$CP"; then
6525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6526 $as_echo "$CP" >&6; }
6527 else
6528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529 $as_echo "no" >&6; }
6530 fi
6531 
6532 
6533           if test "x$CP" = x; then
6534             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6535           fi
6536         else
6537           # Otherwise we believe it is a complete path. Use it as it is.
6538           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6539 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6540           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6541 $as_echo_n "checking for CP... " >&6; }
6542           if test ! -x "$tool_specified"; then
6543             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6544 $as_echo "not found" >&6; }
6545             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6546           fi
6547           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6548 $as_echo "$tool_specified" >&6; }
6549         fi
6550       fi
6551     fi
6552 
6553   fi
6554 
6555 
6556 
6557   if test "x$CP" = x; then
6558     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6559   fi
6560 
6561 
6562 
6563 
6564 
6565   # Publish this variable in the help.
6566 
6567 
6568   if [ -z "${CUT+x}" ]; then
6569     # The variable is not set by user, try to locate tool using the code snippet
6570     for ac_prog in cut
6571 do
6572   # Extract the first word of "$ac_prog", so it can be a program name with args.
6573 set dummy $ac_prog; ac_word=$2
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6575 $as_echo_n "checking for $ac_word... " >&6; }
6576 if ${ac_cv_path_CUT+:} false; then :
6577   $as_echo_n "(cached) " >&6
6578 else
6579   case $CUT in
6580   [\\/]* | ?:[\\/]*)
6581   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6582   ;;
6583   *)
6584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6585 for as_dir in $PATH
6586 do
6587   IFS=$as_save_IFS
6588   test -z "$as_dir" && as_dir=.
6589     for ac_exec_ext in '' $ac_executable_extensions; do
6590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6591     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6593     break 2
6594   fi
6595 done
6596   done
6597 IFS=$as_save_IFS
6598 
6599   ;;
6600 esac
6601 fi
6602 CUT=$ac_cv_path_CUT
6603 if test -n "$CUT"; then
6604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6605 $as_echo "$CUT" >&6; }
6606 else
6607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6608 $as_echo "no" >&6; }
6609 fi
6610 
6611 
6612   test -n "$CUT" && break
6613 done
6614 
6615   else
6616     # The variable is set, but is it from the command line or the environment?
6617 
6618     # Try to remove the string !CUT! from our list.
6619     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6620     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6621       # If it failed, the variable was not from the command line. Ignore it,
6622       # but warn the user (except for BASH, which is always set by the calling BASH).
6623       if test "xCUT" != xBASH; then
6624         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6625 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6626       fi
6627       # Try to locate tool using the code snippet
6628       for ac_prog in cut
6629 do
6630   # Extract the first word of "$ac_prog", so it can be a program name with args.
6631 set dummy $ac_prog; ac_word=$2
6632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6633 $as_echo_n "checking for $ac_word... " >&6; }
6634 if ${ac_cv_path_CUT+:} false; then :
6635   $as_echo_n "(cached) " >&6
6636 else
6637   case $CUT in
6638   [\\/]* | ?:[\\/]*)
6639   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6640   ;;
6641   *)
6642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6643 for as_dir in $PATH
6644 do
6645   IFS=$as_save_IFS
6646   test -z "$as_dir" && as_dir=.
6647     for ac_exec_ext in '' $ac_executable_extensions; do
6648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6649     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6651     break 2
6652   fi
6653 done
6654   done
6655 IFS=$as_save_IFS
6656 
6657   ;;
6658 esac
6659 fi
6660 CUT=$ac_cv_path_CUT
6661 if test -n "$CUT"; then
6662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6663 $as_echo "$CUT" >&6; }
6664 else
6665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6666 $as_echo "no" >&6; }
6667 fi
6668 
6669 
6670   test -n "$CUT" && break
6671 done
6672 
6673     else
6674       # If it succeeded, then it was overridden by the user. We will use it
6675       # for the tool.
6676 
6677       # First remove it from the list of overridden variables, so we can test
6678       # for unknown variables in the end.
6679       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6680 
6681       # Check if we try to supply an empty value
6682       if test "x$CUT" = x; then
6683         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6684 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6685         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6686 $as_echo_n "checking for CUT... " >&6; }
6687         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6688 $as_echo "disabled" >&6; }
6689       else
6690         # Check if the provided tool contains a complete path.
6691         tool_specified="$CUT"
6692         tool_basename="${tool_specified##*/}"
6693         if test "x$tool_basename" = "x$tool_specified"; then
6694           # A command without a complete path is provided, search $PATH.
6695           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6696 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6697           # Extract the first word of "$tool_basename", so it can be a program name with args.
6698 set dummy $tool_basename; ac_word=$2
6699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6700 $as_echo_n "checking for $ac_word... " >&6; }
6701 if ${ac_cv_path_CUT+:} false; then :
6702   $as_echo_n "(cached) " >&6
6703 else
6704   case $CUT in
6705   [\\/]* | ?:[\\/]*)
6706   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6707   ;;
6708   *)
6709   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6710 for as_dir in $PATH
6711 do
6712   IFS=$as_save_IFS
6713   test -z "$as_dir" && as_dir=.
6714     for ac_exec_ext in '' $ac_executable_extensions; do
6715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6716     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6718     break 2
6719   fi
6720 done
6721   done
6722 IFS=$as_save_IFS
6723 
6724   ;;
6725 esac
6726 fi
6727 CUT=$ac_cv_path_CUT
6728 if test -n "$CUT"; then
6729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6730 $as_echo "$CUT" >&6; }
6731 else
6732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6733 $as_echo "no" >&6; }
6734 fi
6735 
6736 
6737           if test "x$CUT" = x; then
6738             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6739           fi
6740         else
6741           # Otherwise we believe it is a complete path. Use it as it is.
6742           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6743 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6744           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6745 $as_echo_n "checking for CUT... " >&6; }
6746           if test ! -x "$tool_specified"; then
6747             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6748 $as_echo "not found" >&6; }
6749             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6750           fi
6751           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6752 $as_echo "$tool_specified" >&6; }
6753         fi
6754       fi
6755     fi
6756 
6757   fi
6758 
6759 
6760 
6761   if test "x$CUT" = x; then
6762     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6763   fi
6764 
6765 
6766 
6767 
6768 
6769   # Publish this variable in the help.
6770 
6771 
6772   if [ -z "${DATE+x}" ]; then
6773     # The variable is not set by user, try to locate tool using the code snippet
6774     for ac_prog in date
6775 do
6776   # Extract the first word of "$ac_prog", so it can be a program name with args.
6777 set dummy $ac_prog; ac_word=$2
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6779 $as_echo_n "checking for $ac_word... " >&6; }
6780 if ${ac_cv_path_DATE+:} false; then :
6781   $as_echo_n "(cached) " >&6
6782 else
6783   case $DATE in
6784   [\\/]* | ?:[\\/]*)
6785   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6786   ;;
6787   *)
6788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6789 for as_dir in $PATH
6790 do
6791   IFS=$as_save_IFS
6792   test -z "$as_dir" && as_dir=.
6793     for ac_exec_ext in '' $ac_executable_extensions; do
6794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6795     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6797     break 2
6798   fi
6799 done
6800   done
6801 IFS=$as_save_IFS
6802 
6803   ;;
6804 esac
6805 fi
6806 DATE=$ac_cv_path_DATE
6807 if test -n "$DATE"; then
6808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6809 $as_echo "$DATE" >&6; }
6810 else
6811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6812 $as_echo "no" >&6; }
6813 fi
6814 
6815 
6816   test -n "$DATE" && break
6817 done
6818 
6819   else
6820     # The variable is set, but is it from the command line or the environment?
6821 
6822     # Try to remove the string !DATE! from our list.
6823     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6824     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6825       # If it failed, the variable was not from the command line. Ignore it,
6826       # but warn the user (except for BASH, which is always set by the calling BASH).
6827       if test "xDATE" != xBASH; then
6828         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6829 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6830       fi
6831       # Try to locate tool using the code snippet
6832       for ac_prog in date
6833 do
6834   # Extract the first word of "$ac_prog", so it can be a program name with args.
6835 set dummy $ac_prog; ac_word=$2
6836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6837 $as_echo_n "checking for $ac_word... " >&6; }
6838 if ${ac_cv_path_DATE+:} false; then :
6839   $as_echo_n "(cached) " >&6
6840 else
6841   case $DATE in
6842   [\\/]* | ?:[\\/]*)
6843   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6844   ;;
6845   *)
6846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6847 for as_dir in $PATH
6848 do
6849   IFS=$as_save_IFS
6850   test -z "$as_dir" && as_dir=.
6851     for ac_exec_ext in '' $ac_executable_extensions; do
6852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6853     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6855     break 2
6856   fi
6857 done
6858   done
6859 IFS=$as_save_IFS
6860 
6861   ;;
6862 esac
6863 fi
6864 DATE=$ac_cv_path_DATE
6865 if test -n "$DATE"; then
6866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6867 $as_echo "$DATE" >&6; }
6868 else
6869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6870 $as_echo "no" >&6; }
6871 fi
6872 
6873 
6874   test -n "$DATE" && break
6875 done
6876 
6877     else
6878       # If it succeeded, then it was overridden by the user. We will use it
6879       # for the tool.
6880 
6881       # First remove it from the list of overridden variables, so we can test
6882       # for unknown variables in the end.
6883       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6884 
6885       # Check if we try to supply an empty value
6886       if test "x$DATE" = x; then
6887         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6888 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6889         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6890 $as_echo_n "checking for DATE... " >&6; }
6891         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6892 $as_echo "disabled" >&6; }
6893       else
6894         # Check if the provided tool contains a complete path.
6895         tool_specified="$DATE"
6896         tool_basename="${tool_specified##*/}"
6897         if test "x$tool_basename" = "x$tool_specified"; then
6898           # A command without a complete path is provided, search $PATH.
6899           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6900 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6901           # Extract the first word of "$tool_basename", so it can be a program name with args.
6902 set dummy $tool_basename; ac_word=$2
6903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6904 $as_echo_n "checking for $ac_word... " >&6; }
6905 if ${ac_cv_path_DATE+:} false; then :
6906   $as_echo_n "(cached) " >&6
6907 else
6908   case $DATE in
6909   [\\/]* | ?:[\\/]*)
6910   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6911   ;;
6912   *)
6913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6914 for as_dir in $PATH
6915 do
6916   IFS=$as_save_IFS
6917   test -z "$as_dir" && as_dir=.
6918     for ac_exec_ext in '' $ac_executable_extensions; do
6919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6920     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6922     break 2
6923   fi
6924 done
6925   done
6926 IFS=$as_save_IFS
6927 
6928   ;;
6929 esac
6930 fi
6931 DATE=$ac_cv_path_DATE
6932 if test -n "$DATE"; then
6933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6934 $as_echo "$DATE" >&6; }
6935 else
6936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6937 $as_echo "no" >&6; }
6938 fi
6939 
6940 
6941           if test "x$DATE" = x; then
6942             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6943           fi
6944         else
6945           # Otherwise we believe it is a complete path. Use it as it is.
6946           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6947 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6948           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6949 $as_echo_n "checking for DATE... " >&6; }
6950           if test ! -x "$tool_specified"; then
6951             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6952 $as_echo "not found" >&6; }
6953             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6954           fi
6955           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6956 $as_echo "$tool_specified" >&6; }
6957         fi
6958       fi
6959     fi
6960 
6961   fi
6962 
6963 
6964 
6965   if test "x$DATE" = x; then
6966     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6967   fi
6968 
6969 
6970 
6971 
6972 
6973   # Publish this variable in the help.
6974 
6975 
6976   if [ -z "${DIFF+x}" ]; then
6977     # The variable is not set by user, try to locate tool using the code snippet
6978     for ac_prog in gdiff diff
6979 do
6980   # Extract the first word of "$ac_prog", so it can be a program name with args.
6981 set dummy $ac_prog; ac_word=$2
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6983 $as_echo_n "checking for $ac_word... " >&6; }
6984 if ${ac_cv_path_DIFF+:} false; then :
6985   $as_echo_n "(cached) " >&6
6986 else
6987   case $DIFF in
6988   [\\/]* | ?:[\\/]*)
6989   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6990   ;;
6991   *)
6992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6993 for as_dir in $PATH
6994 do
6995   IFS=$as_save_IFS
6996   test -z "$as_dir" && as_dir=.
6997     for ac_exec_ext in '' $ac_executable_extensions; do
6998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6999     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7001     break 2
7002   fi
7003 done
7004   done
7005 IFS=$as_save_IFS
7006 
7007   ;;
7008 esac
7009 fi
7010 DIFF=$ac_cv_path_DIFF
7011 if test -n "$DIFF"; then
7012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7013 $as_echo "$DIFF" >&6; }
7014 else
7015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7016 $as_echo "no" >&6; }
7017 fi
7018 
7019 
7020   test -n "$DIFF" && break
7021 done
7022 
7023   else
7024     # The variable is set, but is it from the command line or the environment?
7025 
7026     # Try to remove the string !DIFF! from our list.
7027     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7028     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7029       # If it failed, the variable was not from the command line. Ignore it,
7030       # but warn the user (except for BASH, which is always set by the calling BASH).
7031       if test "xDIFF" != xBASH; then
7032         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7033 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7034       fi
7035       # Try to locate tool using the code snippet
7036       for ac_prog in gdiff diff
7037 do
7038   # Extract the first word of "$ac_prog", so it can be a program name with args.
7039 set dummy $ac_prog; ac_word=$2
7040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7041 $as_echo_n "checking for $ac_word... " >&6; }
7042 if ${ac_cv_path_DIFF+:} false; then :
7043   $as_echo_n "(cached) " >&6
7044 else
7045   case $DIFF in
7046   [\\/]* | ?:[\\/]*)
7047   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7048   ;;
7049   *)
7050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7051 for as_dir in $PATH
7052 do
7053   IFS=$as_save_IFS
7054   test -z "$as_dir" && as_dir=.
7055     for ac_exec_ext in '' $ac_executable_extensions; do
7056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7057     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7059     break 2
7060   fi
7061 done
7062   done
7063 IFS=$as_save_IFS
7064 
7065   ;;
7066 esac
7067 fi
7068 DIFF=$ac_cv_path_DIFF
7069 if test -n "$DIFF"; then
7070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7071 $as_echo "$DIFF" >&6; }
7072 else
7073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7074 $as_echo "no" >&6; }
7075 fi
7076 
7077 
7078   test -n "$DIFF" && break
7079 done
7080 
7081     else
7082       # If it succeeded, then it was overridden by the user. We will use it
7083       # for the tool.
7084 
7085       # First remove it from the list of overridden variables, so we can test
7086       # for unknown variables in the end.
7087       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7088 
7089       # Check if we try to supply an empty value
7090       if test "x$DIFF" = x; then
7091         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7092 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7093         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7094 $as_echo_n "checking for DIFF... " >&6; }
7095         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7096 $as_echo "disabled" >&6; }
7097       else
7098         # Check if the provided tool contains a complete path.
7099         tool_specified="$DIFF"
7100         tool_basename="${tool_specified##*/}"
7101         if test "x$tool_basename" = "x$tool_specified"; then
7102           # A command without a complete path is provided, search $PATH.
7103           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7104 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7105           # Extract the first word of "$tool_basename", so it can be a program name with args.
7106 set dummy $tool_basename; ac_word=$2
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7108 $as_echo_n "checking for $ac_word... " >&6; }
7109 if ${ac_cv_path_DIFF+:} false; then :
7110   $as_echo_n "(cached) " >&6
7111 else
7112   case $DIFF in
7113   [\\/]* | ?:[\\/]*)
7114   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7115   ;;
7116   *)
7117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7118 for as_dir in $PATH
7119 do
7120   IFS=$as_save_IFS
7121   test -z "$as_dir" && as_dir=.
7122     for ac_exec_ext in '' $ac_executable_extensions; do
7123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7124     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7126     break 2
7127   fi
7128 done
7129   done
7130 IFS=$as_save_IFS
7131 
7132   ;;
7133 esac
7134 fi
7135 DIFF=$ac_cv_path_DIFF
7136 if test -n "$DIFF"; then
7137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7138 $as_echo "$DIFF" >&6; }
7139 else
7140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7141 $as_echo "no" >&6; }
7142 fi
7143 
7144 
7145           if test "x$DIFF" = x; then
7146             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7147           fi
7148         else
7149           # Otherwise we believe it is a complete path. Use it as it is.
7150           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7151 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7152           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7153 $as_echo_n "checking for DIFF... " >&6; }
7154           if test ! -x "$tool_specified"; then
7155             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7156 $as_echo "not found" >&6; }
7157             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7158           fi
7159           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7160 $as_echo "$tool_specified" >&6; }
7161         fi
7162       fi
7163     fi
7164 
7165   fi
7166 
7167 
7168 
7169   if test "x$DIFF" = x; then
7170     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7171   fi
7172 
7173 
7174 
7175 
7176 
7177   # Publish this variable in the help.
7178 
7179 
7180   if [ -z "${DIRNAME+x}" ]; then
7181     # The variable is not set by user, try to locate tool using the code snippet
7182     for ac_prog in dirname
7183 do
7184   # Extract the first word of "$ac_prog", so it can be a program name with args.
7185 set dummy $ac_prog; ac_word=$2
7186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7187 $as_echo_n "checking for $ac_word... " >&6; }
7188 if ${ac_cv_path_DIRNAME+:} false; then :
7189   $as_echo_n "(cached) " >&6
7190 else
7191   case $DIRNAME in
7192   [\\/]* | ?:[\\/]*)
7193   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7194   ;;
7195   *)
7196   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7197 for as_dir in $PATH
7198 do
7199   IFS=$as_save_IFS
7200   test -z "$as_dir" && as_dir=.
7201     for ac_exec_ext in '' $ac_executable_extensions; do
7202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7203     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7205     break 2
7206   fi
7207 done
7208   done
7209 IFS=$as_save_IFS
7210 
7211   ;;
7212 esac
7213 fi
7214 DIRNAME=$ac_cv_path_DIRNAME
7215 if test -n "$DIRNAME"; then
7216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7217 $as_echo "$DIRNAME" >&6; }
7218 else
7219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7220 $as_echo "no" >&6; }
7221 fi
7222 
7223 
7224   test -n "$DIRNAME" && break
7225 done
7226 
7227   else
7228     # The variable is set, but is it from the command line or the environment?
7229 
7230     # Try to remove the string !DIRNAME! from our list.
7231     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7232     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7233       # If it failed, the variable was not from the command line. Ignore it,
7234       # but warn the user (except for BASH, which is always set by the calling BASH).
7235       if test "xDIRNAME" != xBASH; then
7236         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7237 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7238       fi
7239       # Try to locate tool using the code snippet
7240       for ac_prog in dirname
7241 do
7242   # Extract the first word of "$ac_prog", so it can be a program name with args.
7243 set dummy $ac_prog; ac_word=$2
7244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7245 $as_echo_n "checking for $ac_word... " >&6; }
7246 if ${ac_cv_path_DIRNAME+:} false; then :
7247   $as_echo_n "(cached) " >&6
7248 else
7249   case $DIRNAME in
7250   [\\/]* | ?:[\\/]*)
7251   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7252   ;;
7253   *)
7254   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7255 for as_dir in $PATH
7256 do
7257   IFS=$as_save_IFS
7258   test -z "$as_dir" && as_dir=.
7259     for ac_exec_ext in '' $ac_executable_extensions; do
7260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7261     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7263     break 2
7264   fi
7265 done
7266   done
7267 IFS=$as_save_IFS
7268 
7269   ;;
7270 esac
7271 fi
7272 DIRNAME=$ac_cv_path_DIRNAME
7273 if test -n "$DIRNAME"; then
7274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7275 $as_echo "$DIRNAME" >&6; }
7276 else
7277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7278 $as_echo "no" >&6; }
7279 fi
7280 
7281 
7282   test -n "$DIRNAME" && break
7283 done
7284 
7285     else
7286       # If it succeeded, then it was overridden by the user. We will use it
7287       # for the tool.
7288 
7289       # First remove it from the list of overridden variables, so we can test
7290       # for unknown variables in the end.
7291       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7292 
7293       # Check if we try to supply an empty value
7294       if test "x$DIRNAME" = x; then
7295         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7296 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7297         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7298 $as_echo_n "checking for DIRNAME... " >&6; }
7299         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7300 $as_echo "disabled" >&6; }
7301       else
7302         # Check if the provided tool contains a complete path.
7303         tool_specified="$DIRNAME"
7304         tool_basename="${tool_specified##*/}"
7305         if test "x$tool_basename" = "x$tool_specified"; then
7306           # A command without a complete path is provided, search $PATH.
7307           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7308 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7309           # Extract the first word of "$tool_basename", so it can be a program name with args.
7310 set dummy $tool_basename; ac_word=$2
7311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7312 $as_echo_n "checking for $ac_word... " >&6; }
7313 if ${ac_cv_path_DIRNAME+:} false; then :
7314   $as_echo_n "(cached) " >&6
7315 else
7316   case $DIRNAME in
7317   [\\/]* | ?:[\\/]*)
7318   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7319   ;;
7320   *)
7321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7322 for as_dir in $PATH
7323 do
7324   IFS=$as_save_IFS
7325   test -z "$as_dir" && as_dir=.
7326     for ac_exec_ext in '' $ac_executable_extensions; do
7327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7328     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7330     break 2
7331   fi
7332 done
7333   done
7334 IFS=$as_save_IFS
7335 
7336   ;;
7337 esac
7338 fi
7339 DIRNAME=$ac_cv_path_DIRNAME
7340 if test -n "$DIRNAME"; then
7341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7342 $as_echo "$DIRNAME" >&6; }
7343 else
7344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7345 $as_echo "no" >&6; }
7346 fi
7347 
7348 
7349           if test "x$DIRNAME" = x; then
7350             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7351           fi
7352         else
7353           # Otherwise we believe it is a complete path. Use it as it is.
7354           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7355 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7356           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7357 $as_echo_n "checking for DIRNAME... " >&6; }
7358           if test ! -x "$tool_specified"; then
7359             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7360 $as_echo "not found" >&6; }
7361             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7362           fi
7363           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7364 $as_echo "$tool_specified" >&6; }
7365         fi
7366       fi
7367     fi
7368 
7369   fi
7370 
7371 
7372 
7373   if test "x$DIRNAME" = x; then
7374     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7375   fi
7376 
7377 
7378 
7379 
7380 
7381   # Publish this variable in the help.
7382 
7383 
7384   if [ -z "${ECHO+x}" ]; then
7385     # The variable is not set by user, try to locate tool using the code snippet
7386     for ac_prog in echo
7387 do
7388   # Extract the first word of "$ac_prog", so it can be a program name with args.
7389 set dummy $ac_prog; ac_word=$2
7390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7391 $as_echo_n "checking for $ac_word... " >&6; }
7392 if ${ac_cv_path_ECHO+:} false; then :
7393   $as_echo_n "(cached) " >&6
7394 else
7395   case $ECHO in
7396   [\\/]* | ?:[\\/]*)
7397   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7398   ;;
7399   *)
7400   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7401 for as_dir in $PATH
7402 do
7403   IFS=$as_save_IFS
7404   test -z "$as_dir" && as_dir=.
7405     for ac_exec_ext in '' $ac_executable_extensions; do
7406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7407     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7409     break 2
7410   fi
7411 done
7412   done
7413 IFS=$as_save_IFS
7414 
7415   ;;
7416 esac
7417 fi
7418 ECHO=$ac_cv_path_ECHO
7419 if test -n "$ECHO"; then
7420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7421 $as_echo "$ECHO" >&6; }
7422 else
7423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7424 $as_echo "no" >&6; }
7425 fi
7426 
7427 
7428   test -n "$ECHO" && break
7429 done
7430 
7431   else
7432     # The variable is set, but is it from the command line or the environment?
7433 
7434     # Try to remove the string !ECHO! from our list.
7435     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7436     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7437       # If it failed, the variable was not from the command line. Ignore it,
7438       # but warn the user (except for BASH, which is always set by the calling BASH).
7439       if test "xECHO" != xBASH; then
7440         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7441 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7442       fi
7443       # Try to locate tool using the code snippet
7444       for ac_prog in echo
7445 do
7446   # Extract the first word of "$ac_prog", so it can be a program name with args.
7447 set dummy $ac_prog; ac_word=$2
7448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7449 $as_echo_n "checking for $ac_word... " >&6; }
7450 if ${ac_cv_path_ECHO+:} false; then :
7451   $as_echo_n "(cached) " >&6
7452 else
7453   case $ECHO in
7454   [\\/]* | ?:[\\/]*)
7455   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7456   ;;
7457   *)
7458   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7459 for as_dir in $PATH
7460 do
7461   IFS=$as_save_IFS
7462   test -z "$as_dir" && as_dir=.
7463     for ac_exec_ext in '' $ac_executable_extensions; do
7464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7465     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7467     break 2
7468   fi
7469 done
7470   done
7471 IFS=$as_save_IFS
7472 
7473   ;;
7474 esac
7475 fi
7476 ECHO=$ac_cv_path_ECHO
7477 if test -n "$ECHO"; then
7478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7479 $as_echo "$ECHO" >&6; }
7480 else
7481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7482 $as_echo "no" >&6; }
7483 fi
7484 
7485 
7486   test -n "$ECHO" && break
7487 done
7488 
7489     else
7490       # If it succeeded, then it was overridden by the user. We will use it
7491       # for the tool.
7492 
7493       # First remove it from the list of overridden variables, so we can test
7494       # for unknown variables in the end.
7495       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7496 
7497       # Check if we try to supply an empty value
7498       if test "x$ECHO" = x; then
7499         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7500 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7501         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7502 $as_echo_n "checking for ECHO... " >&6; }
7503         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7504 $as_echo "disabled" >&6; }
7505       else
7506         # Check if the provided tool contains a complete path.
7507         tool_specified="$ECHO"
7508         tool_basename="${tool_specified##*/}"
7509         if test "x$tool_basename" = "x$tool_specified"; then
7510           # A command without a complete path is provided, search $PATH.
7511           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7512 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7513           # Extract the first word of "$tool_basename", so it can be a program name with args.
7514 set dummy $tool_basename; ac_word=$2
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7516 $as_echo_n "checking for $ac_word... " >&6; }
7517 if ${ac_cv_path_ECHO+:} false; then :
7518   $as_echo_n "(cached) " >&6
7519 else
7520   case $ECHO in
7521   [\\/]* | ?:[\\/]*)
7522   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7523   ;;
7524   *)
7525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7526 for as_dir in $PATH
7527 do
7528   IFS=$as_save_IFS
7529   test -z "$as_dir" && as_dir=.
7530     for ac_exec_ext in '' $ac_executable_extensions; do
7531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7532     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7534     break 2
7535   fi
7536 done
7537   done
7538 IFS=$as_save_IFS
7539 
7540   ;;
7541 esac
7542 fi
7543 ECHO=$ac_cv_path_ECHO
7544 if test -n "$ECHO"; then
7545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7546 $as_echo "$ECHO" >&6; }
7547 else
7548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7549 $as_echo "no" >&6; }
7550 fi
7551 
7552 
7553           if test "x$ECHO" = x; then
7554             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7555           fi
7556         else
7557           # Otherwise we believe it is a complete path. Use it as it is.
7558           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7559 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7560           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7561 $as_echo_n "checking for ECHO... " >&6; }
7562           if test ! -x "$tool_specified"; then
7563             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7564 $as_echo "not found" >&6; }
7565             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7566           fi
7567           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7568 $as_echo "$tool_specified" >&6; }
7569         fi
7570       fi
7571     fi
7572 
7573   fi
7574 
7575 
7576 
7577   if test "x$ECHO" = x; then
7578     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7579   fi
7580 
7581 
7582 
7583 
7584 
7585   # Publish this variable in the help.
7586 
7587 
7588   if [ -z "${EXPR+x}" ]; then
7589     # The variable is not set by user, try to locate tool using the code snippet
7590     for ac_prog in expr
7591 do
7592   # Extract the first word of "$ac_prog", so it can be a program name with args.
7593 set dummy $ac_prog; ac_word=$2
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7595 $as_echo_n "checking for $ac_word... " >&6; }
7596 if ${ac_cv_path_EXPR+:} false; then :
7597   $as_echo_n "(cached) " >&6
7598 else
7599   case $EXPR in
7600   [\\/]* | ?:[\\/]*)
7601   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7602   ;;
7603   *)
7604   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7605 for as_dir in $PATH
7606 do
7607   IFS=$as_save_IFS
7608   test -z "$as_dir" && as_dir=.
7609     for ac_exec_ext in '' $ac_executable_extensions; do
7610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7611     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7613     break 2
7614   fi
7615 done
7616   done
7617 IFS=$as_save_IFS
7618 
7619   ;;
7620 esac
7621 fi
7622 EXPR=$ac_cv_path_EXPR
7623 if test -n "$EXPR"; then
7624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7625 $as_echo "$EXPR" >&6; }
7626 else
7627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7628 $as_echo "no" >&6; }
7629 fi
7630 
7631 
7632   test -n "$EXPR" && break
7633 done
7634 
7635   else
7636     # The variable is set, but is it from the command line or the environment?
7637 
7638     # Try to remove the string !EXPR! from our list.
7639     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7640     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7641       # If it failed, the variable was not from the command line. Ignore it,
7642       # but warn the user (except for BASH, which is always set by the calling BASH).
7643       if test "xEXPR" != xBASH; then
7644         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7645 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7646       fi
7647       # Try to locate tool using the code snippet
7648       for ac_prog in expr
7649 do
7650   # Extract the first word of "$ac_prog", so it can be a program name with args.
7651 set dummy $ac_prog; ac_word=$2
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7653 $as_echo_n "checking for $ac_word... " >&6; }
7654 if ${ac_cv_path_EXPR+:} false; then :
7655   $as_echo_n "(cached) " >&6
7656 else
7657   case $EXPR in
7658   [\\/]* | ?:[\\/]*)
7659   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7660   ;;
7661   *)
7662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7663 for as_dir in $PATH
7664 do
7665   IFS=$as_save_IFS
7666   test -z "$as_dir" && as_dir=.
7667     for ac_exec_ext in '' $ac_executable_extensions; do
7668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7669     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7671     break 2
7672   fi
7673 done
7674   done
7675 IFS=$as_save_IFS
7676 
7677   ;;
7678 esac
7679 fi
7680 EXPR=$ac_cv_path_EXPR
7681 if test -n "$EXPR"; then
7682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7683 $as_echo "$EXPR" >&6; }
7684 else
7685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7686 $as_echo "no" >&6; }
7687 fi
7688 
7689 
7690   test -n "$EXPR" && break
7691 done
7692 
7693     else
7694       # If it succeeded, then it was overridden by the user. We will use it
7695       # for the tool.
7696 
7697       # First remove it from the list of overridden variables, so we can test
7698       # for unknown variables in the end.
7699       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7700 
7701       # Check if we try to supply an empty value
7702       if test "x$EXPR" = x; then
7703         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7704 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7705         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7706 $as_echo_n "checking for EXPR... " >&6; }
7707         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7708 $as_echo "disabled" >&6; }
7709       else
7710         # Check if the provided tool contains a complete path.
7711         tool_specified="$EXPR"
7712         tool_basename="${tool_specified##*/}"
7713         if test "x$tool_basename" = "x$tool_specified"; then
7714           # A command without a complete path is provided, search $PATH.
7715           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7716 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7717           # Extract the first word of "$tool_basename", so it can be a program name with args.
7718 set dummy $tool_basename; ac_word=$2
7719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7720 $as_echo_n "checking for $ac_word... " >&6; }
7721 if ${ac_cv_path_EXPR+:} false; then :
7722   $as_echo_n "(cached) " >&6
7723 else
7724   case $EXPR in
7725   [\\/]* | ?:[\\/]*)
7726   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7727   ;;
7728   *)
7729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7730 for as_dir in $PATH
7731 do
7732   IFS=$as_save_IFS
7733   test -z "$as_dir" && as_dir=.
7734     for ac_exec_ext in '' $ac_executable_extensions; do
7735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7736     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7738     break 2
7739   fi
7740 done
7741   done
7742 IFS=$as_save_IFS
7743 
7744   ;;
7745 esac
7746 fi
7747 EXPR=$ac_cv_path_EXPR
7748 if test -n "$EXPR"; then
7749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7750 $as_echo "$EXPR" >&6; }
7751 else
7752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7753 $as_echo "no" >&6; }
7754 fi
7755 
7756 
7757           if test "x$EXPR" = x; then
7758             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7759           fi
7760         else
7761           # Otherwise we believe it is a complete path. Use it as it is.
7762           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7763 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7764           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7765 $as_echo_n "checking for EXPR... " >&6; }
7766           if test ! -x "$tool_specified"; then
7767             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7768 $as_echo "not found" >&6; }
7769             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7770           fi
7771           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7772 $as_echo "$tool_specified" >&6; }
7773         fi
7774       fi
7775     fi
7776 
7777   fi
7778 
7779 
7780 
7781   if test "x$EXPR" = x; then
7782     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7783   fi
7784 
7785 
7786 
7787 
7788 
7789   # Publish this variable in the help.
7790 
7791 
7792   if [ -z "${FILE+x}" ]; then
7793     # The variable is not set by user, try to locate tool using the code snippet
7794     for ac_prog in file
7795 do
7796   # Extract the first word of "$ac_prog", so it can be a program name with args.
7797 set dummy $ac_prog; ac_word=$2
7798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7799 $as_echo_n "checking for $ac_word... " >&6; }
7800 if ${ac_cv_path_FILE+:} false; then :
7801   $as_echo_n "(cached) " >&6
7802 else
7803   case $FILE in
7804   [\\/]* | ?:[\\/]*)
7805   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7806   ;;
7807   *)
7808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7809 for as_dir in $PATH
7810 do
7811   IFS=$as_save_IFS
7812   test -z "$as_dir" && as_dir=.
7813     for ac_exec_ext in '' $ac_executable_extensions; do
7814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7815     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7817     break 2
7818   fi
7819 done
7820   done
7821 IFS=$as_save_IFS
7822 
7823   ;;
7824 esac
7825 fi
7826 FILE=$ac_cv_path_FILE
7827 if test -n "$FILE"; then
7828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7829 $as_echo "$FILE" >&6; }
7830 else
7831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832 $as_echo "no" >&6; }
7833 fi
7834 
7835 
7836   test -n "$FILE" && break
7837 done
7838 
7839   else
7840     # The variable is set, but is it from the command line or the environment?
7841 
7842     # Try to remove the string !FILE! from our list.
7843     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7844     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7845       # If it failed, the variable was not from the command line. Ignore it,
7846       # but warn the user (except for BASH, which is always set by the calling BASH).
7847       if test "xFILE" != xBASH; then
7848         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7849 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7850       fi
7851       # Try to locate tool using the code snippet
7852       for ac_prog in file
7853 do
7854   # Extract the first word of "$ac_prog", so it can be a program name with args.
7855 set dummy $ac_prog; ac_word=$2
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7857 $as_echo_n "checking for $ac_word... " >&6; }
7858 if ${ac_cv_path_FILE+:} false; then :
7859   $as_echo_n "(cached) " >&6
7860 else
7861   case $FILE in
7862   [\\/]* | ?:[\\/]*)
7863   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7864   ;;
7865   *)
7866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867 for as_dir in $PATH
7868 do
7869   IFS=$as_save_IFS
7870   test -z "$as_dir" && as_dir=.
7871     for ac_exec_ext in '' $ac_executable_extensions; do
7872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7873     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7875     break 2
7876   fi
7877 done
7878   done
7879 IFS=$as_save_IFS
7880 
7881   ;;
7882 esac
7883 fi
7884 FILE=$ac_cv_path_FILE
7885 if test -n "$FILE"; then
7886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7887 $as_echo "$FILE" >&6; }
7888 else
7889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7890 $as_echo "no" >&6; }
7891 fi
7892 
7893 
7894   test -n "$FILE" && break
7895 done
7896 
7897     else
7898       # If it succeeded, then it was overridden by the user. We will use it
7899       # for the tool.
7900 
7901       # First remove it from the list of overridden variables, so we can test
7902       # for unknown variables in the end.
7903       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7904 
7905       # Check if we try to supply an empty value
7906       if test "x$FILE" = x; then
7907         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7908 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7909         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7910 $as_echo_n "checking for FILE... " >&6; }
7911         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7912 $as_echo "disabled" >&6; }
7913       else
7914         # Check if the provided tool contains a complete path.
7915         tool_specified="$FILE"
7916         tool_basename="${tool_specified##*/}"
7917         if test "x$tool_basename" = "x$tool_specified"; then
7918           # A command without a complete path is provided, search $PATH.
7919           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7920 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7921           # Extract the first word of "$tool_basename", so it can be a program name with args.
7922 set dummy $tool_basename; ac_word=$2
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7924 $as_echo_n "checking for $ac_word... " >&6; }
7925 if ${ac_cv_path_FILE+:} false; then :
7926   $as_echo_n "(cached) " >&6
7927 else
7928   case $FILE in
7929   [\\/]* | ?:[\\/]*)
7930   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7931   ;;
7932   *)
7933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7934 for as_dir in $PATH
7935 do
7936   IFS=$as_save_IFS
7937   test -z "$as_dir" && as_dir=.
7938     for ac_exec_ext in '' $ac_executable_extensions; do
7939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7940     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7942     break 2
7943   fi
7944 done
7945   done
7946 IFS=$as_save_IFS
7947 
7948   ;;
7949 esac
7950 fi
7951 FILE=$ac_cv_path_FILE
7952 if test -n "$FILE"; then
7953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7954 $as_echo "$FILE" >&6; }
7955 else
7956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7957 $as_echo "no" >&6; }
7958 fi
7959 
7960 
7961           if test "x$FILE" = x; then
7962             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7963           fi
7964         else
7965           # Otherwise we believe it is a complete path. Use it as it is.
7966           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7967 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7968           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7969 $as_echo_n "checking for FILE... " >&6; }
7970           if test ! -x "$tool_specified"; then
7971             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7972 $as_echo "not found" >&6; }
7973             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7974           fi
7975           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7976 $as_echo "$tool_specified" >&6; }
7977         fi
7978       fi
7979     fi
7980 
7981   fi
7982 
7983 
7984 
7985   if test "x$FILE" = x; then
7986     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7987   fi
7988 
7989 
7990 
7991 
7992 
7993   # Publish this variable in the help.
7994 
7995 
7996   if [ -z "${FIND+x}" ]; then
7997     # The variable is not set by user, try to locate tool using the code snippet
7998     for ac_prog in find
7999 do
8000   # Extract the first word of "$ac_prog", so it can be a program name with args.
8001 set dummy $ac_prog; ac_word=$2
8002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8003 $as_echo_n "checking for $ac_word... " >&6; }
8004 if ${ac_cv_path_FIND+:} false; then :
8005   $as_echo_n "(cached) " >&6
8006 else
8007   case $FIND in
8008   [\\/]* | ?:[\\/]*)
8009   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8010   ;;
8011   *)
8012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8013 for as_dir in $PATH
8014 do
8015   IFS=$as_save_IFS
8016   test -z "$as_dir" && as_dir=.
8017     for ac_exec_ext in '' $ac_executable_extensions; do
8018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8019     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8021     break 2
8022   fi
8023 done
8024   done
8025 IFS=$as_save_IFS
8026 
8027   ;;
8028 esac
8029 fi
8030 FIND=$ac_cv_path_FIND
8031 if test -n "$FIND"; then
8032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8033 $as_echo "$FIND" >&6; }
8034 else
8035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8036 $as_echo "no" >&6; }
8037 fi
8038 
8039 
8040   test -n "$FIND" && break
8041 done
8042 
8043   else
8044     # The variable is set, but is it from the command line or the environment?
8045 
8046     # Try to remove the string !FIND! from our list.
8047     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8048     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8049       # If it failed, the variable was not from the command line. Ignore it,
8050       # but warn the user (except for BASH, which is always set by the calling BASH).
8051       if test "xFIND" != xBASH; then
8052         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8053 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8054       fi
8055       # Try to locate tool using the code snippet
8056       for ac_prog in find
8057 do
8058   # Extract the first word of "$ac_prog", so it can be a program name with args.
8059 set dummy $ac_prog; ac_word=$2
8060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8061 $as_echo_n "checking for $ac_word... " >&6; }
8062 if ${ac_cv_path_FIND+:} false; then :
8063   $as_echo_n "(cached) " >&6
8064 else
8065   case $FIND in
8066   [\\/]* | ?:[\\/]*)
8067   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8068   ;;
8069   *)
8070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8071 for as_dir in $PATH
8072 do
8073   IFS=$as_save_IFS
8074   test -z "$as_dir" && as_dir=.
8075     for ac_exec_ext in '' $ac_executable_extensions; do
8076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8077     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8079     break 2
8080   fi
8081 done
8082   done
8083 IFS=$as_save_IFS
8084 
8085   ;;
8086 esac
8087 fi
8088 FIND=$ac_cv_path_FIND
8089 if test -n "$FIND"; then
8090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8091 $as_echo "$FIND" >&6; }
8092 else
8093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8094 $as_echo "no" >&6; }
8095 fi
8096 
8097 
8098   test -n "$FIND" && break
8099 done
8100 
8101     else
8102       # If it succeeded, then it was overridden by the user. We will use it
8103       # for the tool.
8104 
8105       # First remove it from the list of overridden variables, so we can test
8106       # for unknown variables in the end.
8107       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8108 
8109       # Check if we try to supply an empty value
8110       if test "x$FIND" = x; then
8111         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8112 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8113         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8114 $as_echo_n "checking for FIND... " >&6; }
8115         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8116 $as_echo "disabled" >&6; }
8117       else
8118         # Check if the provided tool contains a complete path.
8119         tool_specified="$FIND"
8120         tool_basename="${tool_specified##*/}"
8121         if test "x$tool_basename" = "x$tool_specified"; then
8122           # A command without a complete path is provided, search $PATH.
8123           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8124 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8125           # Extract the first word of "$tool_basename", so it can be a program name with args.
8126 set dummy $tool_basename; ac_word=$2
8127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8128 $as_echo_n "checking for $ac_word... " >&6; }
8129 if ${ac_cv_path_FIND+:} false; then :
8130   $as_echo_n "(cached) " >&6
8131 else
8132   case $FIND in
8133   [\\/]* | ?:[\\/]*)
8134   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8135   ;;
8136   *)
8137   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8138 for as_dir in $PATH
8139 do
8140   IFS=$as_save_IFS
8141   test -z "$as_dir" && as_dir=.
8142     for ac_exec_ext in '' $ac_executable_extensions; do
8143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8144     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8146     break 2
8147   fi
8148 done
8149   done
8150 IFS=$as_save_IFS
8151 
8152   ;;
8153 esac
8154 fi
8155 FIND=$ac_cv_path_FIND
8156 if test -n "$FIND"; then
8157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8158 $as_echo "$FIND" >&6; }
8159 else
8160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8161 $as_echo "no" >&6; }
8162 fi
8163 
8164 
8165           if test "x$FIND" = x; then
8166             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8167           fi
8168         else
8169           # Otherwise we believe it is a complete path. Use it as it is.
8170           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8171 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8172           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8173 $as_echo_n "checking for FIND... " >&6; }
8174           if test ! -x "$tool_specified"; then
8175             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8176 $as_echo "not found" >&6; }
8177             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8178           fi
8179           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8180 $as_echo "$tool_specified" >&6; }
8181         fi
8182       fi
8183     fi
8184 
8185   fi
8186 
8187 
8188 
8189   if test "x$FIND" = x; then
8190     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8191   fi
8192 
8193 
8194 
8195 
8196 
8197   # Publish this variable in the help.
8198 
8199 
8200   if [ -z "${HEAD+x}" ]; then
8201     # The variable is not set by user, try to locate tool using the code snippet
8202     for ac_prog in head
8203 do
8204   # Extract the first word of "$ac_prog", so it can be a program name with args.
8205 set dummy $ac_prog; ac_word=$2
8206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8207 $as_echo_n "checking for $ac_word... " >&6; }
8208 if ${ac_cv_path_HEAD+:} false; then :
8209   $as_echo_n "(cached) " >&6
8210 else
8211   case $HEAD in
8212   [\\/]* | ?:[\\/]*)
8213   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8214   ;;
8215   *)
8216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8217 for as_dir in $PATH
8218 do
8219   IFS=$as_save_IFS
8220   test -z "$as_dir" && as_dir=.
8221     for ac_exec_ext in '' $ac_executable_extensions; do
8222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8223     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8225     break 2
8226   fi
8227 done
8228   done
8229 IFS=$as_save_IFS
8230 
8231   ;;
8232 esac
8233 fi
8234 HEAD=$ac_cv_path_HEAD
8235 if test -n "$HEAD"; then
8236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8237 $as_echo "$HEAD" >&6; }
8238 else
8239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8240 $as_echo "no" >&6; }
8241 fi
8242 
8243 
8244   test -n "$HEAD" && break
8245 done
8246 
8247   else
8248     # The variable is set, but is it from the command line or the environment?
8249 
8250     # Try to remove the string !HEAD! from our list.
8251     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8252     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8253       # If it failed, the variable was not from the command line. Ignore it,
8254       # but warn the user (except for BASH, which is always set by the calling BASH).
8255       if test "xHEAD" != xBASH; then
8256         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8257 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8258       fi
8259       # Try to locate tool using the code snippet
8260       for ac_prog in head
8261 do
8262   # Extract the first word of "$ac_prog", so it can be a program name with args.
8263 set dummy $ac_prog; ac_word=$2
8264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8265 $as_echo_n "checking for $ac_word... " >&6; }
8266 if ${ac_cv_path_HEAD+:} false; then :
8267   $as_echo_n "(cached) " >&6
8268 else
8269   case $HEAD in
8270   [\\/]* | ?:[\\/]*)
8271   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8272   ;;
8273   *)
8274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8275 for as_dir in $PATH
8276 do
8277   IFS=$as_save_IFS
8278   test -z "$as_dir" && as_dir=.
8279     for ac_exec_ext in '' $ac_executable_extensions; do
8280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8281     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8283     break 2
8284   fi
8285 done
8286   done
8287 IFS=$as_save_IFS
8288 
8289   ;;
8290 esac
8291 fi
8292 HEAD=$ac_cv_path_HEAD
8293 if test -n "$HEAD"; then
8294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8295 $as_echo "$HEAD" >&6; }
8296 else
8297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8298 $as_echo "no" >&6; }
8299 fi
8300 
8301 
8302   test -n "$HEAD" && break
8303 done
8304 
8305     else
8306       # If it succeeded, then it was overridden by the user. We will use it
8307       # for the tool.
8308 
8309       # First remove it from the list of overridden variables, so we can test
8310       # for unknown variables in the end.
8311       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8312 
8313       # Check if we try to supply an empty value
8314       if test "x$HEAD" = x; then
8315         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8316 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8317         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8318 $as_echo_n "checking for HEAD... " >&6; }
8319         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8320 $as_echo "disabled" >&6; }
8321       else
8322         # Check if the provided tool contains a complete path.
8323         tool_specified="$HEAD"
8324         tool_basename="${tool_specified##*/}"
8325         if test "x$tool_basename" = "x$tool_specified"; then
8326           # A command without a complete path is provided, search $PATH.
8327           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8328 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8329           # Extract the first word of "$tool_basename", so it can be a program name with args.
8330 set dummy $tool_basename; ac_word=$2
8331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8332 $as_echo_n "checking for $ac_word... " >&6; }
8333 if ${ac_cv_path_HEAD+:} false; then :
8334   $as_echo_n "(cached) " >&6
8335 else
8336   case $HEAD in
8337   [\\/]* | ?:[\\/]*)
8338   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8339   ;;
8340   *)
8341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8342 for as_dir in $PATH
8343 do
8344   IFS=$as_save_IFS
8345   test -z "$as_dir" && as_dir=.
8346     for ac_exec_ext in '' $ac_executable_extensions; do
8347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8348     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8350     break 2
8351   fi
8352 done
8353   done
8354 IFS=$as_save_IFS
8355 
8356   ;;
8357 esac
8358 fi
8359 HEAD=$ac_cv_path_HEAD
8360 if test -n "$HEAD"; then
8361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8362 $as_echo "$HEAD" >&6; }
8363 else
8364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8365 $as_echo "no" >&6; }
8366 fi
8367 
8368 
8369           if test "x$HEAD" = x; then
8370             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8371           fi
8372         else
8373           # Otherwise we believe it is a complete path. Use it as it is.
8374           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8375 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8376           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8377 $as_echo_n "checking for HEAD... " >&6; }
8378           if test ! -x "$tool_specified"; then
8379             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8380 $as_echo "not found" >&6; }
8381             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8382           fi
8383           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8384 $as_echo "$tool_specified" >&6; }
8385         fi
8386       fi
8387     fi
8388 
8389   fi
8390 
8391 
8392 
8393   if test "x$HEAD" = x; then
8394     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8395   fi
8396 
8397 
8398 
8399 
8400 
8401   # Publish this variable in the help.
8402 
8403 
8404   if [ -z "${LN+x}" ]; then
8405     # The variable is not set by user, try to locate tool using the code snippet
8406     for ac_prog in ln
8407 do
8408   # Extract the first word of "$ac_prog", so it can be a program name with args.
8409 set dummy $ac_prog; ac_word=$2
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8411 $as_echo_n "checking for $ac_word... " >&6; }
8412 if ${ac_cv_path_LN+:} false; then :
8413   $as_echo_n "(cached) " >&6
8414 else
8415   case $LN in
8416   [\\/]* | ?:[\\/]*)
8417   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8418   ;;
8419   *)
8420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8421 for as_dir in $PATH
8422 do
8423   IFS=$as_save_IFS
8424   test -z "$as_dir" && as_dir=.
8425     for ac_exec_ext in '' $ac_executable_extensions; do
8426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8427     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8429     break 2
8430   fi
8431 done
8432   done
8433 IFS=$as_save_IFS
8434 
8435   ;;
8436 esac
8437 fi
8438 LN=$ac_cv_path_LN
8439 if test -n "$LN"; then
8440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8441 $as_echo "$LN" >&6; }
8442 else
8443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8444 $as_echo "no" >&6; }
8445 fi
8446 
8447 
8448   test -n "$LN" && break
8449 done
8450 
8451   else
8452     # The variable is set, but is it from the command line or the environment?
8453 
8454     # Try to remove the string !LN! from our list.
8455     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8456     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8457       # If it failed, the variable was not from the command line. Ignore it,
8458       # but warn the user (except for BASH, which is always set by the calling BASH).
8459       if test "xLN" != xBASH; then
8460         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8461 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8462       fi
8463       # Try to locate tool using the code snippet
8464       for ac_prog in ln
8465 do
8466   # Extract the first word of "$ac_prog", so it can be a program name with args.
8467 set dummy $ac_prog; ac_word=$2
8468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8469 $as_echo_n "checking for $ac_word... " >&6; }
8470 if ${ac_cv_path_LN+:} false; then :
8471   $as_echo_n "(cached) " >&6
8472 else
8473   case $LN in
8474   [\\/]* | ?:[\\/]*)
8475   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8476   ;;
8477   *)
8478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8479 for as_dir in $PATH
8480 do
8481   IFS=$as_save_IFS
8482   test -z "$as_dir" && as_dir=.
8483     for ac_exec_ext in '' $ac_executable_extensions; do
8484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8485     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8487     break 2
8488   fi
8489 done
8490   done
8491 IFS=$as_save_IFS
8492 
8493   ;;
8494 esac
8495 fi
8496 LN=$ac_cv_path_LN
8497 if test -n "$LN"; then
8498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8499 $as_echo "$LN" >&6; }
8500 else
8501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8502 $as_echo "no" >&6; }
8503 fi
8504 
8505 
8506   test -n "$LN" && break
8507 done
8508 
8509     else
8510       # If it succeeded, then it was overridden by the user. We will use it
8511       # for the tool.
8512 
8513       # First remove it from the list of overridden variables, so we can test
8514       # for unknown variables in the end.
8515       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8516 
8517       # Check if we try to supply an empty value
8518       if test "x$LN" = x; then
8519         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8520 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8521         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8522 $as_echo_n "checking for LN... " >&6; }
8523         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8524 $as_echo "disabled" >&6; }
8525       else
8526         # Check if the provided tool contains a complete path.
8527         tool_specified="$LN"
8528         tool_basename="${tool_specified##*/}"
8529         if test "x$tool_basename" = "x$tool_specified"; then
8530           # A command without a complete path is provided, search $PATH.
8531           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8532 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8533           # Extract the first word of "$tool_basename", so it can be a program name with args.
8534 set dummy $tool_basename; ac_word=$2
8535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8536 $as_echo_n "checking for $ac_word... " >&6; }
8537 if ${ac_cv_path_LN+:} false; then :
8538   $as_echo_n "(cached) " >&6
8539 else
8540   case $LN in
8541   [\\/]* | ?:[\\/]*)
8542   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8543   ;;
8544   *)
8545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8546 for as_dir in $PATH
8547 do
8548   IFS=$as_save_IFS
8549   test -z "$as_dir" && as_dir=.
8550     for ac_exec_ext in '' $ac_executable_extensions; do
8551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8552     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8554     break 2
8555   fi
8556 done
8557   done
8558 IFS=$as_save_IFS
8559 
8560   ;;
8561 esac
8562 fi
8563 LN=$ac_cv_path_LN
8564 if test -n "$LN"; then
8565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8566 $as_echo "$LN" >&6; }
8567 else
8568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8569 $as_echo "no" >&6; }
8570 fi
8571 
8572 
8573           if test "x$LN" = x; then
8574             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8575           fi
8576         else
8577           # Otherwise we believe it is a complete path. Use it as it is.
8578           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8579 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8580           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8581 $as_echo_n "checking for LN... " >&6; }
8582           if test ! -x "$tool_specified"; then
8583             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8584 $as_echo "not found" >&6; }
8585             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8586           fi
8587           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8588 $as_echo "$tool_specified" >&6; }
8589         fi
8590       fi
8591     fi
8592 
8593   fi
8594 
8595 
8596 
8597   if test "x$LN" = x; then
8598     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8599   fi
8600 
8601 
8602 
8603 
8604 
8605   # Publish this variable in the help.
8606 
8607 
8608   if [ -z "${LS+x}" ]; then
8609     # The variable is not set by user, try to locate tool using the code snippet
8610     for ac_prog in ls
8611 do
8612   # Extract the first word of "$ac_prog", so it can be a program name with args.
8613 set dummy $ac_prog; ac_word=$2
8614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8615 $as_echo_n "checking for $ac_word... " >&6; }
8616 if ${ac_cv_path_LS+:} false; then :
8617   $as_echo_n "(cached) " >&6
8618 else
8619   case $LS in
8620   [\\/]* | ?:[\\/]*)
8621   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8622   ;;
8623   *)
8624   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8625 for as_dir in $PATH
8626 do
8627   IFS=$as_save_IFS
8628   test -z "$as_dir" && as_dir=.
8629     for ac_exec_ext in '' $ac_executable_extensions; do
8630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8631     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8633     break 2
8634   fi
8635 done
8636   done
8637 IFS=$as_save_IFS
8638 
8639   ;;
8640 esac
8641 fi
8642 LS=$ac_cv_path_LS
8643 if test -n "$LS"; then
8644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8645 $as_echo "$LS" >&6; }
8646 else
8647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8648 $as_echo "no" >&6; }
8649 fi
8650 
8651 
8652   test -n "$LS" && break
8653 done
8654 
8655   else
8656     # The variable is set, but is it from the command line or the environment?
8657 
8658     # Try to remove the string !LS! from our list.
8659     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8660     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8661       # If it failed, the variable was not from the command line. Ignore it,
8662       # but warn the user (except for BASH, which is always set by the calling BASH).
8663       if test "xLS" != xBASH; then
8664         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8665 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8666       fi
8667       # Try to locate tool using the code snippet
8668       for ac_prog in ls
8669 do
8670   # Extract the first word of "$ac_prog", so it can be a program name with args.
8671 set dummy $ac_prog; ac_word=$2
8672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8673 $as_echo_n "checking for $ac_word... " >&6; }
8674 if ${ac_cv_path_LS+:} false; then :
8675   $as_echo_n "(cached) " >&6
8676 else
8677   case $LS in
8678   [\\/]* | ?:[\\/]*)
8679   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8680   ;;
8681   *)
8682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8683 for as_dir in $PATH
8684 do
8685   IFS=$as_save_IFS
8686   test -z "$as_dir" && as_dir=.
8687     for ac_exec_ext in '' $ac_executable_extensions; do
8688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8689     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8691     break 2
8692   fi
8693 done
8694   done
8695 IFS=$as_save_IFS
8696 
8697   ;;
8698 esac
8699 fi
8700 LS=$ac_cv_path_LS
8701 if test -n "$LS"; then
8702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8703 $as_echo "$LS" >&6; }
8704 else
8705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8706 $as_echo "no" >&6; }
8707 fi
8708 
8709 
8710   test -n "$LS" && break
8711 done
8712 
8713     else
8714       # If it succeeded, then it was overridden by the user. We will use it
8715       # for the tool.
8716 
8717       # First remove it from the list of overridden variables, so we can test
8718       # for unknown variables in the end.
8719       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8720 
8721       # Check if we try to supply an empty value
8722       if test "x$LS" = x; then
8723         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8724 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8725         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8726 $as_echo_n "checking for LS... " >&6; }
8727         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8728 $as_echo "disabled" >&6; }
8729       else
8730         # Check if the provided tool contains a complete path.
8731         tool_specified="$LS"
8732         tool_basename="${tool_specified##*/}"
8733         if test "x$tool_basename" = "x$tool_specified"; then
8734           # A command without a complete path is provided, search $PATH.
8735           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8736 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8737           # Extract the first word of "$tool_basename", so it can be a program name with args.
8738 set dummy $tool_basename; ac_word=$2
8739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8740 $as_echo_n "checking for $ac_word... " >&6; }
8741 if ${ac_cv_path_LS+:} false; then :
8742   $as_echo_n "(cached) " >&6
8743 else
8744   case $LS in
8745   [\\/]* | ?:[\\/]*)
8746   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8747   ;;
8748   *)
8749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8750 for as_dir in $PATH
8751 do
8752   IFS=$as_save_IFS
8753   test -z "$as_dir" && as_dir=.
8754     for ac_exec_ext in '' $ac_executable_extensions; do
8755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8756     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8758     break 2
8759   fi
8760 done
8761   done
8762 IFS=$as_save_IFS
8763 
8764   ;;
8765 esac
8766 fi
8767 LS=$ac_cv_path_LS
8768 if test -n "$LS"; then
8769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8770 $as_echo "$LS" >&6; }
8771 else
8772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8773 $as_echo "no" >&6; }
8774 fi
8775 
8776 
8777           if test "x$LS" = x; then
8778             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8779           fi
8780         else
8781           # Otherwise we believe it is a complete path. Use it as it is.
8782           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8783 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8784           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8785 $as_echo_n "checking for LS... " >&6; }
8786           if test ! -x "$tool_specified"; then
8787             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8788 $as_echo "not found" >&6; }
8789             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8790           fi
8791           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8792 $as_echo "$tool_specified" >&6; }
8793         fi
8794       fi
8795     fi
8796 
8797   fi
8798 
8799 
8800 
8801   if test "x$LS" = x; then
8802     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8803   fi
8804 
8805 
8806 
8807 
8808 
8809   # Publish this variable in the help.
8810 
8811 
8812   if [ -z "${MKDIR+x}" ]; then
8813     # The variable is not set by user, try to locate tool using the code snippet
8814     for ac_prog in mkdir
8815 do
8816   # Extract the first word of "$ac_prog", so it can be a program name with args.
8817 set dummy $ac_prog; ac_word=$2
8818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8819 $as_echo_n "checking for $ac_word... " >&6; }
8820 if ${ac_cv_path_MKDIR+:} false; then :
8821   $as_echo_n "(cached) " >&6
8822 else
8823   case $MKDIR in
8824   [\\/]* | ?:[\\/]*)
8825   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8826   ;;
8827   *)
8828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8829 for as_dir in $PATH
8830 do
8831   IFS=$as_save_IFS
8832   test -z "$as_dir" && as_dir=.
8833     for ac_exec_ext in '' $ac_executable_extensions; do
8834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8835     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8837     break 2
8838   fi
8839 done
8840   done
8841 IFS=$as_save_IFS
8842 
8843   ;;
8844 esac
8845 fi
8846 MKDIR=$ac_cv_path_MKDIR
8847 if test -n "$MKDIR"; then
8848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8849 $as_echo "$MKDIR" >&6; }
8850 else
8851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8852 $as_echo "no" >&6; }
8853 fi
8854 
8855 
8856   test -n "$MKDIR" && break
8857 done
8858 
8859   else
8860     # The variable is set, but is it from the command line or the environment?
8861 
8862     # Try to remove the string !MKDIR! from our list.
8863     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8864     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8865       # If it failed, the variable was not from the command line. Ignore it,
8866       # but warn the user (except for BASH, which is always set by the calling BASH).
8867       if test "xMKDIR" != xBASH; then
8868         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8869 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8870       fi
8871       # Try to locate tool using the code snippet
8872       for ac_prog in mkdir
8873 do
8874   # Extract the first word of "$ac_prog", so it can be a program name with args.
8875 set dummy $ac_prog; ac_word=$2
8876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8877 $as_echo_n "checking for $ac_word... " >&6; }
8878 if ${ac_cv_path_MKDIR+:} false; then :
8879   $as_echo_n "(cached) " >&6
8880 else
8881   case $MKDIR in
8882   [\\/]* | ?:[\\/]*)
8883   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8884   ;;
8885   *)
8886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8887 for as_dir in $PATH
8888 do
8889   IFS=$as_save_IFS
8890   test -z "$as_dir" && as_dir=.
8891     for ac_exec_ext in '' $ac_executable_extensions; do
8892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8893     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8895     break 2
8896   fi
8897 done
8898   done
8899 IFS=$as_save_IFS
8900 
8901   ;;
8902 esac
8903 fi
8904 MKDIR=$ac_cv_path_MKDIR
8905 if test -n "$MKDIR"; then
8906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8907 $as_echo "$MKDIR" >&6; }
8908 else
8909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8910 $as_echo "no" >&6; }
8911 fi
8912 
8913 
8914   test -n "$MKDIR" && break
8915 done
8916 
8917     else
8918       # If it succeeded, then it was overridden by the user. We will use it
8919       # for the tool.
8920 
8921       # First remove it from the list of overridden variables, so we can test
8922       # for unknown variables in the end.
8923       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8924 
8925       # Check if we try to supply an empty value
8926       if test "x$MKDIR" = x; then
8927         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8928 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8929         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8930 $as_echo_n "checking for MKDIR... " >&6; }
8931         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8932 $as_echo "disabled" >&6; }
8933       else
8934         # Check if the provided tool contains a complete path.
8935         tool_specified="$MKDIR"
8936         tool_basename="${tool_specified##*/}"
8937         if test "x$tool_basename" = "x$tool_specified"; then
8938           # A command without a complete path is provided, search $PATH.
8939           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8940 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8941           # Extract the first word of "$tool_basename", so it can be a program name with args.
8942 set dummy $tool_basename; ac_word=$2
8943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8944 $as_echo_n "checking for $ac_word... " >&6; }
8945 if ${ac_cv_path_MKDIR+:} false; then :
8946   $as_echo_n "(cached) " >&6
8947 else
8948   case $MKDIR in
8949   [\\/]* | ?:[\\/]*)
8950   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8951   ;;
8952   *)
8953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8954 for as_dir in $PATH
8955 do
8956   IFS=$as_save_IFS
8957   test -z "$as_dir" && as_dir=.
8958     for ac_exec_ext in '' $ac_executable_extensions; do
8959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8960     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8962     break 2
8963   fi
8964 done
8965   done
8966 IFS=$as_save_IFS
8967 
8968   ;;
8969 esac
8970 fi
8971 MKDIR=$ac_cv_path_MKDIR
8972 if test -n "$MKDIR"; then
8973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8974 $as_echo "$MKDIR" >&6; }
8975 else
8976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8977 $as_echo "no" >&6; }
8978 fi
8979 
8980 
8981           if test "x$MKDIR" = x; then
8982             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8983           fi
8984         else
8985           # Otherwise we believe it is a complete path. Use it as it is.
8986           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8987 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8988           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8989 $as_echo_n "checking for MKDIR... " >&6; }
8990           if test ! -x "$tool_specified"; then
8991             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8992 $as_echo "not found" >&6; }
8993             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8994           fi
8995           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8996 $as_echo "$tool_specified" >&6; }
8997         fi
8998       fi
8999     fi
9000 
9001   fi
9002 
9003 
9004 
9005   if test "x$MKDIR" = x; then
9006     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9007   fi
9008 
9009 
9010 
9011 
9012 
9013   # Publish this variable in the help.
9014 
9015 
9016   if [ -z "${MKTEMP+x}" ]; then
9017     # The variable is not set by user, try to locate tool using the code snippet
9018     for ac_prog in mktemp
9019 do
9020   # Extract the first word of "$ac_prog", so it can be a program name with args.
9021 set dummy $ac_prog; ac_word=$2
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9023 $as_echo_n "checking for $ac_word... " >&6; }
9024 if ${ac_cv_path_MKTEMP+:} false; then :
9025   $as_echo_n "(cached) " >&6
9026 else
9027   case $MKTEMP in
9028   [\\/]* | ?:[\\/]*)
9029   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9030   ;;
9031   *)
9032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9033 for as_dir in $PATH
9034 do
9035   IFS=$as_save_IFS
9036   test -z "$as_dir" && as_dir=.
9037     for ac_exec_ext in '' $ac_executable_extensions; do
9038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9039     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9041     break 2
9042   fi
9043 done
9044   done
9045 IFS=$as_save_IFS
9046 
9047   ;;
9048 esac
9049 fi
9050 MKTEMP=$ac_cv_path_MKTEMP
9051 if test -n "$MKTEMP"; then
9052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9053 $as_echo "$MKTEMP" >&6; }
9054 else
9055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9056 $as_echo "no" >&6; }
9057 fi
9058 
9059 
9060   test -n "$MKTEMP" && break
9061 done
9062 
9063   else
9064     # The variable is set, but is it from the command line or the environment?
9065 
9066     # Try to remove the string !MKTEMP! from our list.
9067     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9068     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9069       # If it failed, the variable was not from the command line. Ignore it,
9070       # but warn the user (except for BASH, which is always set by the calling BASH).
9071       if test "xMKTEMP" != xBASH; then
9072         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9073 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9074       fi
9075       # Try to locate tool using the code snippet
9076       for ac_prog in mktemp
9077 do
9078   # Extract the first word of "$ac_prog", so it can be a program name with args.
9079 set dummy $ac_prog; ac_word=$2
9080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9081 $as_echo_n "checking for $ac_word... " >&6; }
9082 if ${ac_cv_path_MKTEMP+:} false; then :
9083   $as_echo_n "(cached) " >&6
9084 else
9085   case $MKTEMP in
9086   [\\/]* | ?:[\\/]*)
9087   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9088   ;;
9089   *)
9090   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9091 for as_dir in $PATH
9092 do
9093   IFS=$as_save_IFS
9094   test -z "$as_dir" && as_dir=.
9095     for ac_exec_ext in '' $ac_executable_extensions; do
9096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9097     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9099     break 2
9100   fi
9101 done
9102   done
9103 IFS=$as_save_IFS
9104 
9105   ;;
9106 esac
9107 fi
9108 MKTEMP=$ac_cv_path_MKTEMP
9109 if test -n "$MKTEMP"; then
9110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9111 $as_echo "$MKTEMP" >&6; }
9112 else
9113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9114 $as_echo "no" >&6; }
9115 fi
9116 
9117 
9118   test -n "$MKTEMP" && break
9119 done
9120 
9121     else
9122       # If it succeeded, then it was overridden by the user. We will use it
9123       # for the tool.
9124 
9125       # First remove it from the list of overridden variables, so we can test
9126       # for unknown variables in the end.
9127       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9128 
9129       # Check if we try to supply an empty value
9130       if test "x$MKTEMP" = x; then
9131         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9132 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9133         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9134 $as_echo_n "checking for MKTEMP... " >&6; }
9135         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9136 $as_echo "disabled" >&6; }
9137       else
9138         # Check if the provided tool contains a complete path.
9139         tool_specified="$MKTEMP"
9140         tool_basename="${tool_specified##*/}"
9141         if test "x$tool_basename" = "x$tool_specified"; then
9142           # A command without a complete path is provided, search $PATH.
9143           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9144 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9145           # Extract the first word of "$tool_basename", so it can be a program name with args.
9146 set dummy $tool_basename; ac_word=$2
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9148 $as_echo_n "checking for $ac_word... " >&6; }
9149 if ${ac_cv_path_MKTEMP+:} false; then :
9150   $as_echo_n "(cached) " >&6
9151 else
9152   case $MKTEMP in
9153   [\\/]* | ?:[\\/]*)
9154   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9155   ;;
9156   *)
9157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9158 for as_dir in $PATH
9159 do
9160   IFS=$as_save_IFS
9161   test -z "$as_dir" && as_dir=.
9162     for ac_exec_ext in '' $ac_executable_extensions; do
9163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9164     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9166     break 2
9167   fi
9168 done
9169   done
9170 IFS=$as_save_IFS
9171 
9172   ;;
9173 esac
9174 fi
9175 MKTEMP=$ac_cv_path_MKTEMP
9176 if test -n "$MKTEMP"; then
9177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9178 $as_echo "$MKTEMP" >&6; }
9179 else
9180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9181 $as_echo "no" >&6; }
9182 fi
9183 
9184 
9185           if test "x$MKTEMP" = x; then
9186             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9187           fi
9188         else
9189           # Otherwise we believe it is a complete path. Use it as it is.
9190           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9191 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9192           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9193 $as_echo_n "checking for MKTEMP... " >&6; }
9194           if test ! -x "$tool_specified"; then
9195             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9196 $as_echo "not found" >&6; }
9197             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9198           fi
9199           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9200 $as_echo "$tool_specified" >&6; }
9201         fi
9202       fi
9203     fi
9204 
9205   fi
9206 
9207 
9208 
9209   if test "x$MKTEMP" = x; then
9210     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9211   fi
9212 
9213 
9214 
9215 
9216 
9217   # Publish this variable in the help.
9218 
9219 
9220   if [ -z "${MV+x}" ]; then
9221     # The variable is not set by user, try to locate tool using the code snippet
9222     for ac_prog in mv
9223 do
9224   # Extract the first word of "$ac_prog", so it can be a program name with args.
9225 set dummy $ac_prog; ac_word=$2
9226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9227 $as_echo_n "checking for $ac_word... " >&6; }
9228 if ${ac_cv_path_MV+:} false; then :
9229   $as_echo_n "(cached) " >&6
9230 else
9231   case $MV in
9232   [\\/]* | ?:[\\/]*)
9233   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9234   ;;
9235   *)
9236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9237 for as_dir in $PATH
9238 do
9239   IFS=$as_save_IFS
9240   test -z "$as_dir" && as_dir=.
9241     for ac_exec_ext in '' $ac_executable_extensions; do
9242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9243     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9245     break 2
9246   fi
9247 done
9248   done
9249 IFS=$as_save_IFS
9250 
9251   ;;
9252 esac
9253 fi
9254 MV=$ac_cv_path_MV
9255 if test -n "$MV"; then
9256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9257 $as_echo "$MV" >&6; }
9258 else
9259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9260 $as_echo "no" >&6; }
9261 fi
9262 
9263 
9264   test -n "$MV" && break
9265 done
9266 
9267   else
9268     # The variable is set, but is it from the command line or the environment?
9269 
9270     # Try to remove the string !MV! from our list.
9271     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9272     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9273       # If it failed, the variable was not from the command line. Ignore it,
9274       # but warn the user (except for BASH, which is always set by the calling BASH).
9275       if test "xMV" != xBASH; then
9276         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9277 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9278       fi
9279       # Try to locate tool using the code snippet
9280       for ac_prog in mv
9281 do
9282   # Extract the first word of "$ac_prog", so it can be a program name with args.
9283 set dummy $ac_prog; ac_word=$2
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9285 $as_echo_n "checking for $ac_word... " >&6; }
9286 if ${ac_cv_path_MV+:} false; then :
9287   $as_echo_n "(cached) " >&6
9288 else
9289   case $MV in
9290   [\\/]* | ?:[\\/]*)
9291   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9292   ;;
9293   *)
9294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9295 for as_dir in $PATH
9296 do
9297   IFS=$as_save_IFS
9298   test -z "$as_dir" && as_dir=.
9299     for ac_exec_ext in '' $ac_executable_extensions; do
9300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9301     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9303     break 2
9304   fi
9305 done
9306   done
9307 IFS=$as_save_IFS
9308 
9309   ;;
9310 esac
9311 fi
9312 MV=$ac_cv_path_MV
9313 if test -n "$MV"; then
9314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9315 $as_echo "$MV" >&6; }
9316 else
9317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9318 $as_echo "no" >&6; }
9319 fi
9320 
9321 
9322   test -n "$MV" && break
9323 done
9324 
9325     else
9326       # If it succeeded, then it was overridden by the user. We will use it
9327       # for the tool.
9328 
9329       # First remove it from the list of overridden variables, so we can test
9330       # for unknown variables in the end.
9331       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9332 
9333       # Check if we try to supply an empty value
9334       if test "x$MV" = x; then
9335         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9336 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9337         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9338 $as_echo_n "checking for MV... " >&6; }
9339         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9340 $as_echo "disabled" >&6; }
9341       else
9342         # Check if the provided tool contains a complete path.
9343         tool_specified="$MV"
9344         tool_basename="${tool_specified##*/}"
9345         if test "x$tool_basename" = "x$tool_specified"; then
9346           # A command without a complete path is provided, search $PATH.
9347           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9348 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9349           # Extract the first word of "$tool_basename", so it can be a program name with args.
9350 set dummy $tool_basename; ac_word=$2
9351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9352 $as_echo_n "checking for $ac_word... " >&6; }
9353 if ${ac_cv_path_MV+:} false; then :
9354   $as_echo_n "(cached) " >&6
9355 else
9356   case $MV in
9357   [\\/]* | ?:[\\/]*)
9358   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9359   ;;
9360   *)
9361   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9362 for as_dir in $PATH
9363 do
9364   IFS=$as_save_IFS
9365   test -z "$as_dir" && as_dir=.
9366     for ac_exec_ext in '' $ac_executable_extensions; do
9367   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9368     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9370     break 2
9371   fi
9372 done
9373   done
9374 IFS=$as_save_IFS
9375 
9376   ;;
9377 esac
9378 fi
9379 MV=$ac_cv_path_MV
9380 if test -n "$MV"; then
9381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9382 $as_echo "$MV" >&6; }
9383 else
9384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9385 $as_echo "no" >&6; }
9386 fi
9387 
9388 
9389           if test "x$MV" = x; then
9390             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9391           fi
9392         else
9393           # Otherwise we believe it is a complete path. Use it as it is.
9394           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9395 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9396           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9397 $as_echo_n "checking for MV... " >&6; }
9398           if test ! -x "$tool_specified"; then
9399             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9400 $as_echo "not found" >&6; }
9401             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9402           fi
9403           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9404 $as_echo "$tool_specified" >&6; }
9405         fi
9406       fi
9407     fi
9408 
9409   fi
9410 
9411 
9412 
9413   if test "x$MV" = x; then
9414     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9415   fi
9416 
9417 
9418 
9419 
9420 
9421   # Publish this variable in the help.
9422 
9423 
9424   if [ -z "${NAWK+x}" ]; then
9425     # The variable is not set by user, try to locate tool using the code snippet
9426     for ac_prog in nawk gawk awk
9427 do
9428   # Extract the first word of "$ac_prog", so it can be a program name with args.
9429 set dummy $ac_prog; ac_word=$2
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9431 $as_echo_n "checking for $ac_word... " >&6; }
9432 if ${ac_cv_path_NAWK+:} false; then :
9433   $as_echo_n "(cached) " >&6
9434 else
9435   case $NAWK in
9436   [\\/]* | ?:[\\/]*)
9437   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9438   ;;
9439   *)
9440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9441 for as_dir in $PATH
9442 do
9443   IFS=$as_save_IFS
9444   test -z "$as_dir" && as_dir=.
9445     for ac_exec_ext in '' $ac_executable_extensions; do
9446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9447     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9449     break 2
9450   fi
9451 done
9452   done
9453 IFS=$as_save_IFS
9454 
9455   ;;
9456 esac
9457 fi
9458 NAWK=$ac_cv_path_NAWK
9459 if test -n "$NAWK"; then
9460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9461 $as_echo "$NAWK" >&6; }
9462 else
9463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9464 $as_echo "no" >&6; }
9465 fi
9466 
9467 
9468   test -n "$NAWK" && break
9469 done
9470 
9471   else
9472     # The variable is set, but is it from the command line or the environment?
9473 
9474     # Try to remove the string !NAWK! from our list.
9475     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9476     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9477       # If it failed, the variable was not from the command line. Ignore it,
9478       # but warn the user (except for BASH, which is always set by the calling BASH).
9479       if test "xNAWK" != xBASH; then
9480         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9481 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9482       fi
9483       # Try to locate tool using the code snippet
9484       for ac_prog in nawk gawk awk
9485 do
9486   # Extract the first word of "$ac_prog", so it can be a program name with args.
9487 set dummy $ac_prog; ac_word=$2
9488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9489 $as_echo_n "checking for $ac_word... " >&6; }
9490 if ${ac_cv_path_NAWK+:} false; then :
9491   $as_echo_n "(cached) " >&6
9492 else
9493   case $NAWK in
9494   [\\/]* | ?:[\\/]*)
9495   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9496   ;;
9497   *)
9498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9499 for as_dir in $PATH
9500 do
9501   IFS=$as_save_IFS
9502   test -z "$as_dir" && as_dir=.
9503     for ac_exec_ext in '' $ac_executable_extensions; do
9504   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9505     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9507     break 2
9508   fi
9509 done
9510   done
9511 IFS=$as_save_IFS
9512 
9513   ;;
9514 esac
9515 fi
9516 NAWK=$ac_cv_path_NAWK
9517 if test -n "$NAWK"; then
9518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9519 $as_echo "$NAWK" >&6; }
9520 else
9521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9522 $as_echo "no" >&6; }
9523 fi
9524 
9525 
9526   test -n "$NAWK" && break
9527 done
9528 
9529     else
9530       # If it succeeded, then it was overridden by the user. We will use it
9531       # for the tool.
9532 
9533       # First remove it from the list of overridden variables, so we can test
9534       # for unknown variables in the end.
9535       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9536 
9537       # Check if we try to supply an empty value
9538       if test "x$NAWK" = x; then
9539         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9540 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9541         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9542 $as_echo_n "checking for NAWK... " >&6; }
9543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9544 $as_echo "disabled" >&6; }
9545       else
9546         # Check if the provided tool contains a complete path.
9547         tool_specified="$NAWK"
9548         tool_basename="${tool_specified##*/}"
9549         if test "x$tool_basename" = "x$tool_specified"; then
9550           # A command without a complete path is provided, search $PATH.
9551           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9552 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9553           # Extract the first word of "$tool_basename", so it can be a program name with args.
9554 set dummy $tool_basename; ac_word=$2
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9556 $as_echo_n "checking for $ac_word... " >&6; }
9557 if ${ac_cv_path_NAWK+:} false; then :
9558   $as_echo_n "(cached) " >&6
9559 else
9560   case $NAWK in
9561   [\\/]* | ?:[\\/]*)
9562   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9563   ;;
9564   *)
9565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9566 for as_dir in $PATH
9567 do
9568   IFS=$as_save_IFS
9569   test -z "$as_dir" && as_dir=.
9570     for ac_exec_ext in '' $ac_executable_extensions; do
9571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9572     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9574     break 2
9575   fi
9576 done
9577   done
9578 IFS=$as_save_IFS
9579 
9580   ;;
9581 esac
9582 fi
9583 NAWK=$ac_cv_path_NAWK
9584 if test -n "$NAWK"; then
9585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9586 $as_echo "$NAWK" >&6; }
9587 else
9588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9589 $as_echo "no" >&6; }
9590 fi
9591 
9592 
9593           if test "x$NAWK" = x; then
9594             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9595           fi
9596         else
9597           # Otherwise we believe it is a complete path. Use it as it is.
9598           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9599 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9600           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9601 $as_echo_n "checking for NAWK... " >&6; }
9602           if test ! -x "$tool_specified"; then
9603             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9604 $as_echo "not found" >&6; }
9605             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9606           fi
9607           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9608 $as_echo "$tool_specified" >&6; }
9609         fi
9610       fi
9611     fi
9612 
9613   fi
9614 
9615 
9616 
9617   if test "x$NAWK" = x; then
9618     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9619   fi
9620 
9621 
9622 
9623 
9624 
9625   # Publish this variable in the help.
9626 
9627 
9628   if [ -z "${PRINTF+x}" ]; then
9629     # The variable is not set by user, try to locate tool using the code snippet
9630     for ac_prog in printf
9631 do
9632   # Extract the first word of "$ac_prog", so it can be a program name with args.
9633 set dummy $ac_prog; ac_word=$2
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9635 $as_echo_n "checking for $ac_word... " >&6; }
9636 if ${ac_cv_path_PRINTF+:} false; then :
9637   $as_echo_n "(cached) " >&6
9638 else
9639   case $PRINTF in
9640   [\\/]* | ?:[\\/]*)
9641   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9642   ;;
9643   *)
9644   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9645 for as_dir in $PATH
9646 do
9647   IFS=$as_save_IFS
9648   test -z "$as_dir" && as_dir=.
9649     for ac_exec_ext in '' $ac_executable_extensions; do
9650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9651     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9653     break 2
9654   fi
9655 done
9656   done
9657 IFS=$as_save_IFS
9658 
9659   ;;
9660 esac
9661 fi
9662 PRINTF=$ac_cv_path_PRINTF
9663 if test -n "$PRINTF"; then
9664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9665 $as_echo "$PRINTF" >&6; }
9666 else
9667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9668 $as_echo "no" >&6; }
9669 fi
9670 
9671 
9672   test -n "$PRINTF" && break
9673 done
9674 
9675   else
9676     # The variable is set, but is it from the command line or the environment?
9677 
9678     # Try to remove the string !PRINTF! from our list.
9679     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9680     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9681       # If it failed, the variable was not from the command line. Ignore it,
9682       # but warn the user (except for BASH, which is always set by the calling BASH).
9683       if test "xPRINTF" != xBASH; then
9684         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9685 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9686       fi
9687       # Try to locate tool using the code snippet
9688       for ac_prog in printf
9689 do
9690   # Extract the first word of "$ac_prog", so it can be a program name with args.
9691 set dummy $ac_prog; ac_word=$2
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9693 $as_echo_n "checking for $ac_word... " >&6; }
9694 if ${ac_cv_path_PRINTF+:} false; then :
9695   $as_echo_n "(cached) " >&6
9696 else
9697   case $PRINTF in
9698   [\\/]* | ?:[\\/]*)
9699   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9700   ;;
9701   *)
9702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9703 for as_dir in $PATH
9704 do
9705   IFS=$as_save_IFS
9706   test -z "$as_dir" && as_dir=.
9707     for ac_exec_ext in '' $ac_executable_extensions; do
9708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9709     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9711     break 2
9712   fi
9713 done
9714   done
9715 IFS=$as_save_IFS
9716 
9717   ;;
9718 esac
9719 fi
9720 PRINTF=$ac_cv_path_PRINTF
9721 if test -n "$PRINTF"; then
9722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9723 $as_echo "$PRINTF" >&6; }
9724 else
9725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9726 $as_echo "no" >&6; }
9727 fi
9728 
9729 
9730   test -n "$PRINTF" && break
9731 done
9732 
9733     else
9734       # If it succeeded, then it was overridden by the user. We will use it
9735       # for the tool.
9736 
9737       # First remove it from the list of overridden variables, so we can test
9738       # for unknown variables in the end.
9739       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9740 
9741       # Check if we try to supply an empty value
9742       if test "x$PRINTF" = x; then
9743         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9744 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9745         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9746 $as_echo_n "checking for PRINTF... " >&6; }
9747         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9748 $as_echo "disabled" >&6; }
9749       else
9750         # Check if the provided tool contains a complete path.
9751         tool_specified="$PRINTF"
9752         tool_basename="${tool_specified##*/}"
9753         if test "x$tool_basename" = "x$tool_specified"; then
9754           # A command without a complete path is provided, search $PATH.
9755           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9756 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9757           # Extract the first word of "$tool_basename", so it can be a program name with args.
9758 set dummy $tool_basename; ac_word=$2
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9760 $as_echo_n "checking for $ac_word... " >&6; }
9761 if ${ac_cv_path_PRINTF+:} false; then :
9762   $as_echo_n "(cached) " >&6
9763 else
9764   case $PRINTF in
9765   [\\/]* | ?:[\\/]*)
9766   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9767   ;;
9768   *)
9769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9770 for as_dir in $PATH
9771 do
9772   IFS=$as_save_IFS
9773   test -z "$as_dir" && as_dir=.
9774     for ac_exec_ext in '' $ac_executable_extensions; do
9775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9776     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9778     break 2
9779   fi
9780 done
9781   done
9782 IFS=$as_save_IFS
9783 
9784   ;;
9785 esac
9786 fi
9787 PRINTF=$ac_cv_path_PRINTF
9788 if test -n "$PRINTF"; then
9789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9790 $as_echo "$PRINTF" >&6; }
9791 else
9792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9793 $as_echo "no" >&6; }
9794 fi
9795 
9796 
9797           if test "x$PRINTF" = x; then
9798             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9799           fi
9800         else
9801           # Otherwise we believe it is a complete path. Use it as it is.
9802           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9803 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9804           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9805 $as_echo_n "checking for PRINTF... " >&6; }
9806           if test ! -x "$tool_specified"; then
9807             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9808 $as_echo "not found" >&6; }
9809             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9810           fi
9811           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9812 $as_echo "$tool_specified" >&6; }
9813         fi
9814       fi
9815     fi
9816 
9817   fi
9818 
9819 
9820 
9821   if test "x$PRINTF" = x; then
9822     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9823   fi
9824 
9825 
9826 
9827 
9828 
9829   # Publish this variable in the help.
9830 
9831 
9832   if [ -z "${RM+x}" ]; then
9833     # The variable is not set by user, try to locate tool using the code snippet
9834     for ac_prog in rm
9835 do
9836   # Extract the first word of "$ac_prog", so it can be a program name with args.
9837 set dummy $ac_prog; ac_word=$2
9838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9839 $as_echo_n "checking for $ac_word... " >&6; }
9840 if ${ac_cv_path_RM+:} false; then :
9841   $as_echo_n "(cached) " >&6
9842 else
9843   case $RM in
9844   [\\/]* | ?:[\\/]*)
9845   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9846   ;;
9847   *)
9848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9849 for as_dir in $PATH
9850 do
9851   IFS=$as_save_IFS
9852   test -z "$as_dir" && as_dir=.
9853     for ac_exec_ext in '' $ac_executable_extensions; do
9854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9855     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9857     break 2
9858   fi
9859 done
9860   done
9861 IFS=$as_save_IFS
9862 
9863   ;;
9864 esac
9865 fi
9866 RM=$ac_cv_path_RM
9867 if test -n "$RM"; then
9868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9869 $as_echo "$RM" >&6; }
9870 else
9871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9872 $as_echo "no" >&6; }
9873 fi
9874 
9875 
9876   test -n "$RM" && break
9877 done
9878 
9879   else
9880     # The variable is set, but is it from the command line or the environment?
9881 
9882     # Try to remove the string !RM! from our list.
9883     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9884     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9885       # If it failed, the variable was not from the command line. Ignore it,
9886       # but warn the user (except for BASH, which is always set by the calling BASH).
9887       if test "xRM" != xBASH; then
9888         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9889 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9890       fi
9891       # Try to locate tool using the code snippet
9892       for ac_prog in rm
9893 do
9894   # Extract the first word of "$ac_prog", so it can be a program name with args.
9895 set dummy $ac_prog; ac_word=$2
9896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9897 $as_echo_n "checking for $ac_word... " >&6; }
9898 if ${ac_cv_path_RM+:} false; then :
9899   $as_echo_n "(cached) " >&6
9900 else
9901   case $RM in
9902   [\\/]* | ?:[\\/]*)
9903   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9904   ;;
9905   *)
9906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9907 for as_dir in $PATH
9908 do
9909   IFS=$as_save_IFS
9910   test -z "$as_dir" && as_dir=.
9911     for ac_exec_ext in '' $ac_executable_extensions; do
9912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9913     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9915     break 2
9916   fi
9917 done
9918   done
9919 IFS=$as_save_IFS
9920 
9921   ;;
9922 esac
9923 fi
9924 RM=$ac_cv_path_RM
9925 if test -n "$RM"; then
9926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9927 $as_echo "$RM" >&6; }
9928 else
9929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930 $as_echo "no" >&6; }
9931 fi
9932 
9933 
9934   test -n "$RM" && break
9935 done
9936 
9937     else
9938       # If it succeeded, then it was overridden by the user. We will use it
9939       # for the tool.
9940 
9941       # First remove it from the list of overridden variables, so we can test
9942       # for unknown variables in the end.
9943       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9944 
9945       # Check if we try to supply an empty value
9946       if test "x$RM" = x; then
9947         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9948 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9949         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9950 $as_echo_n "checking for RM... " >&6; }
9951         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9952 $as_echo "disabled" >&6; }
9953       else
9954         # Check if the provided tool contains a complete path.
9955         tool_specified="$RM"
9956         tool_basename="${tool_specified##*/}"
9957         if test "x$tool_basename" = "x$tool_specified"; then
9958           # A command without a complete path is provided, search $PATH.
9959           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9960 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9961           # Extract the first word of "$tool_basename", so it can be a program name with args.
9962 set dummy $tool_basename; ac_word=$2
9963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9964 $as_echo_n "checking for $ac_word... " >&6; }
9965 if ${ac_cv_path_RM+:} false; then :
9966   $as_echo_n "(cached) " >&6
9967 else
9968   case $RM in
9969   [\\/]* | ?:[\\/]*)
9970   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9971   ;;
9972   *)
9973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9974 for as_dir in $PATH
9975 do
9976   IFS=$as_save_IFS
9977   test -z "$as_dir" && as_dir=.
9978     for ac_exec_ext in '' $ac_executable_extensions; do
9979   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9980     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9981     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9982     break 2
9983   fi
9984 done
9985   done
9986 IFS=$as_save_IFS
9987 
9988   ;;
9989 esac
9990 fi
9991 RM=$ac_cv_path_RM
9992 if test -n "$RM"; then
9993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9994 $as_echo "$RM" >&6; }
9995 else
9996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9997 $as_echo "no" >&6; }
9998 fi
9999 
10000 
10001           if test "x$RM" = x; then
10002             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10003           fi
10004         else
10005           # Otherwise we believe it is a complete path. Use it as it is.
10006           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10007 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10008           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10009 $as_echo_n "checking for RM... " >&6; }
10010           if test ! -x "$tool_specified"; then
10011             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10012 $as_echo "not found" >&6; }
10013             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10014           fi
10015           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10016 $as_echo "$tool_specified" >&6; }
10017         fi
10018       fi
10019     fi
10020 
10021   fi
10022 
10023 
10024 
10025   if test "x$RM" = x; then
10026     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10027   fi
10028 
10029 
10030 
10031 
10032 
10033   # Publish this variable in the help.
10034 
10035 
10036   if [ -z "${RMDIR+x}" ]; then
10037     # The variable is not set by user, try to locate tool using the code snippet
10038     for ac_prog in rmdir
10039 do
10040   # Extract the first word of "$ac_prog", so it can be a program name with args.
10041 set dummy $ac_prog; ac_word=$2
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10043 $as_echo_n "checking for $ac_word... " >&6; }
10044 if ${ac_cv_path_RMDIR+:} false; then :
10045   $as_echo_n "(cached) " >&6
10046 else
10047   case $RMDIR in
10048   [\\/]* | ?:[\\/]*)
10049   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10050   ;;
10051   *)
10052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10053 for as_dir in $PATH
10054 do
10055   IFS=$as_save_IFS
10056   test -z "$as_dir" && as_dir=.
10057     for ac_exec_ext in '' $ac_executable_extensions; do
10058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10059     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10061     break 2
10062   fi
10063 done
10064   done
10065 IFS=$as_save_IFS
10066 
10067   ;;
10068 esac
10069 fi
10070 RMDIR=$ac_cv_path_RMDIR
10071 if test -n "$RMDIR"; then
10072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10073 $as_echo "$RMDIR" >&6; }
10074 else
10075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10076 $as_echo "no" >&6; }
10077 fi
10078 
10079 
10080   test -n "$RMDIR" && break
10081 done
10082 
10083   else
10084     # The variable is set, but is it from the command line or the environment?
10085 
10086     # Try to remove the string !RMDIR! from our list.
10087     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10088     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10089       # If it failed, the variable was not from the command line. Ignore it,
10090       # but warn the user (except for BASH, which is always set by the calling BASH).
10091       if test "xRMDIR" != xBASH; then
10092         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10093 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10094       fi
10095       # Try to locate tool using the code snippet
10096       for ac_prog in rmdir
10097 do
10098   # Extract the first word of "$ac_prog", so it can be a program name with args.
10099 set dummy $ac_prog; ac_word=$2
10100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10101 $as_echo_n "checking for $ac_word... " >&6; }
10102 if ${ac_cv_path_RMDIR+:} false; then :
10103   $as_echo_n "(cached) " >&6
10104 else
10105   case $RMDIR in
10106   [\\/]* | ?:[\\/]*)
10107   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10108   ;;
10109   *)
10110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10111 for as_dir in $PATH
10112 do
10113   IFS=$as_save_IFS
10114   test -z "$as_dir" && as_dir=.
10115     for ac_exec_ext in '' $ac_executable_extensions; do
10116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10117     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10119     break 2
10120   fi
10121 done
10122   done
10123 IFS=$as_save_IFS
10124 
10125   ;;
10126 esac
10127 fi
10128 RMDIR=$ac_cv_path_RMDIR
10129 if test -n "$RMDIR"; then
10130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10131 $as_echo "$RMDIR" >&6; }
10132 else
10133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10134 $as_echo "no" >&6; }
10135 fi
10136 
10137 
10138   test -n "$RMDIR" && break
10139 done
10140 
10141     else
10142       # If it succeeded, then it was overridden by the user. We will use it
10143       # for the tool.
10144 
10145       # First remove it from the list of overridden variables, so we can test
10146       # for unknown variables in the end.
10147       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10148 
10149       # Check if we try to supply an empty value
10150       if test "x$RMDIR" = x; then
10151         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10152 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10153         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10154 $as_echo_n "checking for RMDIR... " >&6; }
10155         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10156 $as_echo "disabled" >&6; }
10157       else
10158         # Check if the provided tool contains a complete path.
10159         tool_specified="$RMDIR"
10160         tool_basename="${tool_specified##*/}"
10161         if test "x$tool_basename" = "x$tool_specified"; then
10162           # A command without a complete path is provided, search $PATH.
10163           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10164 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10165           # Extract the first word of "$tool_basename", so it can be a program name with args.
10166 set dummy $tool_basename; ac_word=$2
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10168 $as_echo_n "checking for $ac_word... " >&6; }
10169 if ${ac_cv_path_RMDIR+:} false; then :
10170   $as_echo_n "(cached) " >&6
10171 else
10172   case $RMDIR in
10173   [\\/]* | ?:[\\/]*)
10174   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10175   ;;
10176   *)
10177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10178 for as_dir in $PATH
10179 do
10180   IFS=$as_save_IFS
10181   test -z "$as_dir" && as_dir=.
10182     for ac_exec_ext in '' $ac_executable_extensions; do
10183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10184     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10186     break 2
10187   fi
10188 done
10189   done
10190 IFS=$as_save_IFS
10191 
10192   ;;
10193 esac
10194 fi
10195 RMDIR=$ac_cv_path_RMDIR
10196 if test -n "$RMDIR"; then
10197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10198 $as_echo "$RMDIR" >&6; }
10199 else
10200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10201 $as_echo "no" >&6; }
10202 fi
10203 
10204 
10205           if test "x$RMDIR" = x; then
10206             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10207           fi
10208         else
10209           # Otherwise we believe it is a complete path. Use it as it is.
10210           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10211 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10212           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10213 $as_echo_n "checking for RMDIR... " >&6; }
10214           if test ! -x "$tool_specified"; then
10215             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10216 $as_echo "not found" >&6; }
10217             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10218           fi
10219           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10220 $as_echo "$tool_specified" >&6; }
10221         fi
10222       fi
10223     fi
10224 
10225   fi
10226 
10227 
10228 
10229   if test "x$RMDIR" = x; then
10230     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10231   fi
10232 
10233 
10234 
10235 
10236 
10237   # Publish this variable in the help.
10238 
10239 
10240   if [ -z "${SH+x}" ]; then
10241     # The variable is not set by user, try to locate tool using the code snippet
10242     for ac_prog in sh
10243 do
10244   # Extract the first word of "$ac_prog", so it can be a program name with args.
10245 set dummy $ac_prog; ac_word=$2
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10247 $as_echo_n "checking for $ac_word... " >&6; }
10248 if ${ac_cv_path_SH+:} false; then :
10249   $as_echo_n "(cached) " >&6
10250 else
10251   case $SH in
10252   [\\/]* | ?:[\\/]*)
10253   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10254   ;;
10255   *)
10256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10257 for as_dir in $PATH
10258 do
10259   IFS=$as_save_IFS
10260   test -z "$as_dir" && as_dir=.
10261     for ac_exec_ext in '' $ac_executable_extensions; do
10262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10263     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10265     break 2
10266   fi
10267 done
10268   done
10269 IFS=$as_save_IFS
10270 
10271   ;;
10272 esac
10273 fi
10274 SH=$ac_cv_path_SH
10275 if test -n "$SH"; then
10276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10277 $as_echo "$SH" >&6; }
10278 else
10279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10280 $as_echo "no" >&6; }
10281 fi
10282 
10283 
10284   test -n "$SH" && break
10285 done
10286 
10287   else
10288     # The variable is set, but is it from the command line or the environment?
10289 
10290     # Try to remove the string !SH! from our list.
10291     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10292     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10293       # If it failed, the variable was not from the command line. Ignore it,
10294       # but warn the user (except for BASH, which is always set by the calling BASH).
10295       if test "xSH" != xBASH; then
10296         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10297 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10298       fi
10299       # Try to locate tool using the code snippet
10300       for ac_prog in sh
10301 do
10302   # Extract the first word of "$ac_prog", so it can be a program name with args.
10303 set dummy $ac_prog; ac_word=$2
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10305 $as_echo_n "checking for $ac_word... " >&6; }
10306 if ${ac_cv_path_SH+:} false; then :
10307   $as_echo_n "(cached) " >&6
10308 else
10309   case $SH in
10310   [\\/]* | ?:[\\/]*)
10311   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10312   ;;
10313   *)
10314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10315 for as_dir in $PATH
10316 do
10317   IFS=$as_save_IFS
10318   test -z "$as_dir" && as_dir=.
10319     for ac_exec_ext in '' $ac_executable_extensions; do
10320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10321     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10323     break 2
10324   fi
10325 done
10326   done
10327 IFS=$as_save_IFS
10328 
10329   ;;
10330 esac
10331 fi
10332 SH=$ac_cv_path_SH
10333 if test -n "$SH"; then
10334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10335 $as_echo "$SH" >&6; }
10336 else
10337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10338 $as_echo "no" >&6; }
10339 fi
10340 
10341 
10342   test -n "$SH" && break
10343 done
10344 
10345     else
10346       # If it succeeded, then it was overridden by the user. We will use it
10347       # for the tool.
10348 
10349       # First remove it from the list of overridden variables, so we can test
10350       # for unknown variables in the end.
10351       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10352 
10353       # Check if we try to supply an empty value
10354       if test "x$SH" = x; then
10355         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10356 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10357         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10358 $as_echo_n "checking for SH... " >&6; }
10359         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10360 $as_echo "disabled" >&6; }
10361       else
10362         # Check if the provided tool contains a complete path.
10363         tool_specified="$SH"
10364         tool_basename="${tool_specified##*/}"
10365         if test "x$tool_basename" = "x$tool_specified"; then
10366           # A command without a complete path is provided, search $PATH.
10367           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10368 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10369           # Extract the first word of "$tool_basename", so it can be a program name with args.
10370 set dummy $tool_basename; ac_word=$2
10371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10372 $as_echo_n "checking for $ac_word... " >&6; }
10373 if ${ac_cv_path_SH+:} false; then :
10374   $as_echo_n "(cached) " >&6
10375 else
10376   case $SH in
10377   [\\/]* | ?:[\\/]*)
10378   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10379   ;;
10380   *)
10381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10382 for as_dir in $PATH
10383 do
10384   IFS=$as_save_IFS
10385   test -z "$as_dir" && as_dir=.
10386     for ac_exec_ext in '' $ac_executable_extensions; do
10387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10388     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10390     break 2
10391   fi
10392 done
10393   done
10394 IFS=$as_save_IFS
10395 
10396   ;;
10397 esac
10398 fi
10399 SH=$ac_cv_path_SH
10400 if test -n "$SH"; then
10401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10402 $as_echo "$SH" >&6; }
10403 else
10404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10405 $as_echo "no" >&6; }
10406 fi
10407 
10408 
10409           if test "x$SH" = x; then
10410             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10411           fi
10412         else
10413           # Otherwise we believe it is a complete path. Use it as it is.
10414           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10415 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10416           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10417 $as_echo_n "checking for SH... " >&6; }
10418           if test ! -x "$tool_specified"; then
10419             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10420 $as_echo "not found" >&6; }
10421             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10422           fi
10423           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10424 $as_echo "$tool_specified" >&6; }
10425         fi
10426       fi
10427     fi
10428 
10429   fi
10430 
10431 
10432 
10433   if test "x$SH" = x; then
10434     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10435   fi
10436 
10437 
10438 
10439 
10440 
10441   # Publish this variable in the help.
10442 
10443 
10444   if [ -z "${SORT+x}" ]; then
10445     # The variable is not set by user, try to locate tool using the code snippet
10446     for ac_prog in sort
10447 do
10448   # Extract the first word of "$ac_prog", so it can be a program name with args.
10449 set dummy $ac_prog; ac_word=$2
10450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10451 $as_echo_n "checking for $ac_word... " >&6; }
10452 if ${ac_cv_path_SORT+:} false; then :
10453   $as_echo_n "(cached) " >&6
10454 else
10455   case $SORT in
10456   [\\/]* | ?:[\\/]*)
10457   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10458   ;;
10459   *)
10460   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10461 for as_dir in $PATH
10462 do
10463   IFS=$as_save_IFS
10464   test -z "$as_dir" && as_dir=.
10465     for ac_exec_ext in '' $ac_executable_extensions; do
10466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10467     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10469     break 2
10470   fi
10471 done
10472   done
10473 IFS=$as_save_IFS
10474 
10475   ;;
10476 esac
10477 fi
10478 SORT=$ac_cv_path_SORT
10479 if test -n "$SORT"; then
10480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10481 $as_echo "$SORT" >&6; }
10482 else
10483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10484 $as_echo "no" >&6; }
10485 fi
10486 
10487 
10488   test -n "$SORT" && break
10489 done
10490 
10491   else
10492     # The variable is set, but is it from the command line or the environment?
10493 
10494     # Try to remove the string !SORT! from our list.
10495     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10496     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10497       # If it failed, the variable was not from the command line. Ignore it,
10498       # but warn the user (except for BASH, which is always set by the calling BASH).
10499       if test "xSORT" != xBASH; then
10500         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10501 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10502       fi
10503       # Try to locate tool using the code snippet
10504       for ac_prog in sort
10505 do
10506   # Extract the first word of "$ac_prog", so it can be a program name with args.
10507 set dummy $ac_prog; ac_word=$2
10508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10509 $as_echo_n "checking for $ac_word... " >&6; }
10510 if ${ac_cv_path_SORT+:} false; then :
10511   $as_echo_n "(cached) " >&6
10512 else
10513   case $SORT in
10514   [\\/]* | ?:[\\/]*)
10515   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10516   ;;
10517   *)
10518   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10519 for as_dir in $PATH
10520 do
10521   IFS=$as_save_IFS
10522   test -z "$as_dir" && as_dir=.
10523     for ac_exec_ext in '' $ac_executable_extensions; do
10524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10525     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10526     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10527     break 2
10528   fi
10529 done
10530   done
10531 IFS=$as_save_IFS
10532 
10533   ;;
10534 esac
10535 fi
10536 SORT=$ac_cv_path_SORT
10537 if test -n "$SORT"; then
10538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10539 $as_echo "$SORT" >&6; }
10540 else
10541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10542 $as_echo "no" >&6; }
10543 fi
10544 
10545 
10546   test -n "$SORT" && break
10547 done
10548 
10549     else
10550       # If it succeeded, then it was overridden by the user. We will use it
10551       # for the tool.
10552 
10553       # First remove it from the list of overridden variables, so we can test
10554       # for unknown variables in the end.
10555       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10556 
10557       # Check if we try to supply an empty value
10558       if test "x$SORT" = x; then
10559         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10560 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10561         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10562 $as_echo_n "checking for SORT... " >&6; }
10563         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10564 $as_echo "disabled" >&6; }
10565       else
10566         # Check if the provided tool contains a complete path.
10567         tool_specified="$SORT"
10568         tool_basename="${tool_specified##*/}"
10569         if test "x$tool_basename" = "x$tool_specified"; then
10570           # A command without a complete path is provided, search $PATH.
10571           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10572 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10573           # Extract the first word of "$tool_basename", so it can be a program name with args.
10574 set dummy $tool_basename; ac_word=$2
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10576 $as_echo_n "checking for $ac_word... " >&6; }
10577 if ${ac_cv_path_SORT+:} false; then :
10578   $as_echo_n "(cached) " >&6
10579 else
10580   case $SORT in
10581   [\\/]* | ?:[\\/]*)
10582   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10583   ;;
10584   *)
10585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10586 for as_dir in $PATH
10587 do
10588   IFS=$as_save_IFS
10589   test -z "$as_dir" && as_dir=.
10590     for ac_exec_ext in '' $ac_executable_extensions; do
10591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10592     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10594     break 2
10595   fi
10596 done
10597   done
10598 IFS=$as_save_IFS
10599 
10600   ;;
10601 esac
10602 fi
10603 SORT=$ac_cv_path_SORT
10604 if test -n "$SORT"; then
10605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10606 $as_echo "$SORT" >&6; }
10607 else
10608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10609 $as_echo "no" >&6; }
10610 fi
10611 
10612 
10613           if test "x$SORT" = x; then
10614             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10615           fi
10616         else
10617           # Otherwise we believe it is a complete path. Use it as it is.
10618           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10619 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10620           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10621 $as_echo_n "checking for SORT... " >&6; }
10622           if test ! -x "$tool_specified"; then
10623             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10624 $as_echo "not found" >&6; }
10625             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10626           fi
10627           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10628 $as_echo "$tool_specified" >&6; }
10629         fi
10630       fi
10631     fi
10632 
10633   fi
10634 
10635 
10636 
10637   if test "x$SORT" = x; then
10638     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10639   fi
10640 
10641 
10642 
10643 
10644 
10645   # Publish this variable in the help.
10646 
10647 
10648   if [ -z "${TAIL+x}" ]; then
10649     # The variable is not set by user, try to locate tool using the code snippet
10650     for ac_prog in tail
10651 do
10652   # Extract the first word of "$ac_prog", so it can be a program name with args.
10653 set dummy $ac_prog; ac_word=$2
10654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10655 $as_echo_n "checking for $ac_word... " >&6; }
10656 if ${ac_cv_path_TAIL+:} false; then :
10657   $as_echo_n "(cached) " >&6
10658 else
10659   case $TAIL in
10660   [\\/]* | ?:[\\/]*)
10661   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10662   ;;
10663   *)
10664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10665 for as_dir in $PATH
10666 do
10667   IFS=$as_save_IFS
10668   test -z "$as_dir" && as_dir=.
10669     for ac_exec_ext in '' $ac_executable_extensions; do
10670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10671     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10673     break 2
10674   fi
10675 done
10676   done
10677 IFS=$as_save_IFS
10678 
10679   ;;
10680 esac
10681 fi
10682 TAIL=$ac_cv_path_TAIL
10683 if test -n "$TAIL"; then
10684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10685 $as_echo "$TAIL" >&6; }
10686 else
10687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10688 $as_echo "no" >&6; }
10689 fi
10690 
10691 
10692   test -n "$TAIL" && break
10693 done
10694 
10695   else
10696     # The variable is set, but is it from the command line or the environment?
10697 
10698     # Try to remove the string !TAIL! from our list.
10699     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10700     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10701       # If it failed, the variable was not from the command line. Ignore it,
10702       # but warn the user (except for BASH, which is always set by the calling BASH).
10703       if test "xTAIL" != xBASH; then
10704         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10705 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10706       fi
10707       # Try to locate tool using the code snippet
10708       for ac_prog in tail
10709 do
10710   # Extract the first word of "$ac_prog", so it can be a program name with args.
10711 set dummy $ac_prog; ac_word=$2
10712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10713 $as_echo_n "checking for $ac_word... " >&6; }
10714 if ${ac_cv_path_TAIL+:} false; then :
10715   $as_echo_n "(cached) " >&6
10716 else
10717   case $TAIL in
10718   [\\/]* | ?:[\\/]*)
10719   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10720   ;;
10721   *)
10722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10723 for as_dir in $PATH
10724 do
10725   IFS=$as_save_IFS
10726   test -z "$as_dir" && as_dir=.
10727     for ac_exec_ext in '' $ac_executable_extensions; do
10728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10729     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10731     break 2
10732   fi
10733 done
10734   done
10735 IFS=$as_save_IFS
10736 
10737   ;;
10738 esac
10739 fi
10740 TAIL=$ac_cv_path_TAIL
10741 if test -n "$TAIL"; then
10742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10743 $as_echo "$TAIL" >&6; }
10744 else
10745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10746 $as_echo "no" >&6; }
10747 fi
10748 
10749 
10750   test -n "$TAIL" && break
10751 done
10752 
10753     else
10754       # If it succeeded, then it was overridden by the user. We will use it
10755       # for the tool.
10756 
10757       # First remove it from the list of overridden variables, so we can test
10758       # for unknown variables in the end.
10759       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10760 
10761       # Check if we try to supply an empty value
10762       if test "x$TAIL" = x; then
10763         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10764 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10765         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10766 $as_echo_n "checking for TAIL... " >&6; }
10767         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10768 $as_echo "disabled" >&6; }
10769       else
10770         # Check if the provided tool contains a complete path.
10771         tool_specified="$TAIL"
10772         tool_basename="${tool_specified##*/}"
10773         if test "x$tool_basename" = "x$tool_specified"; then
10774           # A command without a complete path is provided, search $PATH.
10775           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10776 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10777           # Extract the first word of "$tool_basename", so it can be a program name with args.
10778 set dummy $tool_basename; ac_word=$2
10779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10780 $as_echo_n "checking for $ac_word... " >&6; }
10781 if ${ac_cv_path_TAIL+:} false; then :
10782   $as_echo_n "(cached) " >&6
10783 else
10784   case $TAIL in
10785   [\\/]* | ?:[\\/]*)
10786   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10787   ;;
10788   *)
10789   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10790 for as_dir in $PATH
10791 do
10792   IFS=$as_save_IFS
10793   test -z "$as_dir" && as_dir=.
10794     for ac_exec_ext in '' $ac_executable_extensions; do
10795   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10796     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10797     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10798     break 2
10799   fi
10800 done
10801   done
10802 IFS=$as_save_IFS
10803 
10804   ;;
10805 esac
10806 fi
10807 TAIL=$ac_cv_path_TAIL
10808 if test -n "$TAIL"; then
10809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10810 $as_echo "$TAIL" >&6; }
10811 else
10812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10813 $as_echo "no" >&6; }
10814 fi
10815 
10816 
10817           if test "x$TAIL" = x; then
10818             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10819           fi
10820         else
10821           # Otherwise we believe it is a complete path. Use it as it is.
10822           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10823 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10824           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10825 $as_echo_n "checking for TAIL... " >&6; }
10826           if test ! -x "$tool_specified"; then
10827             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10828 $as_echo "not found" >&6; }
10829             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10830           fi
10831           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10832 $as_echo "$tool_specified" >&6; }
10833         fi
10834       fi
10835     fi
10836 
10837   fi
10838 
10839 
10840 
10841   if test "x$TAIL" = x; then
10842     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10843   fi
10844 
10845 
10846 
10847 
10848 
10849   # Publish this variable in the help.
10850 
10851 
10852   if [ -z "${TAR+x}" ]; then
10853     # The variable is not set by user, try to locate tool using the code snippet
10854     for ac_prog in tar
10855 do
10856   # Extract the first word of "$ac_prog", so it can be a program name with args.
10857 set dummy $ac_prog; ac_word=$2
10858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10859 $as_echo_n "checking for $ac_word... " >&6; }
10860 if ${ac_cv_path_TAR+:} false; then :
10861   $as_echo_n "(cached) " >&6
10862 else
10863   case $TAR in
10864   [\\/]* | ?:[\\/]*)
10865   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10866   ;;
10867   *)
10868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10869 for as_dir in $PATH
10870 do
10871   IFS=$as_save_IFS
10872   test -z "$as_dir" && as_dir=.
10873     for ac_exec_ext in '' $ac_executable_extensions; do
10874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10875     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10877     break 2
10878   fi
10879 done
10880   done
10881 IFS=$as_save_IFS
10882 
10883   ;;
10884 esac
10885 fi
10886 TAR=$ac_cv_path_TAR
10887 if test -n "$TAR"; then
10888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10889 $as_echo "$TAR" >&6; }
10890 else
10891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10892 $as_echo "no" >&6; }
10893 fi
10894 
10895 
10896   test -n "$TAR" && break
10897 done
10898 
10899   else
10900     # The variable is set, but is it from the command line or the environment?
10901 
10902     # Try to remove the string !TAR! from our list.
10903     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10904     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10905       # If it failed, the variable was not from the command line. Ignore it,
10906       # but warn the user (except for BASH, which is always set by the calling BASH).
10907       if test "xTAR" != xBASH; then
10908         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10909 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10910       fi
10911       # Try to locate tool using the code snippet
10912       for ac_prog in tar
10913 do
10914   # Extract the first word of "$ac_prog", so it can be a program name with args.
10915 set dummy $ac_prog; ac_word=$2
10916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10917 $as_echo_n "checking for $ac_word... " >&6; }
10918 if ${ac_cv_path_TAR+:} false; then :
10919   $as_echo_n "(cached) " >&6
10920 else
10921   case $TAR in
10922   [\\/]* | ?:[\\/]*)
10923   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10924   ;;
10925   *)
10926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10927 for as_dir in $PATH
10928 do
10929   IFS=$as_save_IFS
10930   test -z "$as_dir" && as_dir=.
10931     for ac_exec_ext in '' $ac_executable_extensions; do
10932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10933     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10935     break 2
10936   fi
10937 done
10938   done
10939 IFS=$as_save_IFS
10940 
10941   ;;
10942 esac
10943 fi
10944 TAR=$ac_cv_path_TAR
10945 if test -n "$TAR"; then
10946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10947 $as_echo "$TAR" >&6; }
10948 else
10949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10950 $as_echo "no" >&6; }
10951 fi
10952 
10953 
10954   test -n "$TAR" && break
10955 done
10956 
10957     else
10958       # If it succeeded, then it was overridden by the user. We will use it
10959       # for the tool.
10960 
10961       # First remove it from the list of overridden variables, so we can test
10962       # for unknown variables in the end.
10963       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10964 
10965       # Check if we try to supply an empty value
10966       if test "x$TAR" = x; then
10967         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10968 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10969         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10970 $as_echo_n "checking for TAR... " >&6; }
10971         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10972 $as_echo "disabled" >&6; }
10973       else
10974         # Check if the provided tool contains a complete path.
10975         tool_specified="$TAR"
10976         tool_basename="${tool_specified##*/}"
10977         if test "x$tool_basename" = "x$tool_specified"; then
10978           # A command without a complete path is provided, search $PATH.
10979           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10980 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10981           # Extract the first word of "$tool_basename", so it can be a program name with args.
10982 set dummy $tool_basename; ac_word=$2
10983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10984 $as_echo_n "checking for $ac_word... " >&6; }
10985 if ${ac_cv_path_TAR+:} false; then :
10986   $as_echo_n "(cached) " >&6
10987 else
10988   case $TAR in
10989   [\\/]* | ?:[\\/]*)
10990   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10991   ;;
10992   *)
10993   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10994 for as_dir in $PATH
10995 do
10996   IFS=$as_save_IFS
10997   test -z "$as_dir" && as_dir=.
10998     for ac_exec_ext in '' $ac_executable_extensions; do
10999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11000     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11001     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11002     break 2
11003   fi
11004 done
11005   done
11006 IFS=$as_save_IFS
11007 
11008   ;;
11009 esac
11010 fi
11011 TAR=$ac_cv_path_TAR
11012 if test -n "$TAR"; then
11013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11014 $as_echo "$TAR" >&6; }
11015 else
11016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11017 $as_echo "no" >&6; }
11018 fi
11019 
11020 
11021           if test "x$TAR" = x; then
11022             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11023           fi
11024         else
11025           # Otherwise we believe it is a complete path. Use it as it is.
11026           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11027 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11028           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11029 $as_echo_n "checking for TAR... " >&6; }
11030           if test ! -x "$tool_specified"; then
11031             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11032 $as_echo "not found" >&6; }
11033             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11034           fi
11035           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11036 $as_echo "$tool_specified" >&6; }
11037         fi
11038       fi
11039     fi
11040 
11041   fi
11042 
11043 
11044 
11045   if test "x$TAR" = x; then
11046     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11047   fi
11048 
11049 
11050 
11051 
11052 
11053   # Publish this variable in the help.
11054 
11055 
11056   if [ -z "${TEE+x}" ]; then
11057     # The variable is not set by user, try to locate tool using the code snippet
11058     for ac_prog in tee
11059 do
11060   # Extract the first word of "$ac_prog", so it can be a program name with args.
11061 set dummy $ac_prog; ac_word=$2
11062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11063 $as_echo_n "checking for $ac_word... " >&6; }
11064 if ${ac_cv_path_TEE+:} false; then :
11065   $as_echo_n "(cached) " >&6
11066 else
11067   case $TEE in
11068   [\\/]* | ?:[\\/]*)
11069   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11070   ;;
11071   *)
11072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11073 for as_dir in $PATH
11074 do
11075   IFS=$as_save_IFS
11076   test -z "$as_dir" && as_dir=.
11077     for ac_exec_ext in '' $ac_executable_extensions; do
11078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11079     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11081     break 2
11082   fi
11083 done
11084   done
11085 IFS=$as_save_IFS
11086 
11087   ;;
11088 esac
11089 fi
11090 TEE=$ac_cv_path_TEE
11091 if test -n "$TEE"; then
11092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11093 $as_echo "$TEE" >&6; }
11094 else
11095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11096 $as_echo "no" >&6; }
11097 fi
11098 
11099 
11100   test -n "$TEE" && break
11101 done
11102 
11103   else
11104     # The variable is set, but is it from the command line or the environment?
11105 
11106     # Try to remove the string !TEE! from our list.
11107     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11108     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11109       # If it failed, the variable was not from the command line. Ignore it,
11110       # but warn the user (except for BASH, which is always set by the calling BASH).
11111       if test "xTEE" != xBASH; then
11112         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11113 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11114       fi
11115       # Try to locate tool using the code snippet
11116       for ac_prog in tee
11117 do
11118   # Extract the first word of "$ac_prog", so it can be a program name with args.
11119 set dummy $ac_prog; ac_word=$2
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11121 $as_echo_n "checking for $ac_word... " >&6; }
11122 if ${ac_cv_path_TEE+:} false; then :
11123   $as_echo_n "(cached) " >&6
11124 else
11125   case $TEE in
11126   [\\/]* | ?:[\\/]*)
11127   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11128   ;;
11129   *)
11130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11131 for as_dir in $PATH
11132 do
11133   IFS=$as_save_IFS
11134   test -z "$as_dir" && as_dir=.
11135     for ac_exec_ext in '' $ac_executable_extensions; do
11136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11137     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11139     break 2
11140   fi
11141 done
11142   done
11143 IFS=$as_save_IFS
11144 
11145   ;;
11146 esac
11147 fi
11148 TEE=$ac_cv_path_TEE
11149 if test -n "$TEE"; then
11150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11151 $as_echo "$TEE" >&6; }
11152 else
11153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11154 $as_echo "no" >&6; }
11155 fi
11156 
11157 
11158   test -n "$TEE" && break
11159 done
11160 
11161     else
11162       # If it succeeded, then it was overridden by the user. We will use it
11163       # for the tool.
11164 
11165       # First remove it from the list of overridden variables, so we can test
11166       # for unknown variables in the end.
11167       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11168 
11169       # Check if we try to supply an empty value
11170       if test "x$TEE" = x; then
11171         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11172 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11173         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11174 $as_echo_n "checking for TEE... " >&6; }
11175         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11176 $as_echo "disabled" >&6; }
11177       else
11178         # Check if the provided tool contains a complete path.
11179         tool_specified="$TEE"
11180         tool_basename="${tool_specified##*/}"
11181         if test "x$tool_basename" = "x$tool_specified"; then
11182           # A command without a complete path is provided, search $PATH.
11183           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11184 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11185           # Extract the first word of "$tool_basename", so it can be a program name with args.
11186 set dummy $tool_basename; ac_word=$2
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11188 $as_echo_n "checking for $ac_word... " >&6; }
11189 if ${ac_cv_path_TEE+:} false; then :
11190   $as_echo_n "(cached) " >&6
11191 else
11192   case $TEE in
11193   [\\/]* | ?:[\\/]*)
11194   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11195   ;;
11196   *)
11197   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11198 for as_dir in $PATH
11199 do
11200   IFS=$as_save_IFS
11201   test -z "$as_dir" && as_dir=.
11202     for ac_exec_ext in '' $ac_executable_extensions; do
11203   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11204     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11205     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11206     break 2
11207   fi
11208 done
11209   done
11210 IFS=$as_save_IFS
11211 
11212   ;;
11213 esac
11214 fi
11215 TEE=$ac_cv_path_TEE
11216 if test -n "$TEE"; then
11217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11218 $as_echo "$TEE" >&6; }
11219 else
11220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11221 $as_echo "no" >&6; }
11222 fi
11223 
11224 
11225           if test "x$TEE" = x; then
11226             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11227           fi
11228         else
11229           # Otherwise we believe it is a complete path. Use it as it is.
11230           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11231 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11232           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11233 $as_echo_n "checking for TEE... " >&6; }
11234           if test ! -x "$tool_specified"; then
11235             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11236 $as_echo "not found" >&6; }
11237             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11238           fi
11239           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11240 $as_echo "$tool_specified" >&6; }
11241         fi
11242       fi
11243     fi
11244 
11245   fi
11246 
11247 
11248 
11249   if test "x$TEE" = x; then
11250     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11251   fi
11252 
11253 
11254 
11255 
11256 
11257   # Publish this variable in the help.
11258 
11259 
11260   if [ -z "${TOUCH+x}" ]; then
11261     # The variable is not set by user, try to locate tool using the code snippet
11262     for ac_prog in touch
11263 do
11264   # Extract the first word of "$ac_prog", so it can be a program name with args.
11265 set dummy $ac_prog; ac_word=$2
11266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11267 $as_echo_n "checking for $ac_word... " >&6; }
11268 if ${ac_cv_path_TOUCH+:} false; then :
11269   $as_echo_n "(cached) " >&6
11270 else
11271   case $TOUCH in
11272   [\\/]* | ?:[\\/]*)
11273   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11274   ;;
11275   *)
11276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11277 for as_dir in $PATH
11278 do
11279   IFS=$as_save_IFS
11280   test -z "$as_dir" && as_dir=.
11281     for ac_exec_ext in '' $ac_executable_extensions; do
11282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11283     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11285     break 2
11286   fi
11287 done
11288   done
11289 IFS=$as_save_IFS
11290 
11291   ;;
11292 esac
11293 fi
11294 TOUCH=$ac_cv_path_TOUCH
11295 if test -n "$TOUCH"; then
11296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11297 $as_echo "$TOUCH" >&6; }
11298 else
11299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11300 $as_echo "no" >&6; }
11301 fi
11302 
11303 
11304   test -n "$TOUCH" && break
11305 done
11306 
11307   else
11308     # The variable is set, but is it from the command line or the environment?
11309 
11310     # Try to remove the string !TOUCH! from our list.
11311     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11312     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11313       # If it failed, the variable was not from the command line. Ignore it,
11314       # but warn the user (except for BASH, which is always set by the calling BASH).
11315       if test "xTOUCH" != xBASH; then
11316         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11317 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11318       fi
11319       # Try to locate tool using the code snippet
11320       for ac_prog in touch
11321 do
11322   # Extract the first word of "$ac_prog", so it can be a program name with args.
11323 set dummy $ac_prog; ac_word=$2
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11325 $as_echo_n "checking for $ac_word... " >&6; }
11326 if ${ac_cv_path_TOUCH+:} false; then :
11327   $as_echo_n "(cached) " >&6
11328 else
11329   case $TOUCH in
11330   [\\/]* | ?:[\\/]*)
11331   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11332   ;;
11333   *)
11334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11335 for as_dir in $PATH
11336 do
11337   IFS=$as_save_IFS
11338   test -z "$as_dir" && as_dir=.
11339     for ac_exec_ext in '' $ac_executable_extensions; do
11340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11341     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11343     break 2
11344   fi
11345 done
11346   done
11347 IFS=$as_save_IFS
11348 
11349   ;;
11350 esac
11351 fi
11352 TOUCH=$ac_cv_path_TOUCH
11353 if test -n "$TOUCH"; then
11354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11355 $as_echo "$TOUCH" >&6; }
11356 else
11357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11358 $as_echo "no" >&6; }
11359 fi
11360 
11361 
11362   test -n "$TOUCH" && break
11363 done
11364 
11365     else
11366       # If it succeeded, then it was overridden by the user. We will use it
11367       # for the tool.
11368 
11369       # First remove it from the list of overridden variables, so we can test
11370       # for unknown variables in the end.
11371       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11372 
11373       # Check if we try to supply an empty value
11374       if test "x$TOUCH" = x; then
11375         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11376 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11377         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11378 $as_echo_n "checking for TOUCH... " >&6; }
11379         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11380 $as_echo "disabled" >&6; }
11381       else
11382         # Check if the provided tool contains a complete path.
11383         tool_specified="$TOUCH"
11384         tool_basename="${tool_specified##*/}"
11385         if test "x$tool_basename" = "x$tool_specified"; then
11386           # A command without a complete path is provided, search $PATH.
11387           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11388 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11389           # Extract the first word of "$tool_basename", so it can be a program name with args.
11390 set dummy $tool_basename; ac_word=$2
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11392 $as_echo_n "checking for $ac_word... " >&6; }
11393 if ${ac_cv_path_TOUCH+:} false; then :
11394   $as_echo_n "(cached) " >&6
11395 else
11396   case $TOUCH in
11397   [\\/]* | ?:[\\/]*)
11398   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11399   ;;
11400   *)
11401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11402 for as_dir in $PATH
11403 do
11404   IFS=$as_save_IFS
11405   test -z "$as_dir" && as_dir=.
11406     for ac_exec_ext in '' $ac_executable_extensions; do
11407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11408     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11410     break 2
11411   fi
11412 done
11413   done
11414 IFS=$as_save_IFS
11415 
11416   ;;
11417 esac
11418 fi
11419 TOUCH=$ac_cv_path_TOUCH
11420 if test -n "$TOUCH"; then
11421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11422 $as_echo "$TOUCH" >&6; }
11423 else
11424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11425 $as_echo "no" >&6; }
11426 fi
11427 
11428 
11429           if test "x$TOUCH" = x; then
11430             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11431           fi
11432         else
11433           # Otherwise we believe it is a complete path. Use it as it is.
11434           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11435 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11436           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11437 $as_echo_n "checking for TOUCH... " >&6; }
11438           if test ! -x "$tool_specified"; then
11439             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11440 $as_echo "not found" >&6; }
11441             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11442           fi
11443           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11444 $as_echo "$tool_specified" >&6; }
11445         fi
11446       fi
11447     fi
11448 
11449   fi
11450 
11451 
11452 
11453   if test "x$TOUCH" = x; then
11454     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11455   fi
11456 
11457 
11458 
11459 
11460 
11461   # Publish this variable in the help.
11462 
11463 
11464   if [ -z "${TR+x}" ]; then
11465     # The variable is not set by user, try to locate tool using the code snippet
11466     for ac_prog in tr
11467 do
11468   # Extract the first word of "$ac_prog", so it can be a program name with args.
11469 set dummy $ac_prog; ac_word=$2
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11471 $as_echo_n "checking for $ac_word... " >&6; }
11472 if ${ac_cv_path_TR+:} false; then :
11473   $as_echo_n "(cached) " >&6
11474 else
11475   case $TR in
11476   [\\/]* | ?:[\\/]*)
11477   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11478   ;;
11479   *)
11480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11481 for as_dir in $PATH
11482 do
11483   IFS=$as_save_IFS
11484   test -z "$as_dir" && as_dir=.
11485     for ac_exec_ext in '' $ac_executable_extensions; do
11486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11487     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11489     break 2
11490   fi
11491 done
11492   done
11493 IFS=$as_save_IFS
11494 
11495   ;;
11496 esac
11497 fi
11498 TR=$ac_cv_path_TR
11499 if test -n "$TR"; then
11500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11501 $as_echo "$TR" >&6; }
11502 else
11503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11504 $as_echo "no" >&6; }
11505 fi
11506 
11507 
11508   test -n "$TR" && break
11509 done
11510 
11511   else
11512     # The variable is set, but is it from the command line or the environment?
11513 
11514     # Try to remove the string !TR! from our list.
11515     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11516     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11517       # If it failed, the variable was not from the command line. Ignore it,
11518       # but warn the user (except for BASH, which is always set by the calling BASH).
11519       if test "xTR" != xBASH; then
11520         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11521 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11522       fi
11523       # Try to locate tool using the code snippet
11524       for ac_prog in tr
11525 do
11526   # Extract the first word of "$ac_prog", so it can be a program name with args.
11527 set dummy $ac_prog; ac_word=$2
11528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11529 $as_echo_n "checking for $ac_word... " >&6; }
11530 if ${ac_cv_path_TR+:} false; then :
11531   $as_echo_n "(cached) " >&6
11532 else
11533   case $TR in
11534   [\\/]* | ?:[\\/]*)
11535   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11536   ;;
11537   *)
11538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11539 for as_dir in $PATH
11540 do
11541   IFS=$as_save_IFS
11542   test -z "$as_dir" && as_dir=.
11543     for ac_exec_ext in '' $ac_executable_extensions; do
11544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11545     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11547     break 2
11548   fi
11549 done
11550   done
11551 IFS=$as_save_IFS
11552 
11553   ;;
11554 esac
11555 fi
11556 TR=$ac_cv_path_TR
11557 if test -n "$TR"; then
11558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11559 $as_echo "$TR" >&6; }
11560 else
11561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11562 $as_echo "no" >&6; }
11563 fi
11564 
11565 
11566   test -n "$TR" && break
11567 done
11568 
11569     else
11570       # If it succeeded, then it was overridden by the user. We will use it
11571       # for the tool.
11572 
11573       # First remove it from the list of overridden variables, so we can test
11574       # for unknown variables in the end.
11575       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11576 
11577       # Check if we try to supply an empty value
11578       if test "x$TR" = x; then
11579         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11580 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11581         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11582 $as_echo_n "checking for TR... " >&6; }
11583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11584 $as_echo "disabled" >&6; }
11585       else
11586         # Check if the provided tool contains a complete path.
11587         tool_specified="$TR"
11588         tool_basename="${tool_specified##*/}"
11589         if test "x$tool_basename" = "x$tool_specified"; then
11590           # A command without a complete path is provided, search $PATH.
11591           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11592 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11593           # Extract the first word of "$tool_basename", so it can be a program name with args.
11594 set dummy $tool_basename; ac_word=$2
11595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11596 $as_echo_n "checking for $ac_word... " >&6; }
11597 if ${ac_cv_path_TR+:} false; then :
11598   $as_echo_n "(cached) " >&6
11599 else
11600   case $TR in
11601   [\\/]* | ?:[\\/]*)
11602   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11603   ;;
11604   *)
11605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11606 for as_dir in $PATH
11607 do
11608   IFS=$as_save_IFS
11609   test -z "$as_dir" && as_dir=.
11610     for ac_exec_ext in '' $ac_executable_extensions; do
11611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11612     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11614     break 2
11615   fi
11616 done
11617   done
11618 IFS=$as_save_IFS
11619 
11620   ;;
11621 esac
11622 fi
11623 TR=$ac_cv_path_TR
11624 if test -n "$TR"; then
11625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11626 $as_echo "$TR" >&6; }
11627 else
11628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11629 $as_echo "no" >&6; }
11630 fi
11631 
11632 
11633           if test "x$TR" = x; then
11634             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11635           fi
11636         else
11637           # Otherwise we believe it is a complete path. Use it as it is.
11638           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11639 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11640           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11641 $as_echo_n "checking for TR... " >&6; }
11642           if test ! -x "$tool_specified"; then
11643             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11644 $as_echo "not found" >&6; }
11645             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11646           fi
11647           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11648 $as_echo "$tool_specified" >&6; }
11649         fi
11650       fi
11651     fi
11652 
11653   fi
11654 
11655 
11656 
11657   if test "x$TR" = x; then
11658     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11659   fi
11660 
11661 
11662 
11663 
11664 
11665   # Publish this variable in the help.
11666 
11667 
11668   if [ -z "${UNAME+x}" ]; then
11669     # The variable is not set by user, try to locate tool using the code snippet
11670     for ac_prog in uname
11671 do
11672   # Extract the first word of "$ac_prog", so it can be a program name with args.
11673 set dummy $ac_prog; ac_word=$2
11674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11675 $as_echo_n "checking for $ac_word... " >&6; }
11676 if ${ac_cv_path_UNAME+:} false; then :
11677   $as_echo_n "(cached) " >&6
11678 else
11679   case $UNAME in
11680   [\\/]* | ?:[\\/]*)
11681   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11682   ;;
11683   *)
11684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11685 for as_dir in $PATH
11686 do
11687   IFS=$as_save_IFS
11688   test -z "$as_dir" && as_dir=.
11689     for ac_exec_ext in '' $ac_executable_extensions; do
11690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11691     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11693     break 2
11694   fi
11695 done
11696   done
11697 IFS=$as_save_IFS
11698 
11699   ;;
11700 esac
11701 fi
11702 UNAME=$ac_cv_path_UNAME
11703 if test -n "$UNAME"; then
11704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11705 $as_echo "$UNAME" >&6; }
11706 else
11707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11708 $as_echo "no" >&6; }
11709 fi
11710 
11711 
11712   test -n "$UNAME" && break
11713 done
11714 
11715   else
11716     # The variable is set, but is it from the command line or the environment?
11717 
11718     # Try to remove the string !UNAME! from our list.
11719     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11720     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11721       # If it failed, the variable was not from the command line. Ignore it,
11722       # but warn the user (except for BASH, which is always set by the calling BASH).
11723       if test "xUNAME" != xBASH; then
11724         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11725 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11726       fi
11727       # Try to locate tool using the code snippet
11728       for ac_prog in uname
11729 do
11730   # Extract the first word of "$ac_prog", so it can be a program name with args.
11731 set dummy $ac_prog; ac_word=$2
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11733 $as_echo_n "checking for $ac_word... " >&6; }
11734 if ${ac_cv_path_UNAME+:} false; then :
11735   $as_echo_n "(cached) " >&6
11736 else
11737   case $UNAME in
11738   [\\/]* | ?:[\\/]*)
11739   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11740   ;;
11741   *)
11742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11743 for as_dir in $PATH
11744 do
11745   IFS=$as_save_IFS
11746   test -z "$as_dir" && as_dir=.
11747     for ac_exec_ext in '' $ac_executable_extensions; do
11748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11749     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11751     break 2
11752   fi
11753 done
11754   done
11755 IFS=$as_save_IFS
11756 
11757   ;;
11758 esac
11759 fi
11760 UNAME=$ac_cv_path_UNAME
11761 if test -n "$UNAME"; then
11762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11763 $as_echo "$UNAME" >&6; }
11764 else
11765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11766 $as_echo "no" >&6; }
11767 fi
11768 
11769 
11770   test -n "$UNAME" && break
11771 done
11772 
11773     else
11774       # If it succeeded, then it was overridden by the user. We will use it
11775       # for the tool.
11776 
11777       # First remove it from the list of overridden variables, so we can test
11778       # for unknown variables in the end.
11779       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11780 
11781       # Check if we try to supply an empty value
11782       if test "x$UNAME" = x; then
11783         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11784 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11785         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11786 $as_echo_n "checking for UNAME... " >&6; }
11787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11788 $as_echo "disabled" >&6; }
11789       else
11790         # Check if the provided tool contains a complete path.
11791         tool_specified="$UNAME"
11792         tool_basename="${tool_specified##*/}"
11793         if test "x$tool_basename" = "x$tool_specified"; then
11794           # A command without a complete path is provided, search $PATH.
11795           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11796 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11797           # Extract the first word of "$tool_basename", so it can be a program name with args.
11798 set dummy $tool_basename; ac_word=$2
11799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11800 $as_echo_n "checking for $ac_word... " >&6; }
11801 if ${ac_cv_path_UNAME+:} false; then :
11802   $as_echo_n "(cached) " >&6
11803 else
11804   case $UNAME in
11805   [\\/]* | ?:[\\/]*)
11806   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11807   ;;
11808   *)
11809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11810 for as_dir in $PATH
11811 do
11812   IFS=$as_save_IFS
11813   test -z "$as_dir" && as_dir=.
11814     for ac_exec_ext in '' $ac_executable_extensions; do
11815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11816     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11818     break 2
11819   fi
11820 done
11821   done
11822 IFS=$as_save_IFS
11823 
11824   ;;
11825 esac
11826 fi
11827 UNAME=$ac_cv_path_UNAME
11828 if test -n "$UNAME"; then
11829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11830 $as_echo "$UNAME" >&6; }
11831 else
11832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11833 $as_echo "no" >&6; }
11834 fi
11835 
11836 
11837           if test "x$UNAME" = x; then
11838             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11839           fi
11840         else
11841           # Otherwise we believe it is a complete path. Use it as it is.
11842           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11843 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11844           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11845 $as_echo_n "checking for UNAME... " >&6; }
11846           if test ! -x "$tool_specified"; then
11847             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11848 $as_echo "not found" >&6; }
11849             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11850           fi
11851           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11852 $as_echo "$tool_specified" >&6; }
11853         fi
11854       fi
11855     fi
11856 
11857   fi
11858 
11859 
11860 
11861   if test "x$UNAME" = x; then
11862     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11863   fi
11864 
11865 
11866 
11867 
11868 
11869   # Publish this variable in the help.
11870 
11871 
11872   if [ -z "${UNIQ+x}" ]; then
11873     # The variable is not set by user, try to locate tool using the code snippet
11874     for ac_prog in uniq
11875 do
11876   # Extract the first word of "$ac_prog", so it can be a program name with args.
11877 set dummy $ac_prog; ac_word=$2
11878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11879 $as_echo_n "checking for $ac_word... " >&6; }
11880 if ${ac_cv_path_UNIQ+:} false; then :
11881   $as_echo_n "(cached) " >&6
11882 else
11883   case $UNIQ in
11884   [\\/]* | ?:[\\/]*)
11885   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11886   ;;
11887   *)
11888   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11889 for as_dir in $PATH
11890 do
11891   IFS=$as_save_IFS
11892   test -z "$as_dir" && as_dir=.
11893     for ac_exec_ext in '' $ac_executable_extensions; do
11894   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11895     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11897     break 2
11898   fi
11899 done
11900   done
11901 IFS=$as_save_IFS
11902 
11903   ;;
11904 esac
11905 fi
11906 UNIQ=$ac_cv_path_UNIQ
11907 if test -n "$UNIQ"; then
11908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11909 $as_echo "$UNIQ" >&6; }
11910 else
11911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11912 $as_echo "no" >&6; }
11913 fi
11914 
11915 
11916   test -n "$UNIQ" && break
11917 done
11918 
11919   else
11920     # The variable is set, but is it from the command line or the environment?
11921 
11922     # Try to remove the string !UNIQ! from our list.
11923     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11924     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11925       # If it failed, the variable was not from the command line. Ignore it,
11926       # but warn the user (except for BASH, which is always set by the calling BASH).
11927       if test "xUNIQ" != xBASH; then
11928         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11929 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11930       fi
11931       # Try to locate tool using the code snippet
11932       for ac_prog in uniq
11933 do
11934   # Extract the first word of "$ac_prog", so it can be a program name with args.
11935 set dummy $ac_prog; ac_word=$2
11936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11937 $as_echo_n "checking for $ac_word... " >&6; }
11938 if ${ac_cv_path_UNIQ+:} false; then :
11939   $as_echo_n "(cached) " >&6
11940 else
11941   case $UNIQ in
11942   [\\/]* | ?:[\\/]*)
11943   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11944   ;;
11945   *)
11946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11947 for as_dir in $PATH
11948 do
11949   IFS=$as_save_IFS
11950   test -z "$as_dir" && as_dir=.
11951     for ac_exec_ext in '' $ac_executable_extensions; do
11952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11953     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11955     break 2
11956   fi
11957 done
11958   done
11959 IFS=$as_save_IFS
11960 
11961   ;;
11962 esac
11963 fi
11964 UNIQ=$ac_cv_path_UNIQ
11965 if test -n "$UNIQ"; then
11966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11967 $as_echo "$UNIQ" >&6; }
11968 else
11969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11970 $as_echo "no" >&6; }
11971 fi
11972 
11973 
11974   test -n "$UNIQ" && break
11975 done
11976 
11977     else
11978       # If it succeeded, then it was overridden by the user. We will use it
11979       # for the tool.
11980 
11981       # First remove it from the list of overridden variables, so we can test
11982       # for unknown variables in the end.
11983       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11984 
11985       # Check if we try to supply an empty value
11986       if test "x$UNIQ" = x; then
11987         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11988 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11989         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11990 $as_echo_n "checking for UNIQ... " >&6; }
11991         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11992 $as_echo "disabled" >&6; }
11993       else
11994         # Check if the provided tool contains a complete path.
11995         tool_specified="$UNIQ"
11996         tool_basename="${tool_specified##*/}"
11997         if test "x$tool_basename" = "x$tool_specified"; then
11998           # A command without a complete path is provided, search $PATH.
11999           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12000 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12001           # Extract the first word of "$tool_basename", so it can be a program name with args.
12002 set dummy $tool_basename; ac_word=$2
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12004 $as_echo_n "checking for $ac_word... " >&6; }
12005 if ${ac_cv_path_UNIQ+:} false; then :
12006   $as_echo_n "(cached) " >&6
12007 else
12008   case $UNIQ in
12009   [\\/]* | ?:[\\/]*)
12010   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12011   ;;
12012   *)
12013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12014 for as_dir in $PATH
12015 do
12016   IFS=$as_save_IFS
12017   test -z "$as_dir" && as_dir=.
12018     for ac_exec_ext in '' $ac_executable_extensions; do
12019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12020     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12022     break 2
12023   fi
12024 done
12025   done
12026 IFS=$as_save_IFS
12027 
12028   ;;
12029 esac
12030 fi
12031 UNIQ=$ac_cv_path_UNIQ
12032 if test -n "$UNIQ"; then
12033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12034 $as_echo "$UNIQ" >&6; }
12035 else
12036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12037 $as_echo "no" >&6; }
12038 fi
12039 
12040 
12041           if test "x$UNIQ" = x; then
12042             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12043           fi
12044         else
12045           # Otherwise we believe it is a complete path. Use it as it is.
12046           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12047 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12048           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12049 $as_echo_n "checking for UNIQ... " >&6; }
12050           if test ! -x "$tool_specified"; then
12051             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12052 $as_echo "not found" >&6; }
12053             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12054           fi
12055           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12056 $as_echo "$tool_specified" >&6; }
12057         fi
12058       fi
12059     fi
12060 
12061   fi
12062 
12063 
12064 
12065   if test "x$UNIQ" = x; then
12066     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12067   fi
12068 
12069 
12070 
12071 
12072 
12073   # Publish this variable in the help.
12074 
12075 
12076   if [ -z "${WC+x}" ]; then
12077     # The variable is not set by user, try to locate tool using the code snippet
12078     for ac_prog in wc
12079 do
12080   # Extract the first word of "$ac_prog", so it can be a program name with args.
12081 set dummy $ac_prog; ac_word=$2
12082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12083 $as_echo_n "checking for $ac_word... " >&6; }
12084 if ${ac_cv_path_WC+:} false; then :
12085   $as_echo_n "(cached) " >&6
12086 else
12087   case $WC in
12088   [\\/]* | ?:[\\/]*)
12089   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12090   ;;
12091   *)
12092   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12093 for as_dir in $PATH
12094 do
12095   IFS=$as_save_IFS
12096   test -z "$as_dir" && as_dir=.
12097     for ac_exec_ext in '' $ac_executable_extensions; do
12098   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12099     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12100     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12101     break 2
12102   fi
12103 done
12104   done
12105 IFS=$as_save_IFS
12106 
12107   ;;
12108 esac
12109 fi
12110 WC=$ac_cv_path_WC
12111 if test -n "$WC"; then
12112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12113 $as_echo "$WC" >&6; }
12114 else
12115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12116 $as_echo "no" >&6; }
12117 fi
12118 
12119 
12120   test -n "$WC" && break
12121 done
12122 
12123   else
12124     # The variable is set, but is it from the command line or the environment?
12125 
12126     # Try to remove the string !WC! from our list.
12127     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12128     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12129       # If it failed, the variable was not from the command line. Ignore it,
12130       # but warn the user (except for BASH, which is always set by the calling BASH).
12131       if test "xWC" != xBASH; then
12132         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12133 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12134       fi
12135       # Try to locate tool using the code snippet
12136       for ac_prog in wc
12137 do
12138   # Extract the first word of "$ac_prog", so it can be a program name with args.
12139 set dummy $ac_prog; ac_word=$2
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12141 $as_echo_n "checking for $ac_word... " >&6; }
12142 if ${ac_cv_path_WC+:} false; then :
12143   $as_echo_n "(cached) " >&6
12144 else
12145   case $WC in
12146   [\\/]* | ?:[\\/]*)
12147   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12148   ;;
12149   *)
12150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12151 for as_dir in $PATH
12152 do
12153   IFS=$as_save_IFS
12154   test -z "$as_dir" && as_dir=.
12155     for ac_exec_ext in '' $ac_executable_extensions; do
12156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12157     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12159     break 2
12160   fi
12161 done
12162   done
12163 IFS=$as_save_IFS
12164 
12165   ;;
12166 esac
12167 fi
12168 WC=$ac_cv_path_WC
12169 if test -n "$WC"; then
12170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12171 $as_echo "$WC" >&6; }
12172 else
12173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12174 $as_echo "no" >&6; }
12175 fi
12176 
12177 
12178   test -n "$WC" && break
12179 done
12180 
12181     else
12182       # If it succeeded, then it was overridden by the user. We will use it
12183       # for the tool.
12184 
12185       # First remove it from the list of overridden variables, so we can test
12186       # for unknown variables in the end.
12187       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12188 
12189       # Check if we try to supply an empty value
12190       if test "x$WC" = x; then
12191         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12192 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12193         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12194 $as_echo_n "checking for WC... " >&6; }
12195         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12196 $as_echo "disabled" >&6; }
12197       else
12198         # Check if the provided tool contains a complete path.
12199         tool_specified="$WC"
12200         tool_basename="${tool_specified##*/}"
12201         if test "x$tool_basename" = "x$tool_specified"; then
12202           # A command without a complete path is provided, search $PATH.
12203           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12204 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12205           # Extract the first word of "$tool_basename", so it can be a program name with args.
12206 set dummy $tool_basename; ac_word=$2
12207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12208 $as_echo_n "checking for $ac_word... " >&6; }
12209 if ${ac_cv_path_WC+:} false; then :
12210   $as_echo_n "(cached) " >&6
12211 else
12212   case $WC in
12213   [\\/]* | ?:[\\/]*)
12214   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12215   ;;
12216   *)
12217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12218 for as_dir in $PATH
12219 do
12220   IFS=$as_save_IFS
12221   test -z "$as_dir" && as_dir=.
12222     for ac_exec_ext in '' $ac_executable_extensions; do
12223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12224     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12226     break 2
12227   fi
12228 done
12229   done
12230 IFS=$as_save_IFS
12231 
12232   ;;
12233 esac
12234 fi
12235 WC=$ac_cv_path_WC
12236 if test -n "$WC"; then
12237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12238 $as_echo "$WC" >&6; }
12239 else
12240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12241 $as_echo "no" >&6; }
12242 fi
12243 
12244 
12245           if test "x$WC" = x; then
12246             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12247           fi
12248         else
12249           # Otherwise we believe it is a complete path. Use it as it is.
12250           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12251 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12252           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12253 $as_echo_n "checking for WC... " >&6; }
12254           if test ! -x "$tool_specified"; then
12255             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12256 $as_echo "not found" >&6; }
12257             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12258           fi
12259           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12260 $as_echo "$tool_specified" >&6; }
12261         fi
12262       fi
12263     fi
12264 
12265   fi
12266 
12267 
12268 
12269   if test "x$WC" = x; then
12270     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12271   fi
12272 
12273 
12274 
12275 
12276 
12277   # Publish this variable in the help.
12278 
12279 
12280   if [ -z "${WHICH+x}" ]; then
12281     # The variable is not set by user, try to locate tool using the code snippet
12282     for ac_prog in which
12283 do
12284   # Extract the first word of "$ac_prog", so it can be a program name with args.
12285 set dummy $ac_prog; ac_word=$2
12286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12287 $as_echo_n "checking for $ac_word... " >&6; }
12288 if ${ac_cv_path_WHICH+:} false; then :
12289   $as_echo_n "(cached) " >&6
12290 else
12291   case $WHICH in
12292   [\\/]* | ?:[\\/]*)
12293   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12294   ;;
12295   *)
12296   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12297 for as_dir in $PATH
12298 do
12299   IFS=$as_save_IFS
12300   test -z "$as_dir" && as_dir=.
12301     for ac_exec_ext in '' $ac_executable_extensions; do
12302   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12303     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12304     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12305     break 2
12306   fi
12307 done
12308   done
12309 IFS=$as_save_IFS
12310 
12311   ;;
12312 esac
12313 fi
12314 WHICH=$ac_cv_path_WHICH
12315 if test -n "$WHICH"; then
12316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12317 $as_echo "$WHICH" >&6; }
12318 else
12319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12320 $as_echo "no" >&6; }
12321 fi
12322 
12323 
12324   test -n "$WHICH" && break
12325 done
12326 
12327   else
12328     # The variable is set, but is it from the command line or the environment?
12329 
12330     # Try to remove the string !WHICH! from our list.
12331     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12332     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12333       # If it failed, the variable was not from the command line. Ignore it,
12334       # but warn the user (except for BASH, which is always set by the calling BASH).
12335       if test "xWHICH" != xBASH; then
12336         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12337 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12338       fi
12339       # Try to locate tool using the code snippet
12340       for ac_prog in which
12341 do
12342   # Extract the first word of "$ac_prog", so it can be a program name with args.
12343 set dummy $ac_prog; ac_word=$2
12344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12345 $as_echo_n "checking for $ac_word... " >&6; }
12346 if ${ac_cv_path_WHICH+:} false; then :
12347   $as_echo_n "(cached) " >&6
12348 else
12349   case $WHICH in
12350   [\\/]* | ?:[\\/]*)
12351   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12352   ;;
12353   *)
12354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12355 for as_dir in $PATH
12356 do
12357   IFS=$as_save_IFS
12358   test -z "$as_dir" && as_dir=.
12359     for ac_exec_ext in '' $ac_executable_extensions; do
12360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12361     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12363     break 2
12364   fi
12365 done
12366   done
12367 IFS=$as_save_IFS
12368 
12369   ;;
12370 esac
12371 fi
12372 WHICH=$ac_cv_path_WHICH
12373 if test -n "$WHICH"; then
12374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12375 $as_echo "$WHICH" >&6; }
12376 else
12377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12378 $as_echo "no" >&6; }
12379 fi
12380 
12381 
12382   test -n "$WHICH" && break
12383 done
12384 
12385     else
12386       # If it succeeded, then it was overridden by the user. We will use it
12387       # for the tool.
12388 
12389       # First remove it from the list of overridden variables, so we can test
12390       # for unknown variables in the end.
12391       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12392 
12393       # Check if we try to supply an empty value
12394       if test "x$WHICH" = x; then
12395         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12396 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12397         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12398 $as_echo_n "checking for WHICH... " >&6; }
12399         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12400 $as_echo "disabled" >&6; }
12401       else
12402         # Check if the provided tool contains a complete path.
12403         tool_specified="$WHICH"
12404         tool_basename="${tool_specified##*/}"
12405         if test "x$tool_basename" = "x$tool_specified"; then
12406           # A command without a complete path is provided, search $PATH.
12407           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12408 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12409           # Extract the first word of "$tool_basename", so it can be a program name with args.
12410 set dummy $tool_basename; ac_word=$2
12411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12412 $as_echo_n "checking for $ac_word... " >&6; }
12413 if ${ac_cv_path_WHICH+:} false; then :
12414   $as_echo_n "(cached) " >&6
12415 else
12416   case $WHICH in
12417   [\\/]* | ?:[\\/]*)
12418   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12419   ;;
12420   *)
12421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12422 for as_dir in $PATH
12423 do
12424   IFS=$as_save_IFS
12425   test -z "$as_dir" && as_dir=.
12426     for ac_exec_ext in '' $ac_executable_extensions; do
12427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12428     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12430     break 2
12431   fi
12432 done
12433   done
12434 IFS=$as_save_IFS
12435 
12436   ;;
12437 esac
12438 fi
12439 WHICH=$ac_cv_path_WHICH
12440 if test -n "$WHICH"; then
12441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12442 $as_echo "$WHICH" >&6; }
12443 else
12444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12445 $as_echo "no" >&6; }
12446 fi
12447 
12448 
12449           if test "x$WHICH" = x; then
12450             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12451           fi
12452         else
12453           # Otherwise we believe it is a complete path. Use it as it is.
12454           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12455 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12456           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12457 $as_echo_n "checking for WHICH... " >&6; }
12458           if test ! -x "$tool_specified"; then
12459             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12460 $as_echo "not found" >&6; }
12461             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12462           fi
12463           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12464 $as_echo "$tool_specified" >&6; }
12465         fi
12466       fi
12467     fi
12468 
12469   fi
12470 
12471 
12472 
12473   if test "x$WHICH" = x; then
12474     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12475   fi
12476 
12477 
12478 
12479 
12480 
12481   # Publish this variable in the help.
12482 
12483 
12484   if [ -z "${XARGS+x}" ]; then
12485     # The variable is not set by user, try to locate tool using the code snippet
12486     for ac_prog in xargs
12487 do
12488   # Extract the first word of "$ac_prog", so it can be a program name with args.
12489 set dummy $ac_prog; ac_word=$2
12490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12491 $as_echo_n "checking for $ac_word... " >&6; }
12492 if ${ac_cv_path_XARGS+:} false; then :
12493   $as_echo_n "(cached) " >&6
12494 else
12495   case $XARGS in
12496   [\\/]* | ?:[\\/]*)
12497   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12498   ;;
12499   *)
12500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12501 for as_dir in $PATH
12502 do
12503   IFS=$as_save_IFS
12504   test -z "$as_dir" && as_dir=.
12505     for ac_exec_ext in '' $ac_executable_extensions; do
12506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12507     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12509     break 2
12510   fi
12511 done
12512   done
12513 IFS=$as_save_IFS
12514 
12515   ;;
12516 esac
12517 fi
12518 XARGS=$ac_cv_path_XARGS
12519 if test -n "$XARGS"; then
12520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12521 $as_echo "$XARGS" >&6; }
12522 else
12523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12524 $as_echo "no" >&6; }
12525 fi
12526 
12527 
12528   test -n "$XARGS" && break
12529 done
12530 
12531   else
12532     # The variable is set, but is it from the command line or the environment?
12533 
12534     # Try to remove the string !XARGS! from our list.
12535     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12536     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12537       # If it failed, the variable was not from the command line. Ignore it,
12538       # but warn the user (except for BASH, which is always set by the calling BASH).
12539       if test "xXARGS" != xBASH; then
12540         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12541 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12542       fi
12543       # Try to locate tool using the code snippet
12544       for ac_prog in xargs
12545 do
12546   # Extract the first word of "$ac_prog", so it can be a program name with args.
12547 set dummy $ac_prog; ac_word=$2
12548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12549 $as_echo_n "checking for $ac_word... " >&6; }
12550 if ${ac_cv_path_XARGS+:} false; then :
12551   $as_echo_n "(cached) " >&6
12552 else
12553   case $XARGS in
12554   [\\/]* | ?:[\\/]*)
12555   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12556   ;;
12557   *)
12558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12559 for as_dir in $PATH
12560 do
12561   IFS=$as_save_IFS
12562   test -z "$as_dir" && as_dir=.
12563     for ac_exec_ext in '' $ac_executable_extensions; do
12564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12565     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12567     break 2
12568   fi
12569 done
12570   done
12571 IFS=$as_save_IFS
12572 
12573   ;;
12574 esac
12575 fi
12576 XARGS=$ac_cv_path_XARGS
12577 if test -n "$XARGS"; then
12578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12579 $as_echo "$XARGS" >&6; }
12580 else
12581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12582 $as_echo "no" >&6; }
12583 fi
12584 
12585 
12586   test -n "$XARGS" && break
12587 done
12588 
12589     else
12590       # If it succeeded, then it was overridden by the user. We will use it
12591       # for the tool.
12592 
12593       # First remove it from the list of overridden variables, so we can test
12594       # for unknown variables in the end.
12595       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12596 
12597       # Check if we try to supply an empty value
12598       if test "x$XARGS" = x; then
12599         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12600 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12601         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12602 $as_echo_n "checking for XARGS... " >&6; }
12603         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12604 $as_echo "disabled" >&6; }
12605       else
12606         # Check if the provided tool contains a complete path.
12607         tool_specified="$XARGS"
12608         tool_basename="${tool_specified##*/}"
12609         if test "x$tool_basename" = "x$tool_specified"; then
12610           # A command without a complete path is provided, search $PATH.
12611           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12612 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12613           # Extract the first word of "$tool_basename", so it can be a program name with args.
12614 set dummy $tool_basename; ac_word=$2
12615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12616 $as_echo_n "checking for $ac_word... " >&6; }
12617 if ${ac_cv_path_XARGS+:} false; then :
12618   $as_echo_n "(cached) " >&6
12619 else
12620   case $XARGS in
12621   [\\/]* | ?:[\\/]*)
12622   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12623   ;;
12624   *)
12625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12626 for as_dir in $PATH
12627 do
12628   IFS=$as_save_IFS
12629   test -z "$as_dir" && as_dir=.
12630     for ac_exec_ext in '' $ac_executable_extensions; do
12631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12632     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12634     break 2
12635   fi
12636 done
12637   done
12638 IFS=$as_save_IFS
12639 
12640   ;;
12641 esac
12642 fi
12643 XARGS=$ac_cv_path_XARGS
12644 if test -n "$XARGS"; then
12645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12646 $as_echo "$XARGS" >&6; }
12647 else
12648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12649 $as_echo "no" >&6; }
12650 fi
12651 
12652 
12653           if test "x$XARGS" = x; then
12654             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12655           fi
12656         else
12657           # Otherwise we believe it is a complete path. Use it as it is.
12658           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12659 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12660           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12661 $as_echo_n "checking for XARGS... " >&6; }
12662           if test ! -x "$tool_specified"; then
12663             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12664 $as_echo "not found" >&6; }
12665             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12666           fi
12667           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12668 $as_echo "$tool_specified" >&6; }
12669         fi
12670       fi
12671     fi
12672 
12673   fi
12674 
12675 
12676 
12677   if test "x$XARGS" = x; then
12678     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12679   fi
12680 
12681 
12682 
12683   # Then required tools that require some special treatment.
12684 
12685 
12686   # Publish this variable in the help.
12687 
12688 
12689   if [ -z "${AWK+x}" ]; then
12690     # The variable is not set by user, try to locate tool using the code snippet
12691     for ac_prog in gawk mawk nawk awk
12692 do
12693   # Extract the first word of "$ac_prog", so it can be a program name with args.
12694 set dummy $ac_prog; ac_word=$2
12695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12696 $as_echo_n "checking for $ac_word... " >&6; }
12697 if ${ac_cv_prog_AWK+:} false; then :
12698   $as_echo_n "(cached) " >&6
12699 else
12700   if test -n "$AWK"; then
12701   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12702 else
12703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12704 for as_dir in $PATH
12705 do
12706   IFS=$as_save_IFS
12707   test -z "$as_dir" && as_dir=.
12708     for ac_exec_ext in '' $ac_executable_extensions; do
12709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12710     ac_cv_prog_AWK="$ac_prog"
12711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12712     break 2
12713   fi
12714 done
12715   done
12716 IFS=$as_save_IFS
12717 
12718 fi
12719 fi
12720 AWK=$ac_cv_prog_AWK
12721 if test -n "$AWK"; then
12722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12723 $as_echo "$AWK" >&6; }
12724 else
12725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12726 $as_echo "no" >&6; }
12727 fi
12728 
12729 
12730   test -n "$AWK" && break
12731 done
12732 
12733   else
12734     # The variable is set, but is it from the command line or the environment?
12735 
12736     # Try to remove the string !AWK! from our list.
12737     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12738     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12739       # If it failed, the variable was not from the command line. Ignore it,
12740       # but warn the user (except for BASH, which is always set by the calling BASH).
12741       if test "xAWK" != xBASH; then
12742         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12743 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12744       fi
12745       # Try to locate tool using the code snippet
12746       for ac_prog in gawk mawk nawk awk
12747 do
12748   # Extract the first word of "$ac_prog", so it can be a program name with args.
12749 set dummy $ac_prog; ac_word=$2
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12751 $as_echo_n "checking for $ac_word... " >&6; }
12752 if ${ac_cv_prog_AWK+:} false; then :
12753   $as_echo_n "(cached) " >&6
12754 else
12755   if test -n "$AWK"; then
12756   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12757 else
12758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12759 for as_dir in $PATH
12760 do
12761   IFS=$as_save_IFS
12762   test -z "$as_dir" && as_dir=.
12763     for ac_exec_ext in '' $ac_executable_extensions; do
12764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12765     ac_cv_prog_AWK="$ac_prog"
12766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12767     break 2
12768   fi
12769 done
12770   done
12771 IFS=$as_save_IFS
12772 
12773 fi
12774 fi
12775 AWK=$ac_cv_prog_AWK
12776 if test -n "$AWK"; then
12777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12778 $as_echo "$AWK" >&6; }
12779 else
12780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12781 $as_echo "no" >&6; }
12782 fi
12783 
12784 
12785   test -n "$AWK" && break
12786 done
12787 
12788     else
12789       # If it succeeded, then it was overridden by the user. We will use it
12790       # for the tool.
12791 
12792       # First remove it from the list of overridden variables, so we can test
12793       # for unknown variables in the end.
12794       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12795 
12796       # Check if we try to supply an empty value
12797       if test "x$AWK" = x; then
12798         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12799 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12800         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12801 $as_echo_n "checking for AWK... " >&6; }
12802         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12803 $as_echo "disabled" >&6; }
12804       else
12805         # Check if the provided tool contains a complete path.
12806         tool_specified="$AWK"
12807         tool_basename="${tool_specified##*/}"
12808         if test "x$tool_basename" = "x$tool_specified"; then
12809           # A command without a complete path is provided, search $PATH.
12810           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12811 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12812           # Extract the first word of "$tool_basename", so it can be a program name with args.
12813 set dummy $tool_basename; ac_word=$2
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12815 $as_echo_n "checking for $ac_word... " >&6; }
12816 if ${ac_cv_path_AWK+:} false; then :
12817   $as_echo_n "(cached) " >&6
12818 else
12819   case $AWK in
12820   [\\/]* | ?:[\\/]*)
12821   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12822   ;;
12823   *)
12824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12825 for as_dir in $PATH
12826 do
12827   IFS=$as_save_IFS
12828   test -z "$as_dir" && as_dir=.
12829     for ac_exec_ext in '' $ac_executable_extensions; do
12830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12831     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12833     break 2
12834   fi
12835 done
12836   done
12837 IFS=$as_save_IFS
12838 
12839   ;;
12840 esac
12841 fi
12842 AWK=$ac_cv_path_AWK
12843 if test -n "$AWK"; then
12844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12845 $as_echo "$AWK" >&6; }
12846 else
12847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12848 $as_echo "no" >&6; }
12849 fi
12850 
12851 
12852           if test "x$AWK" = x; then
12853             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12854           fi
12855         else
12856           # Otherwise we believe it is a complete path. Use it as it is.
12857           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12858 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12859           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12860 $as_echo_n "checking for AWK... " >&6; }
12861           if test ! -x "$tool_specified"; then
12862             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12863 $as_echo "not found" >&6; }
12864             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12865           fi
12866           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12867 $as_echo "$tool_specified" >&6; }
12868         fi
12869       fi
12870     fi
12871 
12872   fi
12873 
12874 
12875   if test "x$AWK" = x; then
12876     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12877   fi
12878 
12879 
12880 
12881 
12882   # Publish this variable in the help.
12883 
12884 
12885   if [ -z "${GREP+x}" ]; then
12886     # The variable is not set by user, try to locate tool using the code snippet
12887     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12888 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12889 if ${ac_cv_path_GREP+:} false; then :
12890   $as_echo_n "(cached) " >&6
12891 else
12892   if test -z "$GREP"; then
12893   ac_path_GREP_found=false
12894   # Loop through the user's path and test for each of PROGNAME-LIST
12895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12896 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12897 do
12898   IFS=$as_save_IFS
12899   test -z "$as_dir" && as_dir=.
12900     for ac_prog in grep ggrep; do
12901     for ac_exec_ext in '' $ac_executable_extensions; do
12902       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12903       as_fn_executable_p "$ac_path_GREP" || continue
12904 # Check for GNU ac_path_GREP and select it if it is found.
12905   # Check for GNU $ac_path_GREP
12906 case `"$ac_path_GREP" --version 2>&1` in
12907 *GNU*)
12908   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12909 *)
12910   ac_count=0
12911   $as_echo_n 0123456789 >"conftest.in"
12912   while :
12913   do
12914     cat "conftest.in" "conftest.in" >"conftest.tmp"
12915     mv "conftest.tmp" "conftest.in"
12916     cp "conftest.in" "conftest.nl"
12917     $as_echo 'GREP' >> "conftest.nl"
12918     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12919     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12920     as_fn_arith $ac_count + 1 && ac_count=$as_val
12921     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12922       # Best one so far, save it but keep looking for a better one
12923       ac_cv_path_GREP="$ac_path_GREP"
12924       ac_path_GREP_max=$ac_count
12925     fi
12926     # 10*(2^10) chars as input seems more than enough
12927     test $ac_count -gt 10 && break
12928   done
12929   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12930 esac
12931 
12932       $ac_path_GREP_found && break 3
12933     done
12934   done
12935   done
12936 IFS=$as_save_IFS
12937   if test -z "$ac_cv_path_GREP"; then
12938     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12939   fi
12940 else
12941   ac_cv_path_GREP=$GREP
12942 fi
12943 
12944 fi
12945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12946 $as_echo "$ac_cv_path_GREP" >&6; }
12947  GREP="$ac_cv_path_GREP"
12948 
12949 
12950   else
12951     # The variable is set, but is it from the command line or the environment?
12952 
12953     # Try to remove the string !GREP! from our list.
12954     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12955     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12956       # If it failed, the variable was not from the command line. Ignore it,
12957       # but warn the user (except for BASH, which is always set by the calling BASH).
12958       if test "xGREP" != xBASH; then
12959         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12960 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12961       fi
12962       # Try to locate tool using the code snippet
12963       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12964 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12965 if ${ac_cv_path_GREP+:} false; then :
12966   $as_echo_n "(cached) " >&6
12967 else
12968   if test -z "$GREP"; then
12969   ac_path_GREP_found=false
12970   # Loop through the user's path and test for each of PROGNAME-LIST
12971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12972 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12973 do
12974   IFS=$as_save_IFS
12975   test -z "$as_dir" && as_dir=.
12976     for ac_prog in grep ggrep; do
12977     for ac_exec_ext in '' $ac_executable_extensions; do
12978       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12979       as_fn_executable_p "$ac_path_GREP" || continue
12980 # Check for GNU ac_path_GREP and select it if it is found.
12981   # Check for GNU $ac_path_GREP
12982 case `"$ac_path_GREP" --version 2>&1` in
12983 *GNU*)
12984   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12985 *)
12986   ac_count=0
12987   $as_echo_n 0123456789 >"conftest.in"
12988   while :
12989   do
12990     cat "conftest.in" "conftest.in" >"conftest.tmp"
12991     mv "conftest.tmp" "conftest.in"
12992     cp "conftest.in" "conftest.nl"
12993     $as_echo 'GREP' >> "conftest.nl"
12994     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12995     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12996     as_fn_arith $ac_count + 1 && ac_count=$as_val
12997     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12998       # Best one so far, save it but keep looking for a better one
12999       ac_cv_path_GREP="$ac_path_GREP"
13000       ac_path_GREP_max=$ac_count
13001     fi
13002     # 10*(2^10) chars as input seems more than enough
13003     test $ac_count -gt 10 && break
13004   done
13005   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13006 esac
13007 
13008       $ac_path_GREP_found && break 3
13009     done
13010   done
13011   done
13012 IFS=$as_save_IFS
13013   if test -z "$ac_cv_path_GREP"; then
13014     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13015   fi
13016 else
13017   ac_cv_path_GREP=$GREP
13018 fi
13019 
13020 fi
13021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13022 $as_echo "$ac_cv_path_GREP" >&6; }
13023  GREP="$ac_cv_path_GREP"
13024 
13025 
13026     else
13027       # If it succeeded, then it was overridden by the user. We will use it
13028       # for the tool.
13029 
13030       # First remove it from the list of overridden variables, so we can test
13031       # for unknown variables in the end.
13032       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13033 
13034       # Check if we try to supply an empty value
13035       if test "x$GREP" = x; then
13036         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13037 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13038         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13039 $as_echo_n "checking for GREP... " >&6; }
13040         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13041 $as_echo "disabled" >&6; }
13042       else
13043         # Check if the provided tool contains a complete path.
13044         tool_specified="$GREP"
13045         tool_basename="${tool_specified##*/}"
13046         if test "x$tool_basename" = "x$tool_specified"; then
13047           # A command without a complete path is provided, search $PATH.
13048           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13049 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13050           # Extract the first word of "$tool_basename", so it can be a program name with args.
13051 set dummy $tool_basename; ac_word=$2
13052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13053 $as_echo_n "checking for $ac_word... " >&6; }
13054 if ${ac_cv_path_GREP+:} false; then :
13055   $as_echo_n "(cached) " >&6
13056 else
13057   case $GREP in
13058   [\\/]* | ?:[\\/]*)
13059   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13060   ;;
13061   *)
13062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13063 for as_dir in $PATH
13064 do
13065   IFS=$as_save_IFS
13066   test -z "$as_dir" && as_dir=.
13067     for ac_exec_ext in '' $ac_executable_extensions; do
13068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13069     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13071     break 2
13072   fi
13073 done
13074   done
13075 IFS=$as_save_IFS
13076 
13077   ;;
13078 esac
13079 fi
13080 GREP=$ac_cv_path_GREP
13081 if test -n "$GREP"; then
13082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13083 $as_echo "$GREP" >&6; }
13084 else
13085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13086 $as_echo "no" >&6; }
13087 fi
13088 
13089 
13090           if test "x$GREP" = x; then
13091             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13092           fi
13093         else
13094           # Otherwise we believe it is a complete path. Use it as it is.
13095           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13096 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13097           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13098 $as_echo_n "checking for GREP... " >&6; }
13099           if test ! -x "$tool_specified"; then
13100             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13101 $as_echo "not found" >&6; }
13102             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13103           fi
13104           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13105 $as_echo "$tool_specified" >&6; }
13106         fi
13107       fi
13108     fi
13109 
13110   fi
13111 
13112 
13113   if test "x$GREP" = x; then
13114     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13115   fi
13116 
13117 
13118 
13119 
13120   # Publish this variable in the help.
13121 
13122 
13123   if [ -z "${EGREP+x}" ]; then
13124     # The variable is not set by user, try to locate tool using the code snippet
13125     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13126 $as_echo_n "checking for egrep... " >&6; }
13127 if ${ac_cv_path_EGREP+:} false; then :
13128   $as_echo_n "(cached) " >&6
13129 else
13130   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13131    then ac_cv_path_EGREP="$GREP -E"
13132    else
13133      if test -z "$EGREP"; then
13134   ac_path_EGREP_found=false
13135   # Loop through the user's path and test for each of PROGNAME-LIST
13136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13137 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13138 do
13139   IFS=$as_save_IFS
13140   test -z "$as_dir" && as_dir=.
13141     for ac_prog in egrep; do
13142     for ac_exec_ext in '' $ac_executable_extensions; do
13143       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13144       as_fn_executable_p "$ac_path_EGREP" || continue
13145 # Check for GNU ac_path_EGREP and select it if it is found.
13146   # Check for GNU $ac_path_EGREP
13147 case `"$ac_path_EGREP" --version 2>&1` in
13148 *GNU*)
13149   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13150 *)
13151   ac_count=0
13152   $as_echo_n 0123456789 >"conftest.in"
13153   while :
13154   do
13155     cat "conftest.in" "conftest.in" >"conftest.tmp"
13156     mv "conftest.tmp" "conftest.in"
13157     cp "conftest.in" "conftest.nl"
13158     $as_echo 'EGREP' >> "conftest.nl"
13159     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13160     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13161     as_fn_arith $ac_count + 1 && ac_count=$as_val
13162     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13163       # Best one so far, save it but keep looking for a better one
13164       ac_cv_path_EGREP="$ac_path_EGREP"
13165       ac_path_EGREP_max=$ac_count
13166     fi
13167     # 10*(2^10) chars as input seems more than enough
13168     test $ac_count -gt 10 && break
13169   done
13170   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13171 esac
13172 
13173       $ac_path_EGREP_found && break 3
13174     done
13175   done
13176   done
13177 IFS=$as_save_IFS
13178   if test -z "$ac_cv_path_EGREP"; then
13179     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13180   fi
13181 else
13182   ac_cv_path_EGREP=$EGREP
13183 fi
13184 
13185    fi
13186 fi
13187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13188 $as_echo "$ac_cv_path_EGREP" >&6; }
13189  EGREP="$ac_cv_path_EGREP"
13190 
13191 
13192   else
13193     # The variable is set, but is it from the command line or the environment?
13194 
13195     # Try to remove the string !EGREP! from our list.
13196     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13197     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13198       # If it failed, the variable was not from the command line. Ignore it,
13199       # but warn the user (except for BASH, which is always set by the calling BASH).
13200       if test "xEGREP" != xBASH; then
13201         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13202 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13203       fi
13204       # Try to locate tool using the code snippet
13205       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13206 $as_echo_n "checking for egrep... " >&6; }
13207 if ${ac_cv_path_EGREP+:} false; then :
13208   $as_echo_n "(cached) " >&6
13209 else
13210   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13211    then ac_cv_path_EGREP="$GREP -E"
13212    else
13213      if test -z "$EGREP"; then
13214   ac_path_EGREP_found=false
13215   # Loop through the user's path and test for each of PROGNAME-LIST
13216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13217 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13218 do
13219   IFS=$as_save_IFS
13220   test -z "$as_dir" && as_dir=.
13221     for ac_prog in egrep; do
13222     for ac_exec_ext in '' $ac_executable_extensions; do
13223       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13224       as_fn_executable_p "$ac_path_EGREP" || continue
13225 # Check for GNU ac_path_EGREP and select it if it is found.
13226   # Check for GNU $ac_path_EGREP
13227 case `"$ac_path_EGREP" --version 2>&1` in
13228 *GNU*)
13229   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13230 *)
13231   ac_count=0
13232   $as_echo_n 0123456789 >"conftest.in"
13233   while :
13234   do
13235     cat "conftest.in" "conftest.in" >"conftest.tmp"
13236     mv "conftest.tmp" "conftest.in"
13237     cp "conftest.in" "conftest.nl"
13238     $as_echo 'EGREP' >> "conftest.nl"
13239     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13240     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13241     as_fn_arith $ac_count + 1 && ac_count=$as_val
13242     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13243       # Best one so far, save it but keep looking for a better one
13244       ac_cv_path_EGREP="$ac_path_EGREP"
13245       ac_path_EGREP_max=$ac_count
13246     fi
13247     # 10*(2^10) chars as input seems more than enough
13248     test $ac_count -gt 10 && break
13249   done
13250   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13251 esac
13252 
13253       $ac_path_EGREP_found && break 3
13254     done
13255   done
13256   done
13257 IFS=$as_save_IFS
13258   if test -z "$ac_cv_path_EGREP"; then
13259     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13260   fi
13261 else
13262   ac_cv_path_EGREP=$EGREP
13263 fi
13264 
13265    fi
13266 fi
13267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13268 $as_echo "$ac_cv_path_EGREP" >&6; }
13269  EGREP="$ac_cv_path_EGREP"
13270 
13271 
13272     else
13273       # If it succeeded, then it was overridden by the user. We will use it
13274       # for the tool.
13275 
13276       # First remove it from the list of overridden variables, so we can test
13277       # for unknown variables in the end.
13278       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13279 
13280       # Check if we try to supply an empty value
13281       if test "x$EGREP" = x; then
13282         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13283 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13284         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13285 $as_echo_n "checking for EGREP... " >&6; }
13286         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13287 $as_echo "disabled" >&6; }
13288       else
13289         # Check if the provided tool contains a complete path.
13290         tool_specified="$EGREP"
13291         tool_basename="${tool_specified##*/}"
13292         if test "x$tool_basename" = "x$tool_specified"; then
13293           # A command without a complete path is provided, search $PATH.
13294           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13295 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13296           # Extract the first word of "$tool_basename", so it can be a program name with args.
13297 set dummy $tool_basename; ac_word=$2
13298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13299 $as_echo_n "checking for $ac_word... " >&6; }
13300 if ${ac_cv_path_EGREP+:} false; then :
13301   $as_echo_n "(cached) " >&6
13302 else
13303   case $EGREP in
13304   [\\/]* | ?:[\\/]*)
13305   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13306   ;;
13307   *)
13308   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13309 for as_dir in $PATH
13310 do
13311   IFS=$as_save_IFS
13312   test -z "$as_dir" && as_dir=.
13313     for ac_exec_ext in '' $ac_executable_extensions; do
13314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13315     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13317     break 2
13318   fi
13319 done
13320   done
13321 IFS=$as_save_IFS
13322 
13323   ;;
13324 esac
13325 fi
13326 EGREP=$ac_cv_path_EGREP
13327 if test -n "$EGREP"; then
13328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13329 $as_echo "$EGREP" >&6; }
13330 else
13331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13332 $as_echo "no" >&6; }
13333 fi
13334 
13335 
13336           if test "x$EGREP" = x; then
13337             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13338           fi
13339         else
13340           # Otherwise we believe it is a complete path. Use it as it is.
13341           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13342 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13343           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13344 $as_echo_n "checking for EGREP... " >&6; }
13345           if test ! -x "$tool_specified"; then
13346             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13347 $as_echo "not found" >&6; }
13348             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13349           fi
13350           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13351 $as_echo "$tool_specified" >&6; }
13352         fi
13353       fi
13354     fi
13355 
13356   fi
13357 
13358 
13359   if test "x$EGREP" = x; then
13360     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13361   fi
13362 
13363 
13364 
13365 
13366   # Publish this variable in the help.
13367 
13368 
13369   if [ -z "${FGREP+x}" ]; then
13370     # The variable is not set by user, try to locate tool using the code snippet
13371     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13372 $as_echo_n "checking for fgrep... " >&6; }
13373 if ${ac_cv_path_FGREP+:} false; then :
13374   $as_echo_n "(cached) " >&6
13375 else
13376   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13377    then ac_cv_path_FGREP="$GREP -F"
13378    else
13379      if test -z "$FGREP"; then
13380   ac_path_FGREP_found=false
13381   # Loop through the user's path and test for each of PROGNAME-LIST
13382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13383 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13384 do
13385   IFS=$as_save_IFS
13386   test -z "$as_dir" && as_dir=.
13387     for ac_prog in fgrep; do
13388     for ac_exec_ext in '' $ac_executable_extensions; do
13389       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13390       as_fn_executable_p "$ac_path_FGREP" || continue
13391 # Check for GNU ac_path_FGREP and select it if it is found.
13392   # Check for GNU $ac_path_FGREP
13393 case `"$ac_path_FGREP" --version 2>&1` in
13394 *GNU*)
13395   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13396 *)
13397   ac_count=0
13398   $as_echo_n 0123456789 >"conftest.in"
13399   while :
13400   do
13401     cat "conftest.in" "conftest.in" >"conftest.tmp"
13402     mv "conftest.tmp" "conftest.in"
13403     cp "conftest.in" "conftest.nl"
13404     $as_echo 'FGREP' >> "conftest.nl"
13405     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13406     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13407     as_fn_arith $ac_count + 1 && ac_count=$as_val
13408     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13409       # Best one so far, save it but keep looking for a better one
13410       ac_cv_path_FGREP="$ac_path_FGREP"
13411       ac_path_FGREP_max=$ac_count
13412     fi
13413     # 10*(2^10) chars as input seems more than enough
13414     test $ac_count -gt 10 && break
13415   done
13416   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13417 esac
13418 
13419       $ac_path_FGREP_found && break 3
13420     done
13421   done
13422   done
13423 IFS=$as_save_IFS
13424   if test -z "$ac_cv_path_FGREP"; then
13425     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13426   fi
13427 else
13428   ac_cv_path_FGREP=$FGREP
13429 fi
13430 
13431    fi
13432 fi
13433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13434 $as_echo "$ac_cv_path_FGREP" >&6; }
13435  FGREP="$ac_cv_path_FGREP"
13436 
13437 
13438   else
13439     # The variable is set, but is it from the command line or the environment?
13440 
13441     # Try to remove the string !FGREP! from our list.
13442     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13443     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13444       # If it failed, the variable was not from the command line. Ignore it,
13445       # but warn the user (except for BASH, which is always set by the calling BASH).
13446       if test "xFGREP" != xBASH; then
13447         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13448 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13449       fi
13450       # Try to locate tool using the code snippet
13451       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13452 $as_echo_n "checking for fgrep... " >&6; }
13453 if ${ac_cv_path_FGREP+:} false; then :
13454   $as_echo_n "(cached) " >&6
13455 else
13456   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13457    then ac_cv_path_FGREP="$GREP -F"
13458    else
13459      if test -z "$FGREP"; then
13460   ac_path_FGREP_found=false
13461   # Loop through the user's path and test for each of PROGNAME-LIST
13462   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13463 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13464 do
13465   IFS=$as_save_IFS
13466   test -z "$as_dir" && as_dir=.
13467     for ac_prog in fgrep; do
13468     for ac_exec_ext in '' $ac_executable_extensions; do
13469       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13470       as_fn_executable_p "$ac_path_FGREP" || continue
13471 # Check for GNU ac_path_FGREP and select it if it is found.
13472   # Check for GNU $ac_path_FGREP
13473 case `"$ac_path_FGREP" --version 2>&1` in
13474 *GNU*)
13475   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13476 *)
13477   ac_count=0
13478   $as_echo_n 0123456789 >"conftest.in"
13479   while :
13480   do
13481     cat "conftest.in" "conftest.in" >"conftest.tmp"
13482     mv "conftest.tmp" "conftest.in"
13483     cp "conftest.in" "conftest.nl"
13484     $as_echo 'FGREP' >> "conftest.nl"
13485     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13486     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13487     as_fn_arith $ac_count + 1 && ac_count=$as_val
13488     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13489       # Best one so far, save it but keep looking for a better one
13490       ac_cv_path_FGREP="$ac_path_FGREP"
13491       ac_path_FGREP_max=$ac_count
13492     fi
13493     # 10*(2^10) chars as input seems more than enough
13494     test $ac_count -gt 10 && break
13495   done
13496   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13497 esac
13498 
13499       $ac_path_FGREP_found && break 3
13500     done
13501   done
13502   done
13503 IFS=$as_save_IFS
13504   if test -z "$ac_cv_path_FGREP"; then
13505     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13506   fi
13507 else
13508   ac_cv_path_FGREP=$FGREP
13509 fi
13510 
13511    fi
13512 fi
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13514 $as_echo "$ac_cv_path_FGREP" >&6; }
13515  FGREP="$ac_cv_path_FGREP"
13516 
13517 
13518     else
13519       # If it succeeded, then it was overridden by the user. We will use it
13520       # for the tool.
13521 
13522       # First remove it from the list of overridden variables, so we can test
13523       # for unknown variables in the end.
13524       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13525 
13526       # Check if we try to supply an empty value
13527       if test "x$FGREP" = x; then
13528         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13529 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13530         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13531 $as_echo_n "checking for FGREP... " >&6; }
13532         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13533 $as_echo "disabled" >&6; }
13534       else
13535         # Check if the provided tool contains a complete path.
13536         tool_specified="$FGREP"
13537         tool_basename="${tool_specified##*/}"
13538         if test "x$tool_basename" = "x$tool_specified"; then
13539           # A command without a complete path is provided, search $PATH.
13540           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13541 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13542           # Extract the first word of "$tool_basename", so it can be a program name with args.
13543 set dummy $tool_basename; ac_word=$2
13544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13545 $as_echo_n "checking for $ac_word... " >&6; }
13546 if ${ac_cv_path_FGREP+:} false; then :
13547   $as_echo_n "(cached) " >&6
13548 else
13549   case $FGREP in
13550   [\\/]* | ?:[\\/]*)
13551   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13552   ;;
13553   *)
13554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13555 for as_dir in $PATH
13556 do
13557   IFS=$as_save_IFS
13558   test -z "$as_dir" && as_dir=.
13559     for ac_exec_ext in '' $ac_executable_extensions; do
13560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13561     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13563     break 2
13564   fi
13565 done
13566   done
13567 IFS=$as_save_IFS
13568 
13569   ;;
13570 esac
13571 fi
13572 FGREP=$ac_cv_path_FGREP
13573 if test -n "$FGREP"; then
13574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13575 $as_echo "$FGREP" >&6; }
13576 else
13577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13578 $as_echo "no" >&6; }
13579 fi
13580 
13581 
13582           if test "x$FGREP" = x; then
13583             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13584           fi
13585         else
13586           # Otherwise we believe it is a complete path. Use it as it is.
13587           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13588 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13589           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13590 $as_echo_n "checking for FGREP... " >&6; }
13591           if test ! -x "$tool_specified"; then
13592             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13593 $as_echo "not found" >&6; }
13594             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13595           fi
13596           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13597 $as_echo "$tool_specified" >&6; }
13598         fi
13599       fi
13600     fi
13601 
13602   fi
13603 
13604 
13605   if test "x$FGREP" = x; then
13606     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13607   fi
13608 
13609 
13610 
13611 
13612   # Publish this variable in the help.
13613 
13614 
13615   if [ -z "${SED+x}" ]; then
13616     # The variable is not set by user, try to locate tool using the code snippet
13617     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13618 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13619 if ${ac_cv_path_SED+:} false; then :
13620   $as_echo_n "(cached) " >&6
13621 else
13622             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13623      for ac_i in 1 2 3 4 5 6 7; do
13624        ac_script="$ac_script$as_nl$ac_script"
13625      done
13626      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13627      { ac_script=; unset ac_script;}
13628      if test -z "$SED"; then
13629   ac_path_SED_found=false
13630   # Loop through the user's path and test for each of PROGNAME-LIST
13631   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13632 for as_dir in $PATH
13633 do
13634   IFS=$as_save_IFS
13635   test -z "$as_dir" && as_dir=.
13636     for ac_prog in sed gsed; do
13637     for ac_exec_ext in '' $ac_executable_extensions; do
13638       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13639       as_fn_executable_p "$ac_path_SED" || continue
13640 # Check for GNU ac_path_SED and select it if it is found.
13641   # Check for GNU $ac_path_SED
13642 case `"$ac_path_SED" --version 2>&1` in
13643 *GNU*)
13644   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13645 *)
13646   ac_count=0
13647   $as_echo_n 0123456789 >"conftest.in"
13648   while :
13649   do
13650     cat "conftest.in" "conftest.in" >"conftest.tmp"
13651     mv "conftest.tmp" "conftest.in"
13652     cp "conftest.in" "conftest.nl"
13653     $as_echo '' >> "conftest.nl"
13654     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13655     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13656     as_fn_arith $ac_count + 1 && ac_count=$as_val
13657     if test $ac_count -gt ${ac_path_SED_max-0}; then
13658       # Best one so far, save it but keep looking for a better one
13659       ac_cv_path_SED="$ac_path_SED"
13660       ac_path_SED_max=$ac_count
13661     fi
13662     # 10*(2^10) chars as input seems more than enough
13663     test $ac_count -gt 10 && break
13664   done
13665   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13666 esac
13667 
13668       $ac_path_SED_found && break 3
13669     done
13670   done
13671   done
13672 IFS=$as_save_IFS
13673   if test -z "$ac_cv_path_SED"; then
13674     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13675   fi
13676 else
13677   ac_cv_path_SED=$SED
13678 fi
13679 
13680 fi
13681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13682 $as_echo "$ac_cv_path_SED" >&6; }
13683  SED="$ac_cv_path_SED"
13684   rm -f conftest.sed
13685 
13686   else
13687     # The variable is set, but is it from the command line or the environment?
13688 
13689     # Try to remove the string !SED! from our list.
13690     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13691     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13692       # If it failed, the variable was not from the command line. Ignore it,
13693       # but warn the user (except for BASH, which is always set by the calling BASH).
13694       if test "xSED" != xBASH; then
13695         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13696 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13697       fi
13698       # Try to locate tool using the code snippet
13699       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13700 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13701 if ${ac_cv_path_SED+:} false; then :
13702   $as_echo_n "(cached) " >&6
13703 else
13704             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13705      for ac_i in 1 2 3 4 5 6 7; do
13706        ac_script="$ac_script$as_nl$ac_script"
13707      done
13708      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13709      { ac_script=; unset ac_script;}
13710      if test -z "$SED"; then
13711   ac_path_SED_found=false
13712   # Loop through the user's path and test for each of PROGNAME-LIST
13713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13714 for as_dir in $PATH
13715 do
13716   IFS=$as_save_IFS
13717   test -z "$as_dir" && as_dir=.
13718     for ac_prog in sed gsed; do
13719     for ac_exec_ext in '' $ac_executable_extensions; do
13720       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13721       as_fn_executable_p "$ac_path_SED" || continue
13722 # Check for GNU ac_path_SED and select it if it is found.
13723   # Check for GNU $ac_path_SED
13724 case `"$ac_path_SED" --version 2>&1` in
13725 *GNU*)
13726   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13727 *)
13728   ac_count=0
13729   $as_echo_n 0123456789 >"conftest.in"
13730   while :
13731   do
13732     cat "conftest.in" "conftest.in" >"conftest.tmp"
13733     mv "conftest.tmp" "conftest.in"
13734     cp "conftest.in" "conftest.nl"
13735     $as_echo '' >> "conftest.nl"
13736     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13737     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13738     as_fn_arith $ac_count + 1 && ac_count=$as_val
13739     if test $ac_count -gt ${ac_path_SED_max-0}; then
13740       # Best one so far, save it but keep looking for a better one
13741       ac_cv_path_SED="$ac_path_SED"
13742       ac_path_SED_max=$ac_count
13743     fi
13744     # 10*(2^10) chars as input seems more than enough
13745     test $ac_count -gt 10 && break
13746   done
13747   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13748 esac
13749 
13750       $ac_path_SED_found && break 3
13751     done
13752   done
13753   done
13754 IFS=$as_save_IFS
13755   if test -z "$ac_cv_path_SED"; then
13756     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13757   fi
13758 else
13759   ac_cv_path_SED=$SED
13760 fi
13761 
13762 fi
13763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13764 $as_echo "$ac_cv_path_SED" >&6; }
13765  SED="$ac_cv_path_SED"
13766   rm -f conftest.sed
13767 
13768     else
13769       # If it succeeded, then it was overridden by the user. We will use it
13770       # for the tool.
13771 
13772       # First remove it from the list of overridden variables, so we can test
13773       # for unknown variables in the end.
13774       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13775 
13776       # Check if we try to supply an empty value
13777       if test "x$SED" = x; then
13778         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13779 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13780         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13781 $as_echo_n "checking for SED... " >&6; }
13782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13783 $as_echo "disabled" >&6; }
13784       else
13785         # Check if the provided tool contains a complete path.
13786         tool_specified="$SED"
13787         tool_basename="${tool_specified##*/}"
13788         if test "x$tool_basename" = "x$tool_specified"; then
13789           # A command without a complete path is provided, search $PATH.
13790           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13791 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13792           # Extract the first word of "$tool_basename", so it can be a program name with args.
13793 set dummy $tool_basename; ac_word=$2
13794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13795 $as_echo_n "checking for $ac_word... " >&6; }
13796 if ${ac_cv_path_SED+:} false; then :
13797   $as_echo_n "(cached) " >&6
13798 else
13799   case $SED in
13800   [\\/]* | ?:[\\/]*)
13801   ac_cv_path_SED="$SED" # Let the user override the test with a path.
13802   ;;
13803   *)
13804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13805 for as_dir in $PATH
13806 do
13807   IFS=$as_save_IFS
13808   test -z "$as_dir" && as_dir=.
13809     for ac_exec_ext in '' $ac_executable_extensions; do
13810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13811     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13813     break 2
13814   fi
13815 done
13816   done
13817 IFS=$as_save_IFS
13818 
13819   ;;
13820 esac
13821 fi
13822 SED=$ac_cv_path_SED
13823 if test -n "$SED"; then
13824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13825 $as_echo "$SED" >&6; }
13826 else
13827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13828 $as_echo "no" >&6; }
13829 fi
13830 
13831 
13832           if test "x$SED" = x; then
13833             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13834           fi
13835         else
13836           # Otherwise we believe it is a complete path. Use it as it is.
13837           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13838 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13839           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13840 $as_echo_n "checking for SED... " >&6; }
13841           if test ! -x "$tool_specified"; then
13842             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13843 $as_echo "not found" >&6; }
13844             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13845           fi
13846           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13847 $as_echo "$tool_specified" >&6; }
13848         fi
13849       fi
13850     fi
13851 
13852   fi
13853 
13854 
13855   if test "x$SED" = x; then
13856     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13857   fi
13858 
13859 
13860 
13861   # Always force rm.
13862   RM="$RM -f"
13863 
13864   # pwd behaves differently on various platforms and some don't support the -L flag.
13865   # Always use the bash builtin pwd to get uniform behavior.
13866   THEPWDCMD=pwd
13867 
13868   # These are not required on all platforms
13869 
13870 
13871   # Publish this variable in the help.
13872 
13873 
13874   if [ -z "${CYGPATH+x}" ]; then
13875     # The variable is not set by user, try to locate tool using the code snippet
13876     for ac_prog in cygpath
13877 do
13878   # Extract the first word of "$ac_prog", so it can be a program name with args.
13879 set dummy $ac_prog; ac_word=$2
13880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13881 $as_echo_n "checking for $ac_word... " >&6; }
13882 if ${ac_cv_path_CYGPATH+:} false; then :
13883   $as_echo_n "(cached) " >&6
13884 else
13885   case $CYGPATH in
13886   [\\/]* | ?:[\\/]*)
13887   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13888   ;;
13889   *)
13890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13891 for as_dir in $PATH
13892 do
13893   IFS=$as_save_IFS
13894   test -z "$as_dir" && as_dir=.
13895     for ac_exec_ext in '' $ac_executable_extensions; do
13896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13897     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13899     break 2
13900   fi
13901 done
13902   done
13903 IFS=$as_save_IFS
13904 
13905   ;;
13906 esac
13907 fi
13908 CYGPATH=$ac_cv_path_CYGPATH
13909 if test -n "$CYGPATH"; then
13910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13911 $as_echo "$CYGPATH" >&6; }
13912 else
13913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13914 $as_echo "no" >&6; }
13915 fi
13916 
13917 
13918   test -n "$CYGPATH" && break
13919 done
13920 
13921   else
13922     # The variable is set, but is it from the command line or the environment?
13923 
13924     # Try to remove the string !CYGPATH! from our list.
13925     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13926     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13927       # If it failed, the variable was not from the command line. Ignore it,
13928       # but warn the user (except for BASH, which is always set by the calling BASH).
13929       if test "xCYGPATH" != xBASH; then
13930         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13931 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13932       fi
13933       # Try to locate tool using the code snippet
13934       for ac_prog in cygpath
13935 do
13936   # Extract the first word of "$ac_prog", so it can be a program name with args.
13937 set dummy $ac_prog; ac_word=$2
13938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13939 $as_echo_n "checking for $ac_word... " >&6; }
13940 if ${ac_cv_path_CYGPATH+:} false; then :
13941   $as_echo_n "(cached) " >&6
13942 else
13943   case $CYGPATH in
13944   [\\/]* | ?:[\\/]*)
13945   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13946   ;;
13947   *)
13948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13949 for as_dir in $PATH
13950 do
13951   IFS=$as_save_IFS
13952   test -z "$as_dir" && as_dir=.
13953     for ac_exec_ext in '' $ac_executable_extensions; do
13954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13955     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13957     break 2
13958   fi
13959 done
13960   done
13961 IFS=$as_save_IFS
13962 
13963   ;;
13964 esac
13965 fi
13966 CYGPATH=$ac_cv_path_CYGPATH
13967 if test -n "$CYGPATH"; then
13968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13969 $as_echo "$CYGPATH" >&6; }
13970 else
13971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13972 $as_echo "no" >&6; }
13973 fi
13974 
13975 
13976   test -n "$CYGPATH" && break
13977 done
13978 
13979     else
13980       # If it succeeded, then it was overridden by the user. We will use it
13981       # for the tool.
13982 
13983       # First remove it from the list of overridden variables, so we can test
13984       # for unknown variables in the end.
13985       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13986 
13987       # Check if we try to supply an empty value
13988       if test "x$CYGPATH" = x; then
13989         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13990 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13991         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13992 $as_echo_n "checking for CYGPATH... " >&6; }
13993         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13994 $as_echo "disabled" >&6; }
13995       else
13996         # Check if the provided tool contains a complete path.
13997         tool_specified="$CYGPATH"
13998         tool_basename="${tool_specified##*/}"
13999         if test "x$tool_basename" = "x$tool_specified"; then
14000           # A command without a complete path is provided, search $PATH.
14001           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14002 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14003           # Extract the first word of "$tool_basename", so it can be a program name with args.
14004 set dummy $tool_basename; ac_word=$2
14005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14006 $as_echo_n "checking for $ac_word... " >&6; }
14007 if ${ac_cv_path_CYGPATH+:} false; then :
14008   $as_echo_n "(cached) " >&6
14009 else
14010   case $CYGPATH in
14011   [\\/]* | ?:[\\/]*)
14012   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14013   ;;
14014   *)
14015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14016 for as_dir in $PATH
14017 do
14018   IFS=$as_save_IFS
14019   test -z "$as_dir" && as_dir=.
14020     for ac_exec_ext in '' $ac_executable_extensions; do
14021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14022     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14024     break 2
14025   fi
14026 done
14027   done
14028 IFS=$as_save_IFS
14029 
14030   ;;
14031 esac
14032 fi
14033 CYGPATH=$ac_cv_path_CYGPATH
14034 if test -n "$CYGPATH"; then
14035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14036 $as_echo "$CYGPATH" >&6; }
14037 else
14038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14039 $as_echo "no" >&6; }
14040 fi
14041 
14042 
14043           if test "x$CYGPATH" = x; then
14044             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14045           fi
14046         else
14047           # Otherwise we believe it is a complete path. Use it as it is.
14048           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14049 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14050           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14051 $as_echo_n "checking for CYGPATH... " >&6; }
14052           if test ! -x "$tool_specified"; then
14053             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14054 $as_echo "not found" >&6; }
14055             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14056           fi
14057           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14058 $as_echo "$tool_specified" >&6; }
14059         fi
14060       fi
14061     fi
14062 
14063   fi
14064 
14065 
14066 
14067 
14068   # Publish this variable in the help.
14069 
14070 
14071   if [ -z "${READLINK+x}" ]; then
14072     # The variable is not set by user, try to locate tool using the code snippet
14073     for ac_prog in greadlink readlink
14074 do
14075   # Extract the first word of "$ac_prog", so it can be a program name with args.
14076 set dummy $ac_prog; ac_word=$2
14077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14078 $as_echo_n "checking for $ac_word... " >&6; }
14079 if ${ac_cv_path_READLINK+:} false; then :
14080   $as_echo_n "(cached) " >&6
14081 else
14082   case $READLINK in
14083   [\\/]* | ?:[\\/]*)
14084   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14085   ;;
14086   *)
14087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14088 for as_dir in $PATH
14089 do
14090   IFS=$as_save_IFS
14091   test -z "$as_dir" && as_dir=.
14092     for ac_exec_ext in '' $ac_executable_extensions; do
14093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14094     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14096     break 2
14097   fi
14098 done
14099   done
14100 IFS=$as_save_IFS
14101 
14102   ;;
14103 esac
14104 fi
14105 READLINK=$ac_cv_path_READLINK
14106 if test -n "$READLINK"; then
14107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14108 $as_echo "$READLINK" >&6; }
14109 else
14110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14111 $as_echo "no" >&6; }
14112 fi
14113 
14114 
14115   test -n "$READLINK" && break
14116 done
14117 
14118   else
14119     # The variable is set, but is it from the command line or the environment?
14120 
14121     # Try to remove the string !READLINK! from our list.
14122     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14123     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14124       # If it failed, the variable was not from the command line. Ignore it,
14125       # but warn the user (except for BASH, which is always set by the calling BASH).
14126       if test "xREADLINK" != xBASH; then
14127         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14128 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14129       fi
14130       # Try to locate tool using the code snippet
14131       for ac_prog in greadlink readlink
14132 do
14133   # Extract the first word of "$ac_prog", so it can be a program name with args.
14134 set dummy $ac_prog; ac_word=$2
14135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14136 $as_echo_n "checking for $ac_word... " >&6; }
14137 if ${ac_cv_path_READLINK+:} false; then :
14138   $as_echo_n "(cached) " >&6
14139 else
14140   case $READLINK in
14141   [\\/]* | ?:[\\/]*)
14142   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14143   ;;
14144   *)
14145   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14146 for as_dir in $PATH
14147 do
14148   IFS=$as_save_IFS
14149   test -z "$as_dir" && as_dir=.
14150     for ac_exec_ext in '' $ac_executable_extensions; do
14151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14152     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14153     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14154     break 2
14155   fi
14156 done
14157   done
14158 IFS=$as_save_IFS
14159 
14160   ;;
14161 esac
14162 fi
14163 READLINK=$ac_cv_path_READLINK
14164 if test -n "$READLINK"; then
14165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14166 $as_echo "$READLINK" >&6; }
14167 else
14168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14169 $as_echo "no" >&6; }
14170 fi
14171 
14172 
14173   test -n "$READLINK" && break
14174 done
14175 
14176     else
14177       # If it succeeded, then it was overridden by the user. We will use it
14178       # for the tool.
14179 
14180       # First remove it from the list of overridden variables, so we can test
14181       # for unknown variables in the end.
14182       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14183 
14184       # Check if we try to supply an empty value
14185       if test "x$READLINK" = x; then
14186         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14187 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14188         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14189 $as_echo_n "checking for READLINK... " >&6; }
14190         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14191 $as_echo "disabled" >&6; }
14192       else
14193         # Check if the provided tool contains a complete path.
14194         tool_specified="$READLINK"
14195         tool_basename="${tool_specified##*/}"
14196         if test "x$tool_basename" = "x$tool_specified"; then
14197           # A command without a complete path is provided, search $PATH.
14198           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14199 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14200           # Extract the first word of "$tool_basename", so it can be a program name with args.
14201 set dummy $tool_basename; ac_word=$2
14202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14203 $as_echo_n "checking for $ac_word... " >&6; }
14204 if ${ac_cv_path_READLINK+:} false; then :
14205   $as_echo_n "(cached) " >&6
14206 else
14207   case $READLINK in
14208   [\\/]* | ?:[\\/]*)
14209   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14210   ;;
14211   *)
14212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14213 for as_dir in $PATH
14214 do
14215   IFS=$as_save_IFS
14216   test -z "$as_dir" && as_dir=.
14217     for ac_exec_ext in '' $ac_executable_extensions; do
14218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14219     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14221     break 2
14222   fi
14223 done
14224   done
14225 IFS=$as_save_IFS
14226 
14227   ;;
14228 esac
14229 fi
14230 READLINK=$ac_cv_path_READLINK
14231 if test -n "$READLINK"; then
14232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14233 $as_echo "$READLINK" >&6; }
14234 else
14235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14236 $as_echo "no" >&6; }
14237 fi
14238 
14239 
14240           if test "x$READLINK" = x; then
14241             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14242           fi
14243         else
14244           # Otherwise we believe it is a complete path. Use it as it is.
14245           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14246 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14247           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14248 $as_echo_n "checking for READLINK... " >&6; }
14249           if test ! -x "$tool_specified"; then
14250             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14251 $as_echo "not found" >&6; }
14252             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14253           fi
14254           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14255 $as_echo "$tool_specified" >&6; }
14256         fi
14257       fi
14258     fi
14259 
14260   fi
14261 
14262 
14263 
14264 
14265   # Publish this variable in the help.
14266 
14267 
14268   if [ -z "${DF+x}" ]; then
14269     # The variable is not set by user, try to locate tool using the code snippet
14270     for ac_prog in df
14271 do
14272   # Extract the first word of "$ac_prog", so it can be a program name with args.
14273 set dummy $ac_prog; ac_word=$2
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14275 $as_echo_n "checking for $ac_word... " >&6; }
14276 if ${ac_cv_path_DF+:} false; then :
14277   $as_echo_n "(cached) " >&6
14278 else
14279   case $DF in
14280   [\\/]* | ?:[\\/]*)
14281   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14282   ;;
14283   *)
14284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14285 for as_dir in $PATH
14286 do
14287   IFS=$as_save_IFS
14288   test -z "$as_dir" && as_dir=.
14289     for ac_exec_ext in '' $ac_executable_extensions; do
14290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14291     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14293     break 2
14294   fi
14295 done
14296   done
14297 IFS=$as_save_IFS
14298 
14299   ;;
14300 esac
14301 fi
14302 DF=$ac_cv_path_DF
14303 if test -n "$DF"; then
14304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14305 $as_echo "$DF" >&6; }
14306 else
14307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14308 $as_echo "no" >&6; }
14309 fi
14310 
14311 
14312   test -n "$DF" && break
14313 done
14314 
14315   else
14316     # The variable is set, but is it from the command line or the environment?
14317 
14318     # Try to remove the string !DF! from our list.
14319     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14320     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14321       # If it failed, the variable was not from the command line. Ignore it,
14322       # but warn the user (except for BASH, which is always set by the calling BASH).
14323       if test "xDF" != xBASH; then
14324         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14325 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14326       fi
14327       # Try to locate tool using the code snippet
14328       for ac_prog in df
14329 do
14330   # Extract the first word of "$ac_prog", so it can be a program name with args.
14331 set dummy $ac_prog; ac_word=$2
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14333 $as_echo_n "checking for $ac_word... " >&6; }
14334 if ${ac_cv_path_DF+:} false; then :
14335   $as_echo_n "(cached) " >&6
14336 else
14337   case $DF in
14338   [\\/]* | ?:[\\/]*)
14339   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14340   ;;
14341   *)
14342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14343 for as_dir in $PATH
14344 do
14345   IFS=$as_save_IFS
14346   test -z "$as_dir" && as_dir=.
14347     for ac_exec_ext in '' $ac_executable_extensions; do
14348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14349     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14351     break 2
14352   fi
14353 done
14354   done
14355 IFS=$as_save_IFS
14356 
14357   ;;
14358 esac
14359 fi
14360 DF=$ac_cv_path_DF
14361 if test -n "$DF"; then
14362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14363 $as_echo "$DF" >&6; }
14364 else
14365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14366 $as_echo "no" >&6; }
14367 fi
14368 
14369 
14370   test -n "$DF" && break
14371 done
14372 
14373     else
14374       # If it succeeded, then it was overridden by the user. We will use it
14375       # for the tool.
14376 
14377       # First remove it from the list of overridden variables, so we can test
14378       # for unknown variables in the end.
14379       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14380 
14381       # Check if we try to supply an empty value
14382       if test "x$DF" = x; then
14383         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14384 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14385         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14386 $as_echo_n "checking for DF... " >&6; }
14387         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14388 $as_echo "disabled" >&6; }
14389       else
14390         # Check if the provided tool contains a complete path.
14391         tool_specified="$DF"
14392         tool_basename="${tool_specified##*/}"
14393         if test "x$tool_basename" = "x$tool_specified"; then
14394           # A command without a complete path is provided, search $PATH.
14395           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14396 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14397           # Extract the first word of "$tool_basename", so it can be a program name with args.
14398 set dummy $tool_basename; ac_word=$2
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14400 $as_echo_n "checking for $ac_word... " >&6; }
14401 if ${ac_cv_path_DF+:} false; then :
14402   $as_echo_n "(cached) " >&6
14403 else
14404   case $DF in
14405   [\\/]* | ?:[\\/]*)
14406   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14407   ;;
14408   *)
14409   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14410 for as_dir in $PATH
14411 do
14412   IFS=$as_save_IFS
14413   test -z "$as_dir" && as_dir=.
14414     for ac_exec_ext in '' $ac_executable_extensions; do
14415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14416     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14418     break 2
14419   fi
14420 done
14421   done
14422 IFS=$as_save_IFS
14423 
14424   ;;
14425 esac
14426 fi
14427 DF=$ac_cv_path_DF
14428 if test -n "$DF"; then
14429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14430 $as_echo "$DF" >&6; }
14431 else
14432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14433 $as_echo "no" >&6; }
14434 fi
14435 
14436 
14437           if test "x$DF" = x; then
14438             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14439           fi
14440         else
14441           # Otherwise we believe it is a complete path. Use it as it is.
14442           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14443 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14444           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14445 $as_echo_n "checking for DF... " >&6; }
14446           if test ! -x "$tool_specified"; then
14447             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14448 $as_echo "not found" >&6; }
14449             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14450           fi
14451           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14452 $as_echo "$tool_specified" >&6; }
14453         fi
14454       fi
14455     fi
14456 
14457   fi
14458 
14459 
14460 
14461 
14462   # Publish this variable in the help.
14463 
14464 
14465   if [ -z "${CPIO+x}" ]; then
14466     # The variable is not set by user, try to locate tool using the code snippet
14467     for ac_prog in cpio bsdcpio
14468 do
14469   # Extract the first word of "$ac_prog", so it can be a program name with args.
14470 set dummy $ac_prog; ac_word=$2
14471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14472 $as_echo_n "checking for $ac_word... " >&6; }
14473 if ${ac_cv_path_CPIO+:} false; then :
14474   $as_echo_n "(cached) " >&6
14475 else
14476   case $CPIO in
14477   [\\/]* | ?:[\\/]*)
14478   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14479   ;;
14480   *)
14481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14482 for as_dir in $PATH
14483 do
14484   IFS=$as_save_IFS
14485   test -z "$as_dir" && as_dir=.
14486     for ac_exec_ext in '' $ac_executable_extensions; do
14487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14488     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14490     break 2
14491   fi
14492 done
14493   done
14494 IFS=$as_save_IFS
14495 
14496   ;;
14497 esac
14498 fi
14499 CPIO=$ac_cv_path_CPIO
14500 if test -n "$CPIO"; then
14501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14502 $as_echo "$CPIO" >&6; }
14503 else
14504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14505 $as_echo "no" >&6; }
14506 fi
14507 
14508 
14509   test -n "$CPIO" && break
14510 done
14511 
14512   else
14513     # The variable is set, but is it from the command line or the environment?
14514 
14515     # Try to remove the string !CPIO! from our list.
14516     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14517     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14518       # If it failed, the variable was not from the command line. Ignore it,
14519       # but warn the user (except for BASH, which is always set by the calling BASH).
14520       if test "xCPIO" != xBASH; then
14521         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14522 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14523       fi
14524       # Try to locate tool using the code snippet
14525       for ac_prog in cpio bsdcpio
14526 do
14527   # Extract the first word of "$ac_prog", so it can be a program name with args.
14528 set dummy $ac_prog; ac_word=$2
14529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14530 $as_echo_n "checking for $ac_word... " >&6; }
14531 if ${ac_cv_path_CPIO+:} false; then :
14532   $as_echo_n "(cached) " >&6
14533 else
14534   case $CPIO in
14535   [\\/]* | ?:[\\/]*)
14536   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14537   ;;
14538   *)
14539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14540 for as_dir in $PATH
14541 do
14542   IFS=$as_save_IFS
14543   test -z "$as_dir" && as_dir=.
14544     for ac_exec_ext in '' $ac_executable_extensions; do
14545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14546     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14548     break 2
14549   fi
14550 done
14551   done
14552 IFS=$as_save_IFS
14553 
14554   ;;
14555 esac
14556 fi
14557 CPIO=$ac_cv_path_CPIO
14558 if test -n "$CPIO"; then
14559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14560 $as_echo "$CPIO" >&6; }
14561 else
14562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14563 $as_echo "no" >&6; }
14564 fi
14565 
14566 
14567   test -n "$CPIO" && break
14568 done
14569 
14570     else
14571       # If it succeeded, then it was overridden by the user. We will use it
14572       # for the tool.
14573 
14574       # First remove it from the list of overridden variables, so we can test
14575       # for unknown variables in the end.
14576       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14577 
14578       # Check if we try to supply an empty value
14579       if test "x$CPIO" = x; then
14580         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14581 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14582         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14583 $as_echo_n "checking for CPIO... " >&6; }
14584         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14585 $as_echo "disabled" >&6; }
14586       else
14587         # Check if the provided tool contains a complete path.
14588         tool_specified="$CPIO"
14589         tool_basename="${tool_specified##*/}"
14590         if test "x$tool_basename" = "x$tool_specified"; then
14591           # A command without a complete path is provided, search $PATH.
14592           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14593 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14594           # Extract the first word of "$tool_basename", so it can be a program name with args.
14595 set dummy $tool_basename; ac_word=$2
14596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14597 $as_echo_n "checking for $ac_word... " >&6; }
14598 if ${ac_cv_path_CPIO+:} false; then :
14599   $as_echo_n "(cached) " >&6
14600 else
14601   case $CPIO in
14602   [\\/]* | ?:[\\/]*)
14603   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14604   ;;
14605   *)
14606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14607 for as_dir in $PATH
14608 do
14609   IFS=$as_save_IFS
14610   test -z "$as_dir" && as_dir=.
14611     for ac_exec_ext in '' $ac_executable_extensions; do
14612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14613     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14615     break 2
14616   fi
14617 done
14618   done
14619 IFS=$as_save_IFS
14620 
14621   ;;
14622 esac
14623 fi
14624 CPIO=$ac_cv_path_CPIO
14625 if test -n "$CPIO"; then
14626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14627 $as_echo "$CPIO" >&6; }
14628 else
14629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14630 $as_echo "no" >&6; }
14631 fi
14632 
14633 
14634           if test "x$CPIO" = x; then
14635             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14636           fi
14637         else
14638           # Otherwise we believe it is a complete path. Use it as it is.
14639           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14640 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14641           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14642 $as_echo_n "checking for CPIO... " >&6; }
14643           if test ! -x "$tool_specified"; then
14644             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14645 $as_echo "not found" >&6; }
14646             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14647           fi
14648           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14649 $as_echo "$tool_specified" >&6; }
14650         fi
14651       fi
14652     fi
14653 
14654   fi
14655 
14656 
14657 
14658 
14659   # Publish this variable in the help.
14660 
14661 
14662   if [ -z "${NICE+x}" ]; then
14663     # The variable is not set by user, try to locate tool using the code snippet
14664     for ac_prog in nice
14665 do
14666   # Extract the first word of "$ac_prog", so it can be a program name with args.
14667 set dummy $ac_prog; ac_word=$2
14668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14669 $as_echo_n "checking for $ac_word... " >&6; }
14670 if ${ac_cv_path_NICE+:} false; then :
14671   $as_echo_n "(cached) " >&6
14672 else
14673   case $NICE in
14674   [\\/]* | ?:[\\/]*)
14675   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14676   ;;
14677   *)
14678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14679 for as_dir in $PATH
14680 do
14681   IFS=$as_save_IFS
14682   test -z "$as_dir" && as_dir=.
14683     for ac_exec_ext in '' $ac_executable_extensions; do
14684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14685     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14687     break 2
14688   fi
14689 done
14690   done
14691 IFS=$as_save_IFS
14692 
14693   ;;
14694 esac
14695 fi
14696 NICE=$ac_cv_path_NICE
14697 if test -n "$NICE"; then
14698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14699 $as_echo "$NICE" >&6; }
14700 else
14701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14702 $as_echo "no" >&6; }
14703 fi
14704 
14705 
14706   test -n "$NICE" && break
14707 done
14708 
14709   else
14710     # The variable is set, but is it from the command line or the environment?
14711 
14712     # Try to remove the string !NICE! from our list.
14713     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14714     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14715       # If it failed, the variable was not from the command line. Ignore it,
14716       # but warn the user (except for BASH, which is always set by the calling BASH).
14717       if test "xNICE" != xBASH; then
14718         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14719 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14720       fi
14721       # Try to locate tool using the code snippet
14722       for ac_prog in nice
14723 do
14724   # Extract the first word of "$ac_prog", so it can be a program name with args.
14725 set dummy $ac_prog; ac_word=$2
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14727 $as_echo_n "checking for $ac_word... " >&6; }
14728 if ${ac_cv_path_NICE+:} false; then :
14729   $as_echo_n "(cached) " >&6
14730 else
14731   case $NICE in
14732   [\\/]* | ?:[\\/]*)
14733   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14734   ;;
14735   *)
14736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14737 for as_dir in $PATH
14738 do
14739   IFS=$as_save_IFS
14740   test -z "$as_dir" && as_dir=.
14741     for ac_exec_ext in '' $ac_executable_extensions; do
14742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14743     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14745     break 2
14746   fi
14747 done
14748   done
14749 IFS=$as_save_IFS
14750 
14751   ;;
14752 esac
14753 fi
14754 NICE=$ac_cv_path_NICE
14755 if test -n "$NICE"; then
14756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14757 $as_echo "$NICE" >&6; }
14758 else
14759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14760 $as_echo "no" >&6; }
14761 fi
14762 
14763 
14764   test -n "$NICE" && break
14765 done
14766 
14767     else
14768       # If it succeeded, then it was overridden by the user. We will use it
14769       # for the tool.
14770 
14771       # First remove it from the list of overridden variables, so we can test
14772       # for unknown variables in the end.
14773       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14774 
14775       # Check if we try to supply an empty value
14776       if test "x$NICE" = x; then
14777         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14778 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14779         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14780 $as_echo_n "checking for NICE... " >&6; }
14781         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14782 $as_echo "disabled" >&6; }
14783       else
14784         # Check if the provided tool contains a complete path.
14785         tool_specified="$NICE"
14786         tool_basename="${tool_specified##*/}"
14787         if test "x$tool_basename" = "x$tool_specified"; then
14788           # A command without a complete path is provided, search $PATH.
14789           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14790 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14791           # Extract the first word of "$tool_basename", so it can be a program name with args.
14792 set dummy $tool_basename; ac_word=$2
14793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14794 $as_echo_n "checking for $ac_word... " >&6; }
14795 if ${ac_cv_path_NICE+:} false; then :
14796   $as_echo_n "(cached) " >&6
14797 else
14798   case $NICE in
14799   [\\/]* | ?:[\\/]*)
14800   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14801   ;;
14802   *)
14803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14804 for as_dir in $PATH
14805 do
14806   IFS=$as_save_IFS
14807   test -z "$as_dir" && as_dir=.
14808     for ac_exec_ext in '' $ac_executable_extensions; do
14809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14810     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14812     break 2
14813   fi
14814 done
14815   done
14816 IFS=$as_save_IFS
14817 
14818   ;;
14819 esac
14820 fi
14821 NICE=$ac_cv_path_NICE
14822 if test -n "$NICE"; then
14823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14824 $as_echo "$NICE" >&6; }
14825 else
14826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14827 $as_echo "no" >&6; }
14828 fi
14829 
14830 
14831           if test "x$NICE" = x; then
14832             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14833           fi
14834         else
14835           # Otherwise we believe it is a complete path. Use it as it is.
14836           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14837 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14838           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14839 $as_echo_n "checking for NICE... " >&6; }
14840           if test ! -x "$tool_specified"; then
14841             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14842 $as_echo "not found" >&6; }
14843             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14844           fi
14845           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14846 $as_echo "$tool_specified" >&6; }
14847         fi
14848       fi
14849     fi
14850 
14851   fi
14852 
14853 
14854 
14855 
14856 # Now we can determine OpenJDK build and target platforms. This is required to
14857 # have early on.
14858 # Make sure we can run config.sub.
14859 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14860   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14861 
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14863 $as_echo_n "checking build system type... " >&6; }
14864 if ${ac_cv_build+:} false; then :
14865   $as_echo_n "(cached) " >&6
14866 else
14867   ac_build_alias=$build_alias
14868 test "x$ac_build_alias" = x &&
14869   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14870 test "x$ac_build_alias" = x &&
14871   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14872 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14873   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14874 
14875 fi
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14877 $as_echo "$ac_cv_build" >&6; }
14878 case $ac_cv_build in
14879 *-*-*) ;;
14880 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14881 esac
14882 build=$ac_cv_build
14883 ac_save_IFS=$IFS; IFS='-'
14884 set x $ac_cv_build
14885 shift
14886 build_cpu=$1
14887 build_vendor=$2
14888 shift; shift
14889 # Remember, the first character of IFS is used to create $*,
14890 # except with old shells:
14891 build_os=$*
14892 IFS=$ac_save_IFS
14893 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14894 
14895 
14896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14897 $as_echo_n "checking host system type... " >&6; }
14898 if ${ac_cv_host+:} false; then :
14899   $as_echo_n "(cached) " >&6
14900 else
14901   if test "x$host_alias" = x; then
14902   ac_cv_host=$ac_cv_build
14903 else
14904   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14905     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14906 fi
14907 
14908 fi
14909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14910 $as_echo "$ac_cv_host" >&6; }
14911 case $ac_cv_host in
14912 *-*-*) ;;
14913 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14914 esac
14915 host=$ac_cv_host
14916 ac_save_IFS=$IFS; IFS='-'
14917 set x $ac_cv_host
14918 shift
14919 host_cpu=$1
14920 host_vendor=$2
14921 shift; shift
14922 # Remember, the first character of IFS is used to create $*,
14923 # except with old shells:
14924 host_os=$*
14925 IFS=$ac_save_IFS
14926 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14927 
14928 
14929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14930 $as_echo_n "checking target system type... " >&6; }
14931 if ${ac_cv_target+:} false; then :
14932   $as_echo_n "(cached) " >&6
14933 else
14934   if test "x$target_alias" = x; then
14935   ac_cv_target=$ac_cv_host
14936 else
14937   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14938     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14939 fi
14940 
14941 fi
14942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14943 $as_echo "$ac_cv_target" >&6; }
14944 case $ac_cv_target in
14945 *-*-*) ;;
14946 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14947 esac
14948 target=$ac_cv_target
14949 ac_save_IFS=$IFS; IFS='-'
14950 set x $ac_cv_target
14951 shift
14952 target_cpu=$1
14953 target_vendor=$2
14954 shift; shift
14955 # Remember, the first character of IFS is used to create $*,
14956 # except with old shells:
14957 target_os=$*
14958 IFS=$ac_save_IFS
14959 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14960 
14961 
14962 # The aliases save the names the user supplied, while $host etc.
14963 # will get canonicalized.
14964 test -n "$target_alias" &&
14965   test "$program_prefix$program_suffix$program_transform_name" = \
14966     NONENONEs,x,x, &&
14967   program_prefix=${target_alias}-
14968 
14969   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14970   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14971   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14972   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14973   # to use the configure naming style.
14974 
14975 
14976 
14977 
14978 
14979   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14980   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14981   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14982   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14983   OPENJDK_TARGET_AUTOCONF_NAME="$host"
14984   OPENJDK_BUILD_AUTOCONF_NAME="$build"
14985 
14986 
14987 
14988   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14989 
14990   case "$build_os" in
14991     *linux*)
14992       VAR_OS=linux
14993       VAR_OS_TYPE=unix
14994       ;;
14995     *solaris*)
14996       VAR_OS=solaris
14997       VAR_OS_TYPE=unix
14998       ;;
14999     *darwin*)
15000       VAR_OS=macosx
15001       VAR_OS_TYPE=unix
15002       ;;
15003     *bsd*)
15004       VAR_OS=bsd
15005       VAR_OS_TYPE=unix
15006       ;;
15007     *cygwin*)
15008       VAR_OS=windows
15009       VAR_OS_ENV=windows.cygwin
15010       ;;
15011     *mingw*)
15012       VAR_OS=windows
15013       VAR_OS_ENV=windows.msys
15014       ;;
15015     *aix*)
15016       VAR_OS=aix
15017       VAR_OS_TYPE=unix
15018       ;;
15019     *)
15020       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15021       ;;
15022   esac
15023 
15024 
15025   # First argument is the cpu name from the trip/quad
15026   case "$build_cpu" in
15027     x86_64)
15028       VAR_CPU=x86_64
15029       VAR_CPU_ARCH=x86
15030       VAR_CPU_BITS=64
15031       VAR_CPU_ENDIAN=little
15032       ;;
15033     i?86)
15034       VAR_CPU=x86
15035       VAR_CPU_ARCH=x86
15036       VAR_CPU_BITS=32
15037       VAR_CPU_ENDIAN=little
15038       ;;
15039     arm*)
15040       VAR_CPU=arm
15041       VAR_CPU_ARCH=arm
15042       VAR_CPU_BITS=32
15043       VAR_CPU_ENDIAN=little
15044       ;;
15045     aarch64)
15046       VAR_CPU=aarch64
15047       VAR_CPU_ARCH=aarch64
15048       VAR_CPU_BITS=64
15049       VAR_CPU_ENDIAN=little
15050       ;;
15051     powerpc)
15052       VAR_CPU=ppc
15053       VAR_CPU_ARCH=ppc
15054       VAR_CPU_BITS=32
15055       VAR_CPU_ENDIAN=big
15056       ;;
15057     powerpc64)
15058       VAR_CPU=ppc64
15059       VAR_CPU_ARCH=ppc
15060       VAR_CPU_BITS=64
15061       VAR_CPU_ENDIAN=big
15062       ;;
15063     powerpc64le)
15064       VAR_CPU=ppc64le
15065       VAR_CPU_ARCH=ppc
15066       VAR_CPU_BITS=64
15067       VAR_CPU_ENDIAN=little
15068       ;;
15069     s390)
15070       VAR_CPU=s390
15071       VAR_CPU_ARCH=s390
15072       VAR_CPU_BITS=32
15073       VAR_CPU_ENDIAN=big
15074       ;;
15075     s390x)
15076       VAR_CPU=s390x
15077       VAR_CPU_ARCH=s390
15078       VAR_CPU_BITS=64
15079       VAR_CPU_ENDIAN=big
15080       ;;
15081     sparc)
15082       VAR_CPU=sparc
15083       VAR_CPU_ARCH=sparc
15084       VAR_CPU_BITS=32
15085       VAR_CPU_ENDIAN=big
15086       ;;
15087     sparcv9|sparc64)
15088       VAR_CPU=sparcv9
15089       VAR_CPU_ARCH=sparc
15090       VAR_CPU_BITS=64
15091       VAR_CPU_ENDIAN=big
15092       ;;
15093     *)
15094       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15095       ;;
15096   esac
15097 
15098   # ..and setup our own variables. (Do this explicitely to facilitate searching)
15099   OPENJDK_BUILD_OS="$VAR_OS"
15100   if test "x$VAR_OS_TYPE" != x; then
15101     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15102   else
15103     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15104   fi
15105   if test "x$VAR_OS_ENV" != x; then
15106     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15107   else
15108     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15109   fi
15110   OPENJDK_BUILD_CPU="$VAR_CPU"
15111   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15112   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15113   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15114 
15115 
15116 
15117 
15118 
15119 
15120 
15121 
15122   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15123 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15125 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15126 
15127   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15128 
15129   case "$host_os" in
15130     *linux*)
15131       VAR_OS=linux
15132       VAR_OS_TYPE=unix
15133       ;;
15134     *solaris*)
15135       VAR_OS=solaris
15136       VAR_OS_TYPE=unix
15137       ;;
15138     *darwin*)
15139       VAR_OS=macosx
15140       VAR_OS_TYPE=unix
15141       ;;
15142     *bsd*)
15143       VAR_OS=bsd
15144       VAR_OS_TYPE=unix
15145       ;;
15146     *cygwin*)
15147       VAR_OS=windows
15148       VAR_OS_ENV=windows.cygwin
15149       ;;
15150     *mingw*)
15151       VAR_OS=windows
15152       VAR_OS_ENV=windows.msys
15153       ;;
15154     *aix*)
15155       VAR_OS=aix
15156       VAR_OS_TYPE=unix
15157       ;;
15158     *)
15159       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15160       ;;
15161   esac
15162 
15163 
15164   # First argument is the cpu name from the trip/quad
15165   case "$host_cpu" in
15166     x86_64)
15167       VAR_CPU=x86_64
15168       VAR_CPU_ARCH=x86
15169       VAR_CPU_BITS=64
15170       VAR_CPU_ENDIAN=little
15171       ;;
15172     i?86)
15173       VAR_CPU=x86
15174       VAR_CPU_ARCH=x86
15175       VAR_CPU_BITS=32
15176       VAR_CPU_ENDIAN=little
15177       ;;
15178     arm*)
15179       VAR_CPU=arm
15180       VAR_CPU_ARCH=arm
15181       VAR_CPU_BITS=32
15182       VAR_CPU_ENDIAN=little
15183       ;;
15184     aarch64)
15185       VAR_CPU=aarch64
15186       VAR_CPU_ARCH=aarch64
15187       VAR_CPU_BITS=64
15188       VAR_CPU_ENDIAN=little
15189       ;;
15190     powerpc)
15191       VAR_CPU=ppc
15192       VAR_CPU_ARCH=ppc
15193       VAR_CPU_BITS=32
15194       VAR_CPU_ENDIAN=big
15195       ;;
15196     powerpc64)
15197       VAR_CPU=ppc64
15198       VAR_CPU_ARCH=ppc
15199       VAR_CPU_BITS=64
15200       VAR_CPU_ENDIAN=big
15201       ;;
15202     powerpc64le)
15203       VAR_CPU=ppc64le
15204       VAR_CPU_ARCH=ppc
15205       VAR_CPU_BITS=64
15206       VAR_CPU_ENDIAN=little
15207       ;;
15208     s390)
15209       VAR_CPU=s390
15210       VAR_CPU_ARCH=s390
15211       VAR_CPU_BITS=32
15212       VAR_CPU_ENDIAN=big
15213       ;;
15214     s390x)
15215       VAR_CPU=s390x
15216       VAR_CPU_ARCH=s390
15217       VAR_CPU_BITS=64
15218       VAR_CPU_ENDIAN=big
15219       ;;
15220     sparc)
15221       VAR_CPU=sparc
15222       VAR_CPU_ARCH=sparc
15223       VAR_CPU_BITS=32
15224       VAR_CPU_ENDIAN=big
15225       ;;
15226     sparcv9|sparc64)
15227       VAR_CPU=sparcv9
15228       VAR_CPU_ARCH=sparc
15229       VAR_CPU_BITS=64
15230       VAR_CPU_ENDIAN=big
15231       ;;
15232     *)
15233       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15234       ;;
15235   esac
15236 
15237   # ... and setup our own variables. (Do this explicitely to facilitate searching)
15238   OPENJDK_TARGET_OS="$VAR_OS"
15239   if test "x$VAR_OS_TYPE" != x; then
15240     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15241   else
15242     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15243   fi
15244   if test "x$VAR_OS_ENV" != x; then
15245     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15246   else
15247     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15248   fi
15249   OPENJDK_TARGET_CPU="$VAR_CPU"
15250   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15251   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15252   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15253 
15254 
15255 
15256 
15257 
15258 
15259 
15260 
15261   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15262 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15264 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15265 
15266 
15267 
15268 # Check whether --with-target-bits was given.
15269 if test "${with_target_bits+set}" = set; then :
15270   withval=$with_target_bits;
15271 fi
15272 
15273 
15274   # We have three types of compiles:
15275   # native  == normal compilation, target system == build system
15276   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15277   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15278   #
15279   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15280     # We're doing a proper cross-compilation
15281     COMPILE_TYPE="cross"
15282   else
15283     COMPILE_TYPE="native"
15284   fi
15285 
15286   if test "x$with_target_bits" != x; then
15287     if test "x$COMPILE_TYPE" = "xcross"; then
15288       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15289     fi
15290 
15291     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15292       # A reduced build is requested
15293       COMPILE_TYPE="reduced"
15294       OPENJDK_TARGET_CPU_BITS=32
15295       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15296         OPENJDK_TARGET_CPU=x86
15297       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15298         OPENJDK_TARGET_CPU=sparc
15299       else
15300         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15301       fi
15302     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15303       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
15304     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15305       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15306 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15307     else
15308       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15309     fi
15310   fi
15311 
15312 
15313   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15314 $as_echo_n "checking compilation type... " >&6; }
15315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15316 $as_echo "$COMPILE_TYPE" >&6; }
15317 
15318 
15319   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15320     REQUIRED_OS_NAME=SunOS
15321     REQUIRED_OS_VERSION=5.10
15322   fi
15323   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15324     REQUIRED_OS_NAME=Linux
15325     REQUIRED_OS_VERSION=2.6
15326   fi
15327   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15328     REQUIRED_OS_NAME=Windows
15329     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15330       REQUIRED_OS_VERSION=5.2
15331     else
15332       REQUIRED_OS_VERSION=5.1
15333     fi
15334   fi
15335   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15336     REQUIRED_OS_NAME=Darwin
15337     REQUIRED_OS_VERSION=11.2
15338   fi
15339   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15340     REQUIRED_OS_NAME=AIX
15341     REQUIRED_OS_VERSION=7.1
15342   fi
15343 
15344 
15345 
15346 
15347 
15348 
15349   # Also store the legacy naming of the cpu.
15350   # Ie i586 and amd64 instead of x86 and x86_64
15351   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15352   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15353     OPENJDK_TARGET_CPU_LEGACY="i586"
15354   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15355     # On all platforms except MacOSX replace x86_64 with amd64.
15356     OPENJDK_TARGET_CPU_LEGACY="amd64"
15357   fi
15358 
15359 
15360   # And the second legacy naming of the cpu.
15361   # Ie i386 and amd64 instead of x86 and x86_64.
15362   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15363   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15364     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15365   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15366     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15367   fi
15368 
15369 
15370   # This is the name of the cpu (but using i386 and amd64 instead of
15371   # x86 and x86_64, respectively), preceeded by a /, to be used when
15372   # locating libraries. On macosx, it's empty, though.
15373   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15374   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15375     OPENJDK_TARGET_CPU_LIBDIR=""
15376   fi
15377 
15378 
15379   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15380   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15381   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15382   OPENJDK_TARGET_CPU_ISADIR=""
15383   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15384     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15385       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15386     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15387       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15388     fi
15389   fi
15390 
15391 
15392   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15393   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15394   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15395     # On linux only, we replace x86 with i386.
15396     OPENJDK_TARGET_CPU_OSARCH="i386"
15397   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15398     # On all platforms except macosx, we replace x86_64 with amd64.
15399     OPENJDK_TARGET_CPU_OSARCH="amd64"
15400   fi
15401 
15402 
15403   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15404   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15405     OPENJDK_TARGET_CPU_JLI="i386"
15406   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15407     # On all platforms except macosx, we replace x86_64 with amd64.
15408     OPENJDK_TARGET_CPU_JLI="amd64"
15409   fi
15410   # Now setup the -D flags for building libjli.
15411   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15412   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15413     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15414       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15415     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15416       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15417     fi
15418   fi
15419 
15420 
15421   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15422       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15423   else
15424       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15425   fi
15426 
15427 
15428   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15429     A_LP64="LP64:="
15430     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15431     # unpack200.exe
15432     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15433       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15434     fi
15435   fi
15436   LP64=$A_LP64
15437 
15438 
15439   if test "x$COMPILE_TYPE" = "xcross"; then
15440     # FIXME: ... or should this include reduced builds..?
15441     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15442   else
15443     DEFINE_CROSS_COMPILE_ARCH=""
15444   fi
15445 
15446 
15447   # Convert openjdk platform names to hotspot names
15448 
15449   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15450   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15451     HOTSPOT_TARGET_OS=bsd
15452   fi
15453 
15454 
15455   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15456   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15457     HOTSPOT_TARGET_OS_TYPE=posix
15458   fi
15459 
15460 
15461   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15462   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15463     HOTSPOT_TARGET_CPU=x86_32
15464   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15465     HOTSPOT_TARGET_CPU=sparc
15466   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15467     HOTSPOT_TARGET_CPU=ppc_64
15468   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15469     HOTSPOT_TARGET_CPU=ppc_64
15470   fi
15471 
15472 
15473   # This is identical with OPENJDK_*, but define anyway for consistency.
15474   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15475 
15476 
15477   # Setup HOTSPOT_TARGET_CPU_DEFINE
15478   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15479     HOTSPOT_TARGET_CPU_DEFINE=IA32
15480   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15481     HOTSPOT_TARGET_CPU_DEFINE=AMD64
15482   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15483     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15484   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15485     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15486   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15487     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15488   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15489     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15490 
15491   # The cpu defines below are for zero, we don't support them directly.
15492   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15493     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15494   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15495     HOTSPOT_TARGET_CPU_DEFINE=PPC32
15496   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15497     HOTSPOT_TARGET_CPU_DEFINE=S390
15498   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15499     HOTSPOT_TARGET_CPU_DEFINE=S390
15500   fi
15501 
15502 
15503 
15504 
15505   # Also store the legacy naming of the cpu.
15506   # Ie i586 and amd64 instead of x86 and x86_64
15507   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15508   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15509     OPENJDK_BUILD_CPU_LEGACY="i586"
15510   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15511     # On all platforms except MacOSX replace x86_64 with amd64.
15512     OPENJDK_BUILD_CPU_LEGACY="amd64"
15513   fi
15514 
15515 
15516   # And the second legacy naming of the cpu.
15517   # Ie i386 and amd64 instead of x86 and x86_64.
15518   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15519   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15520     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15521   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15522     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15523   fi
15524 
15525 
15526   # This is the name of the cpu (but using i386 and amd64 instead of
15527   # x86 and x86_64, respectively), preceeded by a /, to be used when
15528   # locating libraries. On macosx, it's empty, though.
15529   OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15530   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15531     OPENJDK_BUILD_CPU_LIBDIR=""
15532   fi
15533 
15534 
15535   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15536   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15537   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15538   OPENJDK_BUILD_CPU_ISADIR=""
15539   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15540     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15541       OPENJDK_BUILD_CPU_ISADIR="/amd64"
15542     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15543       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15544     fi
15545   fi
15546 
15547 
15548   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15549   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15550   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15551     # On linux only, we replace x86 with i386.
15552     OPENJDK_BUILD_CPU_OSARCH="i386"
15553   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15554     # On all platforms except macosx, we replace x86_64 with amd64.
15555     OPENJDK_BUILD_CPU_OSARCH="amd64"
15556   fi
15557 
15558 
15559   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15560   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15561     OPENJDK_BUILD_CPU_JLI="i386"
15562   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15563     # On all platforms except macosx, we replace x86_64 with amd64.
15564     OPENJDK_BUILD_CPU_JLI="amd64"
15565   fi
15566   # Now setup the -D flags for building libjli.
15567   OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15568   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15569     if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15570       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15571     elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15572       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15573     fi
15574   fi
15575 
15576 
15577   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15578       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15579   else
15580       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15581   fi
15582 
15583 
15584   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15585     A_LP64="LP64:="
15586     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15587     # unpack200.exe
15588     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15589       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15590     fi
15591   fi
15592   LP64=$A_LP64
15593 
15594 
15595   if test "x$COMPILE_TYPE" = "xcross"; then
15596     # FIXME: ... or should this include reduced builds..?
15597     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15598   else
15599     DEFINE_CROSS_COMPILE_ARCH=""
15600   fi
15601 
15602 
15603   # Convert openjdk platform names to hotspot names
15604 
15605   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15606   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15607     HOTSPOT_BUILD_OS=bsd
15608   fi
15609 
15610 
15611   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15612   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15613     HOTSPOT_BUILD_OS_TYPE=posix
15614   fi
15615 
15616 
15617   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15618   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15619     HOTSPOT_BUILD_CPU=x86_32
15620   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15621     HOTSPOT_BUILD_CPU=sparc
15622   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15623     HOTSPOT_BUILD_CPU=ppc_64
15624   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15625     HOTSPOT_BUILD_CPU=ppc_64
15626   fi
15627 
15628 
15629   # This is identical with OPENJDK_*, but define anyway for consistency.
15630   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15631 
15632 
15633   # Setup HOTSPOT_BUILD_CPU_DEFINE
15634   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15635     HOTSPOT_BUILD_CPU_DEFINE=IA32
15636   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15637     HOTSPOT_BUILD_CPU_DEFINE=AMD64
15638   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15639     HOTSPOT_BUILD_CPU_DEFINE=SPARC
15640   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15641     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15642   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15643     HOTSPOT_BUILD_CPU_DEFINE=PPC64
15644   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15645     HOTSPOT_BUILD_CPU_DEFINE=PPC64
15646 
15647   # The cpu defines below are for zero, we don't support them directly.
15648   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15649     HOTSPOT_BUILD_CPU_DEFINE=SPARC
15650   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15651     HOTSPOT_BUILD_CPU_DEFINE=PPC32
15652   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15653     HOTSPOT_BUILD_CPU_DEFINE=S390
15654   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
15655     HOTSPOT_BUILD_CPU_DEFINE=S390
15656   fi
15657 
15658 
15659 
15660 
15661   # ZERO_ARCHDEF is used to enable architecture-specific code.
15662   # This is used in legacy hotspot build.
15663   ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15664 
15665 
15666 
15667 
15668 
15669 # Continue setting up basic stuff. Most remaining code require fundamental tools.
15670 
15671   # Save the current directory this script was started from
15672   CURDIR="$PWD"
15673 
15674   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15675   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15676   # was not available at that time.
15677   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15678   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15679     ORIGINAL_PATH="$REWRITTEN_PATH"
15680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15681 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15682   fi
15683 
15684   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15685     PATH_SEP=";"
15686 
15687   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15688   if test $SRC_ROOT_LENGTH -gt 100; then
15689     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15690   fi
15691 
15692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15693     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15694 $as_echo_n "checking cygwin release... " >&6; }
15695     CYGWIN_VERSION=`$UNAME -r`
15696     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15697 $as_echo "$CYGWIN_VERSION" >&6; }
15698     WINDOWS_ENV_VENDOR='cygwin'
15699     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15700 
15701     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15702     if test "x$CYGWIN_VERSION_OLD" != x; then
15703       { $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
15704 $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;}
15705       as_fn_error $? "Cannot continue" "$LINENO" 5
15706     fi
15707     if test "x$CYGPATH" = x; then
15708       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15709     fi
15710     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15711 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15712     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15713     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15714     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15715     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15716     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15717 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
15718     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15719     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15720     if test "x$test_cygdrive_prefix" = x; then
15721       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15722     fi
15723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15724     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15725 $as_echo_n "checking msys release... " >&6; }
15726     MSYS_VERSION=`$UNAME -r`
15727     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15728 $as_echo "$MSYS_VERSION" >&6; }
15729 
15730     WINDOWS_ENV_VENDOR='msys'
15731     WINDOWS_ENV_VERSION="$MSYS_VERSION"
15732 
15733     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15734 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
15735     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15736     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15737 
15738   windows_path="$MSYS_ROOT_PATH"
15739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15740     unix_path=`$CYGPATH -u "$windows_path"`
15741     MSYS_ROOT_PATH="$unix_path"
15742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15744     MSYS_ROOT_PATH="$unix_path"
15745   fi
15746 
15747     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15748 $as_echo "$MSYS_ROOT_PATH" >&6; }
15749     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15750   else
15751     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15752   fi
15753 
15754   # Test if windows or unix (cygwin/msys) find is first in path.
15755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15756 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15757   FIND_BINARY_OUTPUT=`find --version 2>&1`
15758   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15759     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15760 $as_echo "unix style" >&6; }
15761   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15762     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15763 $as_echo "Windows" >&6; }
15764     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15765 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15766     { $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
15767 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15768     as_fn_error $? "Cannot continue" "$LINENO" 5
15769   else
15770     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15771 $as_echo "unknown" >&6; }
15772     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15773 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15774   fi
15775 
15776   else
15777     PATH_SEP=":"
15778   fi
15779 
15780 
15781   # We get the top-level directory from the supporting wrappers.
15782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15783 $as_echo_n "checking for top-level directory... " >&6; }
15784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15785 $as_echo "$TOPDIR" >&6; }
15786 
15787 
15788   # Save the original version of TOPDIR for string comparisons
15789   ORIGINAL_TOPDIR="$TOPDIR"
15790 
15791 
15792   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15793 
15794   # Only process if variable expands to non-empty
15795 
15796   if test "x$CURDIR" != x; then
15797     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15798 
15799   # Input might be given as Windows format, start by converting to
15800   # unix format.
15801   path="$CURDIR"
15802   new_path=`$CYGPATH -u "$path"`
15803 
15804   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15805   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15806   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15807   # "foo.exe" is OK but "foo" is an error.
15808   #
15809   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15810   # It is also a way to make sure we got the proper file name for the real test later on.
15811   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15812   if test "x$test_shortpath" = x; then
15813     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15814 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15815     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15816   fi
15817 
15818   # Call helper function which possibly converts this using DOS-style short mode.
15819   # If so, the updated path is stored in $new_path.
15820 
15821   input_path="$new_path"
15822   # Check if we need to convert this using DOS-style short mode. If the path
15823   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15824   # take no chances and rewrite it.
15825   # Note: m4 eats our [], so we need to use [ and ] instead.
15826   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15827   if test "x$has_forbidden_chars" != x; then
15828     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15829     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15830     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15831     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15832       # Going to short mode and back again did indeed matter. Since short mode is
15833       # case insensitive, let's make it lowercase to improve readability.
15834       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15835       # Now convert it back to Unix-style (cygpath)
15836       input_path=`$CYGPATH -u "$shortmode_path"`
15837       new_path="$input_path"
15838     fi
15839   fi
15840 
15841   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15842   if test "x$test_cygdrive_prefix" = x; then
15843     # As a simple fix, exclude /usr/bin since it's not a real path.
15844     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15845       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15846       # a path prefixed by /cygdrive for fixpath to work.
15847       new_path="$CYGWIN_ROOT_PATH$input_path"
15848     fi
15849   fi
15850 
15851 
15852   if test "x$path" != "x$new_path"; then
15853     CURDIR="$new_path"
15854     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15855 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15856   fi
15857 
15858     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15859 
15860   path="$CURDIR"
15861   has_colon=`$ECHO $path | $GREP ^.:`
15862   new_path="$path"
15863   if test "x$has_colon" = x; then
15864     # Not in mixed or Windows style, start by that.
15865     new_path=`cmd //c echo $path`
15866   fi
15867 
15868 
15869   input_path="$new_path"
15870   # Check if we need to convert this using DOS-style short mode. If the path
15871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15872   # take no chances and rewrite it.
15873   # Note: m4 eats our [], so we need to use [ and ] instead.
15874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15875   if test "x$has_forbidden_chars" != x; then
15876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15877     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15878   fi
15879 
15880 
15881   windows_path="$new_path"
15882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15883     unix_path=`$CYGPATH -u "$windows_path"`
15884     new_path="$unix_path"
15885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15887     new_path="$unix_path"
15888   fi
15889 
15890   if test "x$path" != "x$new_path"; then
15891     CURDIR="$new_path"
15892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15893 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15894   fi
15895 
15896   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15897   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15898 
15899     else
15900       # We're on a unix platform. Hooray! :)
15901       path="$CURDIR"
15902       has_space=`$ECHO "$path" | $GREP " "`
15903       if test "x$has_space" != x; then
15904         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15905 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15906         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15907       fi
15908 
15909       # Use eval to expand a potential ~
15910       eval path="$path"
15911       if test ! -f "$path" && test ! -d "$path"; then
15912         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15913       fi
15914 
15915       if test -d "$path"; then
15916         CURDIR="`cd "$path"; $THEPWDCMD -L`"
15917       else
15918         dir="`$DIRNAME "$path"`"
15919         base="`$BASENAME "$path"`"
15920         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15921       fi
15922     fi
15923   fi
15924 
15925 
15926   # Only process if variable expands to non-empty
15927 
15928   if test "x$TOPDIR" != x; then
15929     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15930 
15931   # Input might be given as Windows format, start by converting to
15932   # unix format.
15933   path="$TOPDIR"
15934   new_path=`$CYGPATH -u "$path"`
15935 
15936   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15937   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15938   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15939   # "foo.exe" is OK but "foo" is an error.
15940   #
15941   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15942   # It is also a way to make sure we got the proper file name for the real test later on.
15943   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15944   if test "x$test_shortpath" = x; then
15945     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15946 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15947     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15948   fi
15949 
15950   # Call helper function which possibly converts this using DOS-style short mode.
15951   # If so, the updated path is stored in $new_path.
15952 
15953   input_path="$new_path"
15954   # Check if we need to convert this using DOS-style short mode. If the path
15955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15956   # take no chances and rewrite it.
15957   # Note: m4 eats our [], so we need to use [ and ] instead.
15958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15959   if test "x$has_forbidden_chars" != x; then
15960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15961     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15962     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15963     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15964       # Going to short mode and back again did indeed matter. Since short mode is
15965       # case insensitive, let's make it lowercase to improve readability.
15966       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15967       # Now convert it back to Unix-style (cygpath)
15968       input_path=`$CYGPATH -u "$shortmode_path"`
15969       new_path="$input_path"
15970     fi
15971   fi
15972 
15973   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15974   if test "x$test_cygdrive_prefix" = x; then
15975     # As a simple fix, exclude /usr/bin since it's not a real path.
15976     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15977       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15978       # a path prefixed by /cygdrive for fixpath to work.
15979       new_path="$CYGWIN_ROOT_PATH$input_path"
15980     fi
15981   fi
15982 
15983 
15984   if test "x$path" != "x$new_path"; then
15985     TOPDIR="$new_path"
15986     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15987 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15988   fi
15989 
15990     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15991 
15992   path="$TOPDIR"
15993   has_colon=`$ECHO $path | $GREP ^.:`
15994   new_path="$path"
15995   if test "x$has_colon" = x; then
15996     # Not in mixed or Windows style, start by that.
15997     new_path=`cmd //c echo $path`
15998   fi
15999 
16000 
16001   input_path="$new_path"
16002   # Check if we need to convert this using DOS-style short mode. If the path
16003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16004   # take no chances and rewrite it.
16005   # Note: m4 eats our [], so we need to use [ and ] instead.
16006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16007   if test "x$has_forbidden_chars" != x; then
16008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16009     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16010   fi
16011 
16012 
16013   windows_path="$new_path"
16014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16015     unix_path=`$CYGPATH -u "$windows_path"`
16016     new_path="$unix_path"
16017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16019     new_path="$unix_path"
16020   fi
16021 
16022   if test "x$path" != "x$new_path"; then
16023     TOPDIR="$new_path"
16024     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16025 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16026   fi
16027 
16028   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16029   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16030 
16031     else
16032       # We're on a unix platform. Hooray! :)
16033       path="$TOPDIR"
16034       has_space=`$ECHO "$path" | $GREP " "`
16035       if test "x$has_space" != x; then
16036         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16037 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16038         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16039       fi
16040 
16041       # Use eval to expand a potential ~
16042       eval path="$path"
16043       if test ! -f "$path" && test ! -d "$path"; then
16044         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16045       fi
16046 
16047       if test -d "$path"; then
16048         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16049       else
16050         dir="`$DIRNAME "$path"`"
16051         base="`$BASENAME "$path"`"
16052         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16053       fi
16054     fi
16055   fi
16056 
16057   # SRC_ROOT is a traditional alias for TOPDIR.
16058   SRC_ROOT=$TOPDIR
16059 
16060   # Calculate a canonical version of TOPDIR for string comparisons
16061   CANONICAL_TOPDIR=$TOPDIR
16062 
16063   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16064     # Follow a chain of symbolic links. Use readlink
16065     # where it exists, else fall back to horribly
16066     # complicated shell code.
16067     if test "x$READLINK_TESTED" != yes; then
16068       # On MacOSX there is a readlink tool with a different
16069       # purpose than the GNU readlink tool. Check the found readlink.
16070       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16071       if test "x$ISGNU" = x; then
16072         # A readlink that we do not know how to use.
16073         # Are there other non-GNU readlinks out there?
16074         READLINK_TESTED=yes
16075         READLINK=
16076       fi
16077     fi
16078 
16079     if test "x$READLINK" != x; then
16080       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16081     else
16082       # Save the current directory for restoring afterwards
16083       STARTDIR=$PWD
16084       COUNTER=0
16085       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16086       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16087       cd $sym_link_dir
16088       # Use -P flag to resolve symlinks in directories.
16089       cd `$THEPWDCMD -P`
16090       sym_link_dir=`$THEPWDCMD -P`
16091       # Resolve file symlinks
16092       while test $COUNTER -lt 20; do
16093         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16094         if test "x$ISLINK" == x; then
16095           # This is not a symbolic link! We are done!
16096           break
16097         fi
16098         # Again resolve directory symlinks since the target of the just found
16099         # link could be in a different directory
16100         cd `$DIRNAME $ISLINK`
16101         sym_link_dir=`$THEPWDCMD -P`
16102         sym_link_file=`$BASENAME $ISLINK`
16103         let COUNTER=COUNTER+1
16104       done
16105       cd $STARTDIR
16106       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16107     fi
16108   fi
16109 
16110 
16111 
16112   # Locate the directory of this script.
16113   AUTOCONF_DIR=$TOPDIR/common/autoconf
16114 
16115   # Setup username (for use in adhoc version strings etc)
16116   # Outer [ ] to quote m4.
16117    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16118 
16119 
16120 
16121 # Check if it's a pure open build or if custom sources are to be used.
16122 
16123   # Check whether --enable-openjdk-only was given.
16124 if test "${enable_openjdk_only+set}" = set; then :
16125   enableval=$enable_openjdk_only;
16126 else
16127   enable_openjdk_only="no"
16128 fi
16129 
16130 
16131   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16132 $as_echo_n "checking for presence of closed sources... " >&6; }
16133   if test -d "$SRC_ROOT/jdk/src/closed"; then
16134     CLOSED_SOURCE_PRESENT=yes
16135   else
16136     CLOSED_SOURCE_PRESENT=no
16137   fi
16138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16139 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16140 
16141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16142 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16143   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16145 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16146 
16147   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16148     OPENJDK=true
16149     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16150       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16151 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16152     fi
16153   else
16154     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16155       OPENJDK=true
16156     else
16157       OPENJDK=false
16158     fi
16159   fi
16160 
16161   if test "x$OPENJDK" = "xtrue"; then
16162     SET_OPENJDK="OPENJDK=true"
16163   fi
16164 
16165 
16166 
16167   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16168   # the IncludeCustomExtension macro.
16169 
16170 
16171 # Check whether --with-custom-make-dir was given.
16172 if test "${with_custom_make_dir+set}" = set; then :
16173   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
16174 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16175 fi
16176 
16177 
16178 
16179 
16180 # These are needed to be able to create a configuration name (and thus the output directory)
16181 
16182   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16183 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16184 
16185 # Check whether --with-jdk-variant was given.
16186 if test "${with_jdk_variant+set}" = set; then :
16187   withval=$with_jdk_variant;
16188 fi
16189 
16190 
16191   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16192     JDK_VARIANT="normal"
16193   else
16194     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16195   fi
16196 
16197 
16198 
16199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16200 $as_echo "$JDK_VARIANT" >&6; }
16201 
16202 
16203   DEBUG_LEVEL="release"
16204   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16205 $as_echo_n "checking which debug level to use... " >&6; }
16206   # Check whether --enable-debug was given.
16207 if test "${enable_debug+set}" = set; then :
16208   enableval=$enable_debug;
16209         ENABLE_DEBUG="${enableval}"
16210         DEBUG_LEVEL="fastdebug"
16211 
16212 else
16213   ENABLE_DEBUG="no"
16214 fi
16215 
16216 
16217 
16218 # Check whether --with-debug-level was given.
16219 if test "${with_debug_level+set}" = set; then :
16220   withval=$with_debug_level;
16221         DEBUG_LEVEL="${withval}"
16222         if test "x$ENABLE_DEBUG" = xyes; then
16223           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16224         fi
16225 
16226 fi
16227 
16228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16229 $as_echo "$DEBUG_LEVEL" >&6; }
16230 
16231   if test "x$DEBUG_LEVEL" != xrelease && \
16232       test "x$DEBUG_LEVEL" != xoptimized && \
16233       test "x$DEBUG_LEVEL" != xfastdebug && \
16234       test "x$DEBUG_LEVEL" != xslowdebug; then
16235     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16236   fi
16237 
16238   # Translate DEBUG_LEVEL to debug level used by Hotspot
16239   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16240   if test "x$DEBUG_LEVEL" = xrelease; then
16241     HOTSPOT_DEBUG_LEVEL="product"
16242   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16243     HOTSPOT_DEBUG_LEVEL="debug"
16244   fi
16245 
16246   if test "x$DEBUG_LEVEL" = xoptimized; then
16247     # The debug level 'optimized' is a little special because it is currently only
16248     # applicable to the HotSpot build where it means to build a completely
16249     # optimized version of the VM without any debugging code (like for the
16250     # 'release' debug level which is called 'product' in the HotSpot build) but
16251     # with the exception that it can contain additional code which is otherwise
16252     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16253     # test new and/or experimental features which are not intended for customer
16254     # shipment. Because these new features need to be tested and benchmarked in
16255     # real world scenarios, we want to build the containing JDK at the 'release'
16256     # debug level.
16257     DEBUG_LEVEL="release"
16258   fi
16259 
16260 
16261 
16262 
16263 
16264 
16265 # Check whether --with-jvm-variants was given.
16266 if test "${with_jvm_variants+set}" = set; then :
16267   withval=$with_jvm_variants;
16268 fi
16269 
16270 
16271   if test "x$with_jvm_variants" = x; then
16272     with_jvm_variants="server"
16273   fi
16274   JVM_VARIANTS_OPT="$with_jvm_variants"
16275 
16276   # Has the user listed more than one variant?
16277   # Additional [] needed to keep m4 from mangling shell constructs.
16278   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16279     BUILDING_MULTIPLE_JVM_VARIANTS=true
16280   else
16281     BUILDING_MULTIPLE_JVM_VARIANTS=false
16282   fi
16283   # Replace the commas with AND for use in the build directory name.
16284   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16285 
16286   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16287 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16288   # JVM_VARIANTS is a space-separated list.
16289   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16290   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16292 $as_echo "$JVM_VARIANTS" >&6; }
16293 
16294   # Check that the selected variants are valid
16295 
16296   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16297   INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16298   if test "x$INVALID_VARIANTS" != x; then
16299     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16300 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16301     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16302   fi
16303 
16304   # All "special" variants share the same output directory ("server")
16305   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16306   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16307   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16308     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16309   fi
16310 
16311 
16312 
16313 
16314   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16315     # zero behaves as a platform and rewrites these values. This is really weird. :(
16316     # We are guaranteed that we do not build any other variants when building zero.
16317     HOTSPOT_TARGET_CPU=zero
16318     HOTSPOT_TARGET_CPU_ARCH=zero
16319   fi
16320 
16321 
16322 # With basic setup done, call the custom early hook.
16323 
16324 
16325 # Check if we have devkits, extra paths or sysroot set.
16326 
16327 
16328 # Check whether --with-devkit was given.
16329 if test "${with_devkit+set}" = set; then :
16330   withval=$with_devkit;
16331 
16332   # Only process if variable expands to non-empty
16333 
16334   if test "x$with_devkit" != x; then
16335     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16336 
16337   # Input might be given as Windows format, start by converting to
16338   # unix format.
16339   path="$with_devkit"
16340   new_path=`$CYGPATH -u "$path"`
16341 
16342   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16343   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16344   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16345   # "foo.exe" is OK but "foo" is an error.
16346   #
16347   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16348   # It is also a way to make sure we got the proper file name for the real test later on.
16349   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16350   if test "x$test_shortpath" = x; then
16351     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16352 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16353     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16354   fi
16355 
16356   # Call helper function which possibly converts this using DOS-style short mode.
16357   # If so, the updated path is stored in $new_path.
16358 
16359   input_path="$new_path"
16360   # Check if we need to convert this using DOS-style short mode. If the path
16361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16362   # take no chances and rewrite it.
16363   # Note: m4 eats our [], so we need to use [ and ] instead.
16364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16365   if test "x$has_forbidden_chars" != x; then
16366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16367     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16368     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16369     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16370       # Going to short mode and back again did indeed matter. Since short mode is
16371       # case insensitive, let's make it lowercase to improve readability.
16372       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16373       # Now convert it back to Unix-style (cygpath)
16374       input_path=`$CYGPATH -u "$shortmode_path"`
16375       new_path="$input_path"
16376     fi
16377   fi
16378 
16379   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16380   if test "x$test_cygdrive_prefix" = x; then
16381     # As a simple fix, exclude /usr/bin since it's not a real path.
16382     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16383       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16384       # a path prefixed by /cygdrive for fixpath to work.
16385       new_path="$CYGWIN_ROOT_PATH$input_path"
16386     fi
16387   fi
16388 
16389 
16390   if test "x$path" != "x$new_path"; then
16391     with_devkit="$new_path"
16392     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16393 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16394   fi
16395 
16396     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16397 
16398   path="$with_devkit"
16399   has_colon=`$ECHO $path | $GREP ^.:`
16400   new_path="$path"
16401   if test "x$has_colon" = x; then
16402     # Not in mixed or Windows style, start by that.
16403     new_path=`cmd //c echo $path`
16404   fi
16405 
16406 
16407   input_path="$new_path"
16408   # Check if we need to convert this using DOS-style short mode. If the path
16409   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16410   # take no chances and rewrite it.
16411   # Note: m4 eats our [], so we need to use [ and ] instead.
16412   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16413   if test "x$has_forbidden_chars" != x; then
16414     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16415     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16416   fi
16417 
16418 
16419   windows_path="$new_path"
16420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16421     unix_path=`$CYGPATH -u "$windows_path"`
16422     new_path="$unix_path"
16423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16424     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16425     new_path="$unix_path"
16426   fi
16427 
16428   if test "x$path" != "x$new_path"; then
16429     with_devkit="$new_path"
16430     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16431 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16432   fi
16433 
16434   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16435   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16436 
16437     else
16438       # We're on a unix platform. Hooray! :)
16439       path="$with_devkit"
16440       has_space=`$ECHO "$path" | $GREP " "`
16441       if test "x$has_space" != x; then
16442         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16443 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16444         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16445       fi
16446 
16447       # Use eval to expand a potential ~
16448       eval path="$path"
16449       if test ! -f "$path" && test ! -d "$path"; then
16450         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16451       fi
16452 
16453       if test -d "$path"; then
16454         with_devkit="`cd "$path"; $THEPWDCMD -L`"
16455       else
16456         dir="`$DIRNAME "$path"`"
16457         base="`$BASENAME "$path"`"
16458         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16459       fi
16460     fi
16461   fi
16462 
16463         DEVKIT_ROOT="$with_devkit"
16464         # Check for a meta data info file in the root of the devkit
16465         if test -f "$DEVKIT_ROOT/devkit.info"; then
16466           . $DEVKIT_ROOT/devkit.info
16467           # This potentially sets the following:
16468           # A descriptive name of the devkit
16469 
16470   if test "x$DEVKIT_NAME" = x; then
16471     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16472   fi
16473 
16474           # Corresponds to --with-extra-path
16475 
16476   if test "x$DEVKIT_EXTRA_PATH" = x; then
16477     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16478   fi
16479 
16480           # Corresponds to --with-toolchain-path
16481 
16482   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16483     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16484   fi
16485 
16486           # Corresponds to --with-sysroot
16487 
16488   if test "x$DEVKIT_SYSROOT" = x; then
16489     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16490   fi
16491 
16492 
16493           # Identifies the Visual Studio version in the devkit
16494 
16495   if test "x$DEVKIT_VS_VERSION" = x; then
16496     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16497   fi
16498 
16499           # The Visual Studio include environment variable
16500 
16501   if test "x$DEVKIT_VS_INCLUDE" = x; then
16502     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16503   fi
16504 
16505           # The Visual Studio lib environment variable
16506 
16507   if test "x$DEVKIT_VS_LIB" = x; then
16508     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16509   fi
16510 
16511           # Corresponds to --with-msvcr-dll
16512 
16513   if test "x$DEVKIT_MSVCR_DLL" = x; then
16514     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16515   fi
16516 
16517           # Corresponds to --with-msvcp-dll
16518 
16519   if test "x$DEVKIT_MSVCP_DLL" = x; then
16520     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16521   fi
16522 
16523         fi
16524 
16525         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16526 $as_echo_n "checking for devkit... " >&6; }
16527         if test "x$DEVKIT_NAME" != x; then
16528           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16529 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16530         else
16531           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16532 $as_echo "$DEVKIT_ROOT" >&6; }
16533         fi
16534 
16535 
16536   if test "x$DEVKIT_EXTRA_PATH" != x; then
16537     if test "x$EXTRA_PATH" = x; then
16538       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16539     else
16540       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16541     fi
16542   fi
16543 
16544 
16545         # Fallback default of just /bin if DEVKIT_PATH is not defined
16546         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16547           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16548         fi
16549 
16550   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16551     if test "x$TOOLCHAIN_PATH" = x; then
16552       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16553     else
16554       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16555     fi
16556   fi
16557 
16558 
16559         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16560         # places for backwards compatiblity.
16561         if test "x$DEVKIT_SYSROOT" != x; then
16562           SYSROOT="$DEVKIT_SYSROOT"
16563         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16564           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16565         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16566           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16567         fi
16568 
16569 
16570 fi
16571 
16572 
16573   # You can force the sysroot if the sysroot encoded into the compiler tools
16574   # is not correct.
16575 
16576 # Check whether --with-sys-root was given.
16577 if test "${with_sys_root+set}" = set; then :
16578   withval=$with_sys_root; SYSROOT=$with_sys_root
16579 
16580 fi
16581 
16582 
16583 
16584 # Check whether --with-sysroot was given.
16585 if test "${with_sysroot+set}" = set; then :
16586   withval=$with_sysroot; SYSROOT=$with_sysroot
16587 
16588 fi
16589 
16590 
16591 
16592 # Check whether --with-tools-dir was given.
16593 if test "${with_tools_dir+set}" = set; then :
16594   withval=$with_tools_dir;
16595   if test "x$with_tools_dir" != x; then
16596     if test "x$TOOLCHAIN_PATH" = x; then
16597       TOOLCHAIN_PATH="$with_tools_dir"
16598     else
16599       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16600     fi
16601   fi
16602 
16603 
16604 fi
16605 
16606 
16607 
16608 # Check whether --with-toolchain-path was given.
16609 if test "${with_toolchain_path+set}" = set; then :
16610   withval=$with_toolchain_path;
16611   if test "x$with_toolchain_path" != x; then
16612     if test "x$TOOLCHAIN_PATH" = x; then
16613       TOOLCHAIN_PATH="$with_toolchain_path"
16614     else
16615       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16616     fi
16617   fi
16618 
16619 
16620 fi
16621 
16622 
16623 
16624 # Check whether --with-extra-path was given.
16625 if test "${with_extra_path+set}" = set; then :
16626   withval=$with_extra_path;
16627   if test "x$with_extra_path" != x; then
16628     if test "x$EXTRA_PATH" = x; then
16629       EXTRA_PATH="$with_extra_path"
16630     else
16631       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16632     fi
16633   fi
16634 
16635 
16636 fi
16637 
16638 
16639   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16640     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16641     # If not, detect if Xcode is installed by running xcodebuild -version
16642     # if no Xcode installed, xcodebuild exits with 1
16643     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16644     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16645       # We need to use xcodebuild in the toolchain dir provided by the user, this will
16646       # fall back on the stub binary in /usr/bin/xcodebuild
16647       # Extract the first word of "xcodebuild", so it can be a program name with args.
16648 set dummy xcodebuild; ac_word=$2
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16650 $as_echo_n "checking for $ac_word... " >&6; }
16651 if ${ac_cv_path_XCODEBUILD+:} false; then :
16652   $as_echo_n "(cached) " >&6
16653 else
16654   case $XCODEBUILD in
16655   [\\/]* | ?:[\\/]*)
16656   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16657   ;;
16658   *)
16659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16660 for as_dir in $TOOLCHAIN_PATH
16661 do
16662   IFS=$as_save_IFS
16663   test -z "$as_dir" && as_dir=.
16664     for ac_exec_ext in '' $ac_executable_extensions; do
16665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16666     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16668     break 2
16669   fi
16670 done
16671   done
16672 IFS=$as_save_IFS
16673 
16674   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16675   ;;
16676 esac
16677 fi
16678 XCODEBUILD=$ac_cv_path_XCODEBUILD
16679 if test -n "$XCODEBUILD"; then
16680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16681 $as_echo "$XCODEBUILD" >&6; }
16682 else
16683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16684 $as_echo "no" >&6; }
16685 fi
16686 
16687 
16688     else
16689       # this should result in SYSROOT being empty, unless --with-sysroot is provided
16690       # when only the command line tools are installed there are no SDKs, so headers
16691       # are copied into the system frameworks
16692       XCODEBUILD=
16693 
16694     fi
16695 
16696     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16697 $as_echo_n "checking for sdk name... " >&6; }
16698 
16699 # Check whether --with-sdk-name was given.
16700 if test "${with_sdk_name+set}" = set; then :
16701   withval=$with_sdk_name; SDKNAME=$with_sdk_name
16702 
16703 fi
16704 
16705     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16706 $as_echo "$SDKNAME" >&6; }
16707 
16708     # if toolchain path is specified then don't rely on system headers, they may not compile
16709     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16710     test -z "$TOOLCHAIN_PATH" && \
16711       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16712 
16713     if test -z "$SYSROOT"; then
16714       if test -n "$XCODEBUILD"; then
16715         # if we don't have system headers, use default SDK name (last resort)
16716         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16717           SDKNAME=${SDKNAME:-macosx}
16718         fi
16719 
16720         if test -n "$SDKNAME"; then
16721           # Call xcodebuild to determine SYSROOT
16722           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16723         fi
16724       else
16725         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16726           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
16727         fi
16728       fi
16729     else
16730       # warn user if --with-sdk-name was also set
16731       if test -n "$with_sdk_name"; then
16732         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16733 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16734       fi
16735     fi
16736 
16737     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16738       # If no system framework headers, then SYSROOT must be set, or we won't build
16739       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
16740     fi
16741 
16742     # Perform a basic sanity test
16743     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16744       if test -z "$SYSROOT"; then
16745         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
16746       else
16747         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16748       fi
16749     fi
16750 
16751     # set SDKROOT too, Xcode tools will pick it up
16752     SDKROOT=$SYSROOT
16753 
16754   fi
16755 
16756   # Prepend the extra path to the global path
16757 
16758   if test "x$EXTRA_PATH" != x; then
16759     if test "x$PATH" = x; then
16760       PATH="$EXTRA_PATH"
16761     else
16762       PATH="$EXTRA_PATH:$PATH"
16763     fi
16764   fi
16765 
16766 
16767   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16768     # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16769     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16770   fi
16771 
16772   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16773 $as_echo_n "checking for sysroot... " >&6; }
16774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16775 $as_echo "$SYSROOT" >&6; }
16776   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16777 $as_echo_n "checking for toolchain path... " >&6; }
16778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16779 $as_echo "$TOOLCHAIN_PATH" >&6; }
16780   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16781 $as_echo_n "checking for extra path... " >&6; }
16782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16783 $as_echo "$EXTRA_PATH" >&6; }
16784 
16785 
16786 # To properly create a configuration name, we need to have the OpenJDK target
16787 # and options (variants and debug level) parsed.
16788 
16789 
16790 
16791 # Check whether --with-conf-name was given.
16792 if test "${with_conf_name+set}" = set; then :
16793   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16794 fi
16795 
16796 
16797   # Test from where we are running configure, in or outside of src root.
16798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16799 $as_echo_n "checking where to store configuration... " >&6; }
16800   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16801       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16802       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16803     # We are running configure from the src root.
16804     # Create a default ./build/target-variant-debuglevel output root.
16805     if test "x${CONF_NAME}" = x; then
16806       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16807 $as_echo "in default location" >&6; }
16808       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16809     else
16810       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16811 $as_echo "in build directory with custom name" >&6; }
16812     fi
16813     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16814     $MKDIR -p "$OUTPUT_ROOT"
16815     if test ! -d "$OUTPUT_ROOT"; then
16816       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16817     fi
16818   else
16819     # We are running configure from outside of the src dir.
16820     # Then use the current directory as output dir!
16821     # If configuration is situated in normal build directory, just use the build
16822     # directory name as configuration name, otherwise use the complete path.
16823     if test "x${CONF_NAME}" = x; then
16824       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16825     fi
16826     OUTPUT_ROOT="$CURDIR"
16827     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16828 $as_echo "in current directory" >&6; }
16829 
16830     # WARNING: This might be a bad thing to do. You need to be sure you want to
16831     # have a configuration in this directory. Do some sanity checks!
16832 
16833     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16834       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16835       # other files
16836       files_present=`$LS $OUTPUT_ROOT`
16837       # Configure has already touched config.log and confdefs.h in the current dir when this check
16838       # is performed.
16839       filtered_files=`$ECHO "$files_present" \
16840           | $SED -e 's/config.log//g' \
16841               -e 's/configure.log//g' \
16842               -e 's/confdefs.h//g' \
16843               -e 's/ //g' \
16844           | $TR -d '\n'`
16845       if test "x$filtered_files" != x; then
16846         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16847 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
16848         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16849 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16850         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16851 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16852         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16853 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16854         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16855 $as_echo "$as_me: seriously mess up just about everything." >&6;}
16856         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16857 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16858         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16859 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16860         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16861       fi
16862     fi
16863   fi
16864   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16865 $as_echo_n "checking what configuration name to use... " >&6; }
16866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16867 $as_echo "$CONF_NAME" >&6; }
16868 
16869 
16870   # Only process if variable expands to non-empty
16871 
16872   if test "x$OUTPUT_ROOT" != x; then
16873     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16874 
16875   # Input might be given as Windows format, start by converting to
16876   # unix format.
16877   path="$OUTPUT_ROOT"
16878   new_path=`$CYGPATH -u "$path"`
16879 
16880   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16881   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16882   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16883   # "foo.exe" is OK but "foo" is an error.
16884   #
16885   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16886   # It is also a way to make sure we got the proper file name for the real test later on.
16887   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16888   if test "x$test_shortpath" = x; then
16889     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16890 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16891     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16892   fi
16893 
16894   # Call helper function which possibly converts this using DOS-style short mode.
16895   # If so, the updated path is stored in $new_path.
16896 
16897   input_path="$new_path"
16898   # Check if we need to convert this using DOS-style short mode. If the path
16899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16900   # take no chances and rewrite it.
16901   # Note: m4 eats our [], so we need to use [ and ] instead.
16902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16903   if test "x$has_forbidden_chars" != x; then
16904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16905     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16906     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16907     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16908       # Going to short mode and back again did indeed matter. Since short mode is
16909       # case insensitive, let's make it lowercase to improve readability.
16910       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16911       # Now convert it back to Unix-style (cygpath)
16912       input_path=`$CYGPATH -u "$shortmode_path"`
16913       new_path="$input_path"
16914     fi
16915   fi
16916 
16917   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16918   if test "x$test_cygdrive_prefix" = x; then
16919     # As a simple fix, exclude /usr/bin since it's not a real path.
16920     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16921       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16922       # a path prefixed by /cygdrive for fixpath to work.
16923       new_path="$CYGWIN_ROOT_PATH$input_path"
16924     fi
16925   fi
16926 
16927 
16928   if test "x$path" != "x$new_path"; then
16929     OUTPUT_ROOT="$new_path"
16930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16931 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16932   fi
16933 
16934     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16935 
16936   path="$OUTPUT_ROOT"
16937   has_colon=`$ECHO $path | $GREP ^.:`
16938   new_path="$path"
16939   if test "x$has_colon" = x; then
16940     # Not in mixed or Windows style, start by that.
16941     new_path=`cmd //c echo $path`
16942   fi
16943 
16944 
16945   input_path="$new_path"
16946   # Check if we need to convert this using DOS-style short mode. If the path
16947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16948   # take no chances and rewrite it.
16949   # Note: m4 eats our [], so we need to use [ and ] instead.
16950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16951   if test "x$has_forbidden_chars" != x; then
16952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16953     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16954   fi
16955 
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   if test "x$path" != "x$new_path"; then
16967     OUTPUT_ROOT="$new_path"
16968     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16969 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16970   fi
16971 
16972   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16973   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16974 
16975     else
16976       # We're on a unix platform. Hooray! :)
16977       path="$OUTPUT_ROOT"
16978       has_space=`$ECHO "$path" | $GREP " "`
16979       if test "x$has_space" != x; then
16980         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16981 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16982         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16983       fi
16984 
16985       # Use eval to expand a potential ~
16986       eval path="$path"
16987       if test ! -f "$path" && test ! -d "$path"; then
16988         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16989       fi
16990 
16991       if test -d "$path"; then
16992         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16993       else
16994         dir="`$DIRNAME "$path"`"
16995         base="`$BASENAME "$path"`"
16996         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16997       fi
16998     fi
16999   fi
17000 
17001 
17002   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17003   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17004 
17005   SPEC=$OUTPUT_ROOT/spec.gmk
17006 
17007   CONF_NAME=$CONF_NAME
17008 
17009   OUTPUT_ROOT=$OUTPUT_ROOT
17010 
17011 
17012 
17013   # The spec.gmk file contains all variables for the make system.
17014   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17015 
17016   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
17017   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
17018 
17019   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17020   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17021 
17022   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17023   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17024 
17025   # The compare.sh is used to compare the build output to other builds.
17026   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17027 
17028   # The generated Makefile knows where the spec.gmk is and where the source is.
17029   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17030   # which will look for generated configurations
17031   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17032 
17033 
17034 
17035 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17036 
17037   for ac_prog in apt-get yum port pkgutil pkgadd
17038 do
17039   # Extract the first word of "$ac_prog", so it can be a program name with args.
17040 set dummy $ac_prog; ac_word=$2
17041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17042 $as_echo_n "checking for $ac_word... " >&6; }
17043 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17044   $as_echo_n "(cached) " >&6
17045 else
17046   if test -n "$PKGHANDLER"; then
17047   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17048 else
17049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17050 for as_dir in $PATH
17051 do
17052   IFS=$as_save_IFS
17053   test -z "$as_dir" && as_dir=.
17054     for ac_exec_ext in '' $ac_executable_extensions; do
17055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17056     ac_cv_prog_PKGHANDLER="$ac_prog"
17057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17058     break 2
17059   fi
17060 done
17061   done
17062 IFS=$as_save_IFS
17063 
17064 fi
17065 fi
17066 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17067 if test -n "$PKGHANDLER"; then
17068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17069 $as_echo "$PKGHANDLER" >&6; }
17070 else
17071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17072 $as_echo "no" >&6; }
17073 fi
17074 
17075 
17076   test -n "$PKGHANDLER" && break
17077 done
17078 
17079 
17080 
17081 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17082 
17083 
17084 
17085   # Publish this variable in the help.
17086 
17087 
17088   if [ -z "${MAKE+x}" ]; then
17089     # The variable is not set by user, try to locate tool using the code snippet
17090 
17091     # Try our hardest to locate a correct version of GNU make
17092     for ac_prog in gmake
17093 do
17094   # Extract the first word of "$ac_prog", so it can be a program name with args.
17095 set dummy $ac_prog; ac_word=$2
17096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17097 $as_echo_n "checking for $ac_word... " >&6; }
17098 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17099   $as_echo_n "(cached) " >&6
17100 else
17101   case $CHECK_GMAKE in
17102   [\\/]* | ?:[\\/]*)
17103   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17104   ;;
17105   *)
17106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17107 for as_dir in $PATH
17108 do
17109   IFS=$as_save_IFS
17110   test -z "$as_dir" && as_dir=.
17111     for ac_exec_ext in '' $ac_executable_extensions; do
17112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17113     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17115     break 2
17116   fi
17117 done
17118   done
17119 IFS=$as_save_IFS
17120 
17121   ;;
17122 esac
17123 fi
17124 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17125 if test -n "$CHECK_GMAKE"; then
17126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17127 $as_echo "$CHECK_GMAKE" >&6; }
17128 else
17129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17130 $as_echo "no" >&6; }
17131 fi
17132 
17133 
17134   test -n "$CHECK_GMAKE" && break
17135 done
17136 
17137 
17138   MAKE_CANDIDATE=""$CHECK_GMAKE""
17139   DESCRIPTION="gmake in PATH"
17140 
17141   # On Cygwin, we require a newer version of make than on other platforms
17142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17143     MAKE_VERSION_EXPR="-e 4\."
17144     MAKE_REQUIRED_VERSION="4.0"
17145    else
17146     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17147     MAKE_REQUIRED_VERSION="3.81"
17148   fi
17149 
17150   if test "x$MAKE_CANDIDATE" != x; then
17151     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17152 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17153     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17154     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17155     if test "x$IS_GNU_MAKE" = x; then
17156       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17157 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17158     else
17159       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17160       if test "x$IS_MODERN_MAKE" = x; then
17161         { $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
17162 $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;}
17163       else
17164         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17165           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17166             MAKE_EXPECTED_ENV='cygwin'
17167           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17168             MAKE_EXPECTED_ENV='msys'
17169           else
17170             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17171           fi
17172           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17173           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17174         else
17175           # Not relevant for non-Windows
17176           IS_MAKE_CORRECT_ENV=true
17177         fi
17178         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17179           { $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
17180 $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;}
17181         else
17182           FOUND_MAKE=$MAKE_CANDIDATE
17183 
17184   # Only process if variable expands to non-empty
17185 
17186   if test "x$FOUND_MAKE" != x; then
17187     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17188 
17189   # First separate the path from the arguments. This will split at the first
17190   # space.
17191   complete="$FOUND_MAKE"
17192   path="${complete%% *}"
17193   tmp="$complete EOL"
17194   arguments="${tmp#* }"
17195 
17196   # Input might be given as Windows format, start by converting to
17197   # unix format.
17198   new_path=`$CYGPATH -u "$path"`
17199 
17200   # Now try to locate executable using which
17201   new_path=`$WHICH "$new_path" 2> /dev/null`
17202   # bat and cmd files are not always considered executable in cygwin causing which
17203   # to not find them
17204   if test "x$new_path" = x \
17205       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17206       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17207     new_path=`$CYGPATH -u "$path"`
17208   fi
17209   if test "x$new_path" = x; then
17210     # Oops. Which didn't find the executable.
17211     # The splitting of arguments from the executable at a space might have been incorrect,
17212     # since paths with space are more likely in Windows. Give it another try with the whole
17213     # argument.
17214     path="$complete"
17215     arguments="EOL"
17216     new_path=`$CYGPATH -u "$path"`
17217     new_path=`$WHICH "$new_path" 2> /dev/null`
17218     # bat and cmd files are not always considered executable in cygwin causing which
17219     # to not find them
17220     if test "x$new_path" = x \
17221         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17222         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17223       new_path=`$CYGPATH -u "$path"`
17224     fi
17225     if test "x$new_path" = x; then
17226       # It's still not found. Now this is an unrecoverable error.
17227       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17228 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17229       has_space=`$ECHO "$complete" | $GREP " "`
17230       if test "x$has_space" != x; then
17231         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17232 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17233       fi
17234       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17235     fi
17236   fi
17237 
17238   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17239   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17240   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17241   # "foo.exe" is OK but "foo" is an error.
17242   #
17243   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17244   # It is also a way to make sure we got the proper file name for the real test later on.
17245   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17246   if test "x$test_shortpath" = x; then
17247     # Short path failed, file does not exist as specified.
17248     # Try adding .exe or .cmd
17249     if test -f "${new_path}.exe"; then
17250       input_to_shortpath="${new_path}.exe"
17251     elif test -f "${new_path}.cmd"; then
17252       input_to_shortpath="${new_path}.cmd"
17253     else
17254       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17255 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17256       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17257 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17258       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17259     fi
17260   else
17261     input_to_shortpath="$new_path"
17262   fi
17263 
17264   # Call helper function which possibly converts this using DOS-style short mode.
17265   # If so, the updated path is stored in $new_path.
17266   new_path="$input_to_shortpath"
17267 
17268   input_path="$input_to_shortpath"
17269   # Check if we need to convert this using DOS-style short mode. If the path
17270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17271   # take no chances and rewrite it.
17272   # Note: m4 eats our [], so we need to use [ and ] instead.
17273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17274   if test "x$has_forbidden_chars" != x; then
17275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17276     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17277     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17278     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17279       # Going to short mode and back again did indeed matter. Since short mode is
17280       # case insensitive, let's make it lowercase to improve readability.
17281       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17282       # Now convert it back to Unix-style (cygpath)
17283       input_path=`$CYGPATH -u "$shortmode_path"`
17284       new_path="$input_path"
17285     fi
17286   fi
17287 
17288   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17289   if test "x$test_cygdrive_prefix" = x; then
17290     # As a simple fix, exclude /usr/bin since it's not a real path.
17291     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17292       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17293       # a path prefixed by /cygdrive for fixpath to work.
17294       new_path="$CYGWIN_ROOT_PATH$input_path"
17295     fi
17296   fi
17297 
17298   # remove trailing .exe if any
17299   new_path="${new_path/%.exe/}"
17300 
17301     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17302 
17303   # First separate the path from the arguments. This will split at the first
17304   # space.
17305   complete="$FOUND_MAKE"
17306   path="${complete%% *}"
17307   tmp="$complete EOL"
17308   arguments="${tmp#* }"
17309 
17310   # Input might be given as Windows format, start by converting to
17311   # unix format.
17312   new_path="$path"
17313 
17314   windows_path="$new_path"
17315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17316     unix_path=`$CYGPATH -u "$windows_path"`
17317     new_path="$unix_path"
17318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17320     new_path="$unix_path"
17321   fi
17322 
17323 
17324   # Now try to locate executable using which
17325   new_path=`$WHICH "$new_path" 2> /dev/null`
17326 
17327   if test "x$new_path" = x; then
17328     # Oops. Which didn't find the executable.
17329     # The splitting of arguments from the executable at a space might have been incorrect,
17330     # since paths with space are more likely in Windows. Give it another try with the whole
17331     # argument.
17332     path="$complete"
17333     arguments="EOL"
17334     new_path="$path"
17335 
17336   windows_path="$new_path"
17337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17338     unix_path=`$CYGPATH -u "$windows_path"`
17339     new_path="$unix_path"
17340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17342     new_path="$unix_path"
17343   fi
17344 
17345 
17346     new_path=`$WHICH "$new_path" 2> /dev/null`
17347     # bat and cmd files are not always considered executable in MSYS causing which
17348     # to not find them
17349     if test "x$new_path" = x \
17350         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17351         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17352       new_path="$path"
17353 
17354   windows_path="$new_path"
17355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17356     unix_path=`$CYGPATH -u "$windows_path"`
17357     new_path="$unix_path"
17358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17360     new_path="$unix_path"
17361   fi
17362 
17363     fi
17364 
17365     if test "x$new_path" = x; then
17366       # It's still not found. Now this is an unrecoverable error.
17367       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17368 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17369       has_space=`$ECHO "$complete" | $GREP " "`
17370       if test "x$has_space" != x; then
17371         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17372 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17373       fi
17374       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17375     fi
17376   fi
17377 
17378   # Now new_path has a complete unix path to the binary
17379   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17380     # Keep paths in /bin as-is, but remove trailing .exe if any
17381     new_path="${new_path/%.exe/}"
17382     # Do not save /bin paths to all_fixpath_prefixes!
17383   else
17384     # Not in mixed or Windows style, start by that.
17385     new_path=`cmd //c echo $new_path`
17386 
17387   input_path="$new_path"
17388   # Check if we need to convert this using DOS-style short mode. If the path
17389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17390   # take no chances and rewrite it.
17391   # Note: m4 eats our [], so we need to use [ and ] instead.
17392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17393   if test "x$has_forbidden_chars" != x; then
17394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17395     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17396   fi
17397 
17398     # Output is in $new_path
17399 
17400   windows_path="$new_path"
17401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17402     unix_path=`$CYGPATH -u "$windows_path"`
17403     new_path="$unix_path"
17404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17406     new_path="$unix_path"
17407   fi
17408 
17409     # remove trailing .exe if any
17410     new_path="${new_path/%.exe/}"
17411 
17412     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17413     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17414   fi
17415 
17416     else
17417       # We're on a unix platform. Hooray! :)
17418       # First separate the path from the arguments. This will split at the first
17419       # space.
17420       complete="$FOUND_MAKE"
17421       path="${complete%% *}"
17422       tmp="$complete EOL"
17423       arguments="${tmp#* }"
17424 
17425       # Cannot rely on the command "which" here since it doesn't always work.
17426       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17427       if test -z "$is_absolute_path"; then
17428         # Path to executable is not absolute. Find it.
17429         IFS_save="$IFS"
17430         IFS=:
17431         for p in $PATH; do
17432           if test -f "$p/$path" && test -x "$p/$path"; then
17433             new_path="$p/$path"
17434             break
17435           fi
17436         done
17437         IFS="$IFS_save"
17438       else
17439         # This is an absolute path, we can use it without further modifications.
17440         new_path="$path"
17441       fi
17442 
17443       if test "x$new_path" = x; then
17444         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17445 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17446         has_space=`$ECHO "$complete" | $GREP " "`
17447         if test "x$has_space" != x; then
17448           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17449 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17450         fi
17451         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17452       fi
17453     fi
17454 
17455     # Now join together the path and the arguments once again
17456     if test "x$arguments" != xEOL; then
17457       new_complete="$new_path ${arguments% *}"
17458     else
17459       new_complete="$new_path"
17460     fi
17461 
17462     if test "x$complete" != "x$new_complete"; then
17463       FOUND_MAKE="$new_complete"
17464       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17465 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17466     fi
17467   fi
17468 
17469         fi
17470       fi
17471     fi
17472   fi
17473 
17474 
17475     if test "x$FOUND_MAKE" = x; then
17476       for ac_prog in make
17477 do
17478   # Extract the first word of "$ac_prog", so it can be a program name with args.
17479 set dummy $ac_prog; ac_word=$2
17480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17481 $as_echo_n "checking for $ac_word... " >&6; }
17482 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17483   $as_echo_n "(cached) " >&6
17484 else
17485   case $CHECK_MAKE in
17486   [\\/]* | ?:[\\/]*)
17487   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17488   ;;
17489   *)
17490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17491 for as_dir in $PATH
17492 do
17493   IFS=$as_save_IFS
17494   test -z "$as_dir" && as_dir=.
17495     for ac_exec_ext in '' $ac_executable_extensions; do
17496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17497     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17499     break 2
17500   fi
17501 done
17502   done
17503 IFS=$as_save_IFS
17504 
17505   ;;
17506 esac
17507 fi
17508 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17509 if test -n "$CHECK_MAKE"; then
17510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17511 $as_echo "$CHECK_MAKE" >&6; }
17512 else
17513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17514 $as_echo "no" >&6; }
17515 fi
17516 
17517 
17518   test -n "$CHECK_MAKE" && break
17519 done
17520 
17521 
17522   MAKE_CANDIDATE=""$CHECK_MAKE""
17523   DESCRIPTION="make in PATH"
17524 
17525   # On Cygwin, we require a newer version of make than on other platforms
17526   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17527     MAKE_VERSION_EXPR="-e 4\."
17528     MAKE_REQUIRED_VERSION="4.0"
17529    else
17530     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17531     MAKE_REQUIRED_VERSION="3.81"
17532   fi
17533 
17534   if test "x$MAKE_CANDIDATE" != x; then
17535     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17536 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17537     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17538     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17539     if test "x$IS_GNU_MAKE" = x; then
17540       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17541 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17542     else
17543       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17544       if test "x$IS_MODERN_MAKE" = x; then
17545         { $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
17546 $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;}
17547       else
17548         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17549           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17550             MAKE_EXPECTED_ENV='cygwin'
17551           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17552             MAKE_EXPECTED_ENV='msys'
17553           else
17554             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17555           fi
17556           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17557           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17558         else
17559           # Not relevant for non-Windows
17560           IS_MAKE_CORRECT_ENV=true
17561         fi
17562         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17563           { $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
17564 $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;}
17565         else
17566           FOUND_MAKE=$MAKE_CANDIDATE
17567 
17568   # Only process if variable expands to non-empty
17569 
17570   if test "x$FOUND_MAKE" != x; then
17571     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17572 
17573   # First separate the path from the arguments. This will split at the first
17574   # space.
17575   complete="$FOUND_MAKE"
17576   path="${complete%% *}"
17577   tmp="$complete EOL"
17578   arguments="${tmp#* }"
17579 
17580   # Input might be given as Windows format, start by converting to
17581   # unix format.
17582   new_path=`$CYGPATH -u "$path"`
17583 
17584   # Now try to locate executable using which
17585   new_path=`$WHICH "$new_path" 2> /dev/null`
17586   # bat and cmd files are not always considered executable in cygwin causing which
17587   # to not find them
17588   if test "x$new_path" = x \
17589       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17590       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17591     new_path=`$CYGPATH -u "$path"`
17592   fi
17593   if test "x$new_path" = x; then
17594     # Oops. Which didn't find the executable.
17595     # The splitting of arguments from the executable at a space might have been incorrect,
17596     # since paths with space are more likely in Windows. Give it another try with the whole
17597     # argument.
17598     path="$complete"
17599     arguments="EOL"
17600     new_path=`$CYGPATH -u "$path"`
17601     new_path=`$WHICH "$new_path" 2> /dev/null`
17602     # bat and cmd files are not always considered executable in cygwin causing which
17603     # to not find them
17604     if test "x$new_path" = x \
17605         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17606         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17607       new_path=`$CYGPATH -u "$path"`
17608     fi
17609     if test "x$new_path" = x; then
17610       # It's still not found. Now this is an unrecoverable error.
17611       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17612 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17613       has_space=`$ECHO "$complete" | $GREP " "`
17614       if test "x$has_space" != x; then
17615         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17616 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17617       fi
17618       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17619     fi
17620   fi
17621 
17622   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17623   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17624   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17625   # "foo.exe" is OK but "foo" is an error.
17626   #
17627   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17628   # It is also a way to make sure we got the proper file name for the real test later on.
17629   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17630   if test "x$test_shortpath" = x; then
17631     # Short path failed, file does not exist as specified.
17632     # Try adding .exe or .cmd
17633     if test -f "${new_path}.exe"; then
17634       input_to_shortpath="${new_path}.exe"
17635     elif test -f "${new_path}.cmd"; then
17636       input_to_shortpath="${new_path}.cmd"
17637     else
17638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17639 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17640       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17641 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17642       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17643     fi
17644   else
17645     input_to_shortpath="$new_path"
17646   fi
17647 
17648   # Call helper function which possibly converts this using DOS-style short mode.
17649   # If so, the updated path is stored in $new_path.
17650   new_path="$input_to_shortpath"
17651 
17652   input_path="$input_to_shortpath"
17653   # Check if we need to convert this using DOS-style short mode. If the path
17654   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17655   # take no chances and rewrite it.
17656   # Note: m4 eats our [], so we need to use [ and ] instead.
17657   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17658   if test "x$has_forbidden_chars" != x; then
17659     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17660     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17661     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17662     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17663       # Going to short mode and back again did indeed matter. Since short mode is
17664       # case insensitive, let's make it lowercase to improve readability.
17665       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17666       # Now convert it back to Unix-style (cygpath)
17667       input_path=`$CYGPATH -u "$shortmode_path"`
17668       new_path="$input_path"
17669     fi
17670   fi
17671 
17672   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17673   if test "x$test_cygdrive_prefix" = x; then
17674     # As a simple fix, exclude /usr/bin since it's not a real path.
17675     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17676       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17677       # a path prefixed by /cygdrive for fixpath to work.
17678       new_path="$CYGWIN_ROOT_PATH$input_path"
17679     fi
17680   fi
17681 
17682   # remove trailing .exe if any
17683   new_path="${new_path/%.exe/}"
17684 
17685     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17686 
17687   # First separate the path from the arguments. This will split at the first
17688   # space.
17689   complete="$FOUND_MAKE"
17690   path="${complete%% *}"
17691   tmp="$complete EOL"
17692   arguments="${tmp#* }"
17693 
17694   # Input might be given as Windows format, start by converting to
17695   # unix format.
17696   new_path="$path"
17697 
17698   windows_path="$new_path"
17699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17700     unix_path=`$CYGPATH -u "$windows_path"`
17701     new_path="$unix_path"
17702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17704     new_path="$unix_path"
17705   fi
17706 
17707 
17708   # Now try to locate executable using which
17709   new_path=`$WHICH "$new_path" 2> /dev/null`
17710 
17711   if test "x$new_path" = x; then
17712     # Oops. Which didn't find the executable.
17713     # The splitting of arguments from the executable at a space might have been incorrect,
17714     # since paths with space are more likely in Windows. Give it another try with the whole
17715     # argument.
17716     path="$complete"
17717     arguments="EOL"
17718     new_path="$path"
17719 
17720   windows_path="$new_path"
17721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17722     unix_path=`$CYGPATH -u "$windows_path"`
17723     new_path="$unix_path"
17724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17726     new_path="$unix_path"
17727   fi
17728 
17729 
17730     new_path=`$WHICH "$new_path" 2> /dev/null`
17731     # bat and cmd files are not always considered executable in MSYS causing which
17732     # to not find them
17733     if test "x$new_path" = x \
17734         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17735         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17736       new_path="$path"
17737 
17738   windows_path="$new_path"
17739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17740     unix_path=`$CYGPATH -u "$windows_path"`
17741     new_path="$unix_path"
17742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17744     new_path="$unix_path"
17745   fi
17746 
17747     fi
17748 
17749     if test "x$new_path" = x; then
17750       # It's still not found. Now this is an unrecoverable error.
17751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17752 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17753       has_space=`$ECHO "$complete" | $GREP " "`
17754       if test "x$has_space" != x; then
17755         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17756 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17757       fi
17758       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17759     fi
17760   fi
17761 
17762   # Now new_path has a complete unix path to the binary
17763   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17764     # Keep paths in /bin as-is, but remove trailing .exe if any
17765     new_path="${new_path/%.exe/}"
17766     # Do not save /bin paths to all_fixpath_prefixes!
17767   else
17768     # Not in mixed or Windows style, start by that.
17769     new_path=`cmd //c echo $new_path`
17770 
17771   input_path="$new_path"
17772   # Check if we need to convert this using DOS-style short mode. If the path
17773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17774   # take no chances and rewrite it.
17775   # Note: m4 eats our [], so we need to use [ and ] instead.
17776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17777   if test "x$has_forbidden_chars" != x; then
17778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17780   fi
17781 
17782     # Output is in $new_path
17783 
17784   windows_path="$new_path"
17785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17786     unix_path=`$CYGPATH -u "$windows_path"`
17787     new_path="$unix_path"
17788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17790     new_path="$unix_path"
17791   fi
17792 
17793     # remove trailing .exe if any
17794     new_path="${new_path/%.exe/}"
17795 
17796     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17797     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17798   fi
17799 
17800     else
17801       # We're on a unix platform. Hooray! :)
17802       # First separate the path from the arguments. This will split at the first
17803       # space.
17804       complete="$FOUND_MAKE"
17805       path="${complete%% *}"
17806       tmp="$complete EOL"
17807       arguments="${tmp#* }"
17808 
17809       # Cannot rely on the command "which" here since it doesn't always work.
17810       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17811       if test -z "$is_absolute_path"; then
17812         # Path to executable is not absolute. Find it.
17813         IFS_save="$IFS"
17814         IFS=:
17815         for p in $PATH; do
17816           if test -f "$p/$path" && test -x "$p/$path"; then
17817             new_path="$p/$path"
17818             break
17819           fi
17820         done
17821         IFS="$IFS_save"
17822       else
17823         # This is an absolute path, we can use it without further modifications.
17824         new_path="$path"
17825       fi
17826 
17827       if test "x$new_path" = x; then
17828         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17829 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17830         has_space=`$ECHO "$complete" | $GREP " "`
17831         if test "x$has_space" != x; then
17832           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17833 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17834         fi
17835         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17836       fi
17837     fi
17838 
17839     # Now join together the path and the arguments once again
17840     if test "x$arguments" != xEOL; then
17841       new_complete="$new_path ${arguments% *}"
17842     else
17843       new_complete="$new_path"
17844     fi
17845 
17846     if test "x$complete" != "x$new_complete"; then
17847       FOUND_MAKE="$new_complete"
17848       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17849 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17850     fi
17851   fi
17852 
17853         fi
17854       fi
17855     fi
17856   fi
17857 
17858     fi
17859 
17860     if test "x$FOUND_MAKE" = x; then
17861       if test "x$TOOLCHAIN_PATH" != x; then
17862         # We have a toolchain path, check that as well before giving up.
17863         OLD_PATH=$PATH
17864         PATH=$TOOLCHAIN_PATH:$PATH
17865         for ac_prog in gmake
17866 do
17867   # Extract the first word of "$ac_prog", so it can be a program name with args.
17868 set dummy $ac_prog; ac_word=$2
17869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17870 $as_echo_n "checking for $ac_word... " >&6; }
17871 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17872   $as_echo_n "(cached) " >&6
17873 else
17874   case $CHECK_TOOLSDIR_GMAKE in
17875   [\\/]* | ?:[\\/]*)
17876   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17877   ;;
17878   *)
17879   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17880 for as_dir in $PATH
17881 do
17882   IFS=$as_save_IFS
17883   test -z "$as_dir" && as_dir=.
17884     for ac_exec_ext in '' $ac_executable_extensions; do
17885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17886     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17888     break 2
17889   fi
17890 done
17891   done
17892 IFS=$as_save_IFS
17893 
17894   ;;
17895 esac
17896 fi
17897 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17898 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17900 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17901 else
17902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17903 $as_echo "no" >&6; }
17904 fi
17905 
17906 
17907   test -n "$CHECK_TOOLSDIR_GMAKE" && break
17908 done
17909 
17910 
17911   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17912   DESCRIPTION="gmake in tools-dir"
17913 
17914   # On Cygwin, we require a newer version of make than on other platforms
17915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17916     MAKE_VERSION_EXPR="-e 4\."
17917     MAKE_REQUIRED_VERSION="4.0"
17918    else
17919     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17920     MAKE_REQUIRED_VERSION="3.81"
17921   fi
17922 
17923   if test "x$MAKE_CANDIDATE" != x; then
17924     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17925 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17926     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17927     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17928     if test "x$IS_GNU_MAKE" = x; then
17929       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17930 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17931     else
17932       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17933       if test "x$IS_MODERN_MAKE" = x; then
17934         { $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
17935 $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;}
17936       else
17937         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17938           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17939             MAKE_EXPECTED_ENV='cygwin'
17940           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17941             MAKE_EXPECTED_ENV='msys'
17942           else
17943             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17944           fi
17945           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17946           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17947         else
17948           # Not relevant for non-Windows
17949           IS_MAKE_CORRECT_ENV=true
17950         fi
17951         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17952           { $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
17953 $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;}
17954         else
17955           FOUND_MAKE=$MAKE_CANDIDATE
17956 
17957   # Only process if variable expands to non-empty
17958 
17959   if test "x$FOUND_MAKE" != x; then
17960     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17961 
17962   # First separate the path from the arguments. This will split at the first
17963   # space.
17964   complete="$FOUND_MAKE"
17965   path="${complete%% *}"
17966   tmp="$complete EOL"
17967   arguments="${tmp#* }"
17968 
17969   # Input might be given as Windows format, start by converting to
17970   # unix format.
17971   new_path=`$CYGPATH -u "$path"`
17972 
17973   # Now try to locate executable using which
17974   new_path=`$WHICH "$new_path" 2> /dev/null`
17975   # bat and cmd files are not always considered executable in cygwin causing which
17976   # to not find them
17977   if test "x$new_path" = x \
17978       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17979       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17980     new_path=`$CYGPATH -u "$path"`
17981   fi
17982   if test "x$new_path" = x; then
17983     # Oops. Which didn't find the executable.
17984     # The splitting of arguments from the executable at a space might have been incorrect,
17985     # since paths with space are more likely in Windows. Give it another try with the whole
17986     # argument.
17987     path="$complete"
17988     arguments="EOL"
17989     new_path=`$CYGPATH -u "$path"`
17990     new_path=`$WHICH "$new_path" 2> /dev/null`
17991     # bat and cmd files are not always considered executable in cygwin causing which
17992     # to not find them
17993     if test "x$new_path" = x \
17994         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17995         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17996       new_path=`$CYGPATH -u "$path"`
17997     fi
17998     if test "x$new_path" = x; then
17999       # It's still not found. Now this is an unrecoverable error.
18000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18001 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18002       has_space=`$ECHO "$complete" | $GREP " "`
18003       if test "x$has_space" != x; then
18004         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18005 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18006       fi
18007       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18008     fi
18009   fi
18010 
18011   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18012   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18013   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18014   # "foo.exe" is OK but "foo" is an error.
18015   #
18016   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18017   # It is also a way to make sure we got the proper file name for the real test later on.
18018   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18019   if test "x$test_shortpath" = x; then
18020     # Short path failed, file does not exist as specified.
18021     # Try adding .exe or .cmd
18022     if test -f "${new_path}.exe"; then
18023       input_to_shortpath="${new_path}.exe"
18024     elif test -f "${new_path}.cmd"; then
18025       input_to_shortpath="${new_path}.cmd"
18026     else
18027       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18028 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18029       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18030 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18031       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18032     fi
18033   else
18034     input_to_shortpath="$new_path"
18035   fi
18036 
18037   # Call helper function which possibly converts this using DOS-style short mode.
18038   # If so, the updated path is stored in $new_path.
18039   new_path="$input_to_shortpath"
18040 
18041   input_path="$input_to_shortpath"
18042   # Check if we need to convert this using DOS-style short mode. If the path
18043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18044   # take no chances and rewrite it.
18045   # Note: m4 eats our [], so we need to use [ and ] instead.
18046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18047   if test "x$has_forbidden_chars" != x; then
18048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18049     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18050     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18051     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18052       # Going to short mode and back again did indeed matter. Since short mode is
18053       # case insensitive, let's make it lowercase to improve readability.
18054       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18055       # Now convert it back to Unix-style (cygpath)
18056       input_path=`$CYGPATH -u "$shortmode_path"`
18057       new_path="$input_path"
18058     fi
18059   fi
18060 
18061   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18062   if test "x$test_cygdrive_prefix" = x; then
18063     # As a simple fix, exclude /usr/bin since it's not a real path.
18064     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18065       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18066       # a path prefixed by /cygdrive for fixpath to work.
18067       new_path="$CYGWIN_ROOT_PATH$input_path"
18068     fi
18069   fi
18070 
18071   # remove trailing .exe if any
18072   new_path="${new_path/%.exe/}"
18073 
18074     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18075 
18076   # First separate the path from the arguments. This will split at the first
18077   # space.
18078   complete="$FOUND_MAKE"
18079   path="${complete%% *}"
18080   tmp="$complete EOL"
18081   arguments="${tmp#* }"
18082 
18083   # Input might be given as Windows format, start by converting to
18084   # unix format.
18085   new_path="$path"
18086 
18087   windows_path="$new_path"
18088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18089     unix_path=`$CYGPATH -u "$windows_path"`
18090     new_path="$unix_path"
18091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18093     new_path="$unix_path"
18094   fi
18095 
18096 
18097   # Now try to locate executable using which
18098   new_path=`$WHICH "$new_path" 2> /dev/null`
18099 
18100   if test "x$new_path" = x; then
18101     # Oops. Which didn't find the executable.
18102     # The splitting of arguments from the executable at a space might have been incorrect,
18103     # since paths with space are more likely in Windows. Give it another try with the whole
18104     # argument.
18105     path="$complete"
18106     arguments="EOL"
18107     new_path="$path"
18108 
18109   windows_path="$new_path"
18110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18111     unix_path=`$CYGPATH -u "$windows_path"`
18112     new_path="$unix_path"
18113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18115     new_path="$unix_path"
18116   fi
18117 
18118 
18119     new_path=`$WHICH "$new_path" 2> /dev/null`
18120     # bat and cmd files are not always considered executable in MSYS causing which
18121     # to not find them
18122     if test "x$new_path" = x \
18123         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18124         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18125       new_path="$path"
18126 
18127   windows_path="$new_path"
18128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18129     unix_path=`$CYGPATH -u "$windows_path"`
18130     new_path="$unix_path"
18131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18133     new_path="$unix_path"
18134   fi
18135 
18136     fi
18137 
18138     if test "x$new_path" = x; then
18139       # It's still not found. Now this is an unrecoverable error.
18140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18141 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18142       has_space=`$ECHO "$complete" | $GREP " "`
18143       if test "x$has_space" != x; then
18144         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18145 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18146       fi
18147       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18148     fi
18149   fi
18150 
18151   # Now new_path has a complete unix path to the binary
18152   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18153     # Keep paths in /bin as-is, but remove trailing .exe if any
18154     new_path="${new_path/%.exe/}"
18155     # Do not save /bin paths to all_fixpath_prefixes!
18156   else
18157     # Not in mixed or Windows style, start by that.
18158     new_path=`cmd //c echo $new_path`
18159 
18160   input_path="$new_path"
18161   # Check if we need to convert this using DOS-style short mode. If the path
18162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18163   # take no chances and rewrite it.
18164   # Note: m4 eats our [], so we need to use [ and ] instead.
18165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18166   if test "x$has_forbidden_chars" != x; then
18167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18168     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18169   fi
18170 
18171     # Output is in $new_path
18172 
18173   windows_path="$new_path"
18174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18175     unix_path=`$CYGPATH -u "$windows_path"`
18176     new_path="$unix_path"
18177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18179     new_path="$unix_path"
18180   fi
18181 
18182     # remove trailing .exe if any
18183     new_path="${new_path/%.exe/}"
18184 
18185     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18186     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18187   fi
18188 
18189     else
18190       # We're on a unix platform. Hooray! :)
18191       # First separate the path from the arguments. This will split at the first
18192       # space.
18193       complete="$FOUND_MAKE"
18194       path="${complete%% *}"
18195       tmp="$complete EOL"
18196       arguments="${tmp#* }"
18197 
18198       # Cannot rely on the command "which" here since it doesn't always work.
18199       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18200       if test -z "$is_absolute_path"; then
18201         # Path to executable is not absolute. Find it.
18202         IFS_save="$IFS"
18203         IFS=:
18204         for p in $PATH; do
18205           if test -f "$p/$path" && test -x "$p/$path"; then
18206             new_path="$p/$path"
18207             break
18208           fi
18209         done
18210         IFS="$IFS_save"
18211       else
18212         # This is an absolute path, we can use it without further modifications.
18213         new_path="$path"
18214       fi
18215 
18216       if test "x$new_path" = x; then
18217         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18218 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18219         has_space=`$ECHO "$complete" | $GREP " "`
18220         if test "x$has_space" != x; then
18221           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18222 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18223         fi
18224         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18225       fi
18226     fi
18227 
18228     # Now join together the path and the arguments once again
18229     if test "x$arguments" != xEOL; then
18230       new_complete="$new_path ${arguments% *}"
18231     else
18232       new_complete="$new_path"
18233     fi
18234 
18235     if test "x$complete" != "x$new_complete"; then
18236       FOUND_MAKE="$new_complete"
18237       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18238 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18239     fi
18240   fi
18241 
18242         fi
18243       fi
18244     fi
18245   fi
18246 
18247         if test "x$FOUND_MAKE" = x; then
18248           for ac_prog in make
18249 do
18250   # Extract the first word of "$ac_prog", so it can be a program name with args.
18251 set dummy $ac_prog; ac_word=$2
18252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18253 $as_echo_n "checking for $ac_word... " >&6; }
18254 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18255   $as_echo_n "(cached) " >&6
18256 else
18257   case $CHECK_TOOLSDIR_MAKE in
18258   [\\/]* | ?:[\\/]*)
18259   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18260   ;;
18261   *)
18262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18263 for as_dir in $PATH
18264 do
18265   IFS=$as_save_IFS
18266   test -z "$as_dir" && as_dir=.
18267     for ac_exec_ext in '' $ac_executable_extensions; do
18268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18269     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18271     break 2
18272   fi
18273 done
18274   done
18275 IFS=$as_save_IFS
18276 
18277   ;;
18278 esac
18279 fi
18280 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18281 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18283 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18284 else
18285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18286 $as_echo "no" >&6; }
18287 fi
18288 
18289 
18290   test -n "$CHECK_TOOLSDIR_MAKE" && break
18291 done
18292 
18293 
18294   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18295   DESCRIPTION="make in tools-dir"
18296 
18297   # On Cygwin, we require a newer version of make than on other platforms
18298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18299     MAKE_VERSION_EXPR="-e 4\."
18300     MAKE_REQUIRED_VERSION="4.0"
18301    else
18302     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18303     MAKE_REQUIRED_VERSION="3.81"
18304   fi
18305 
18306   if test "x$MAKE_CANDIDATE" != x; then
18307     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18308 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18309     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18310     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18311     if test "x$IS_GNU_MAKE" = x; then
18312       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18313 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18314     else
18315       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18316       if test "x$IS_MODERN_MAKE" = x; then
18317         { $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
18318 $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;}
18319       else
18320         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18321           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18322             MAKE_EXPECTED_ENV='cygwin'
18323           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18324             MAKE_EXPECTED_ENV='msys'
18325           else
18326             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18327           fi
18328           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18329           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18330         else
18331           # Not relevant for non-Windows
18332           IS_MAKE_CORRECT_ENV=true
18333         fi
18334         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18335           { $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
18336 $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;}
18337         else
18338           FOUND_MAKE=$MAKE_CANDIDATE
18339 
18340   # Only process if variable expands to non-empty
18341 
18342   if test "x$FOUND_MAKE" != x; then
18343     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18344 
18345   # First separate the path from the arguments. This will split at the first
18346   # space.
18347   complete="$FOUND_MAKE"
18348   path="${complete%% *}"
18349   tmp="$complete EOL"
18350   arguments="${tmp#* }"
18351 
18352   # Input might be given as Windows format, start by converting to
18353   # unix format.
18354   new_path=`$CYGPATH -u "$path"`
18355 
18356   # Now try to locate executable using which
18357   new_path=`$WHICH "$new_path" 2> /dev/null`
18358   # bat and cmd files are not always considered executable in cygwin causing which
18359   # to not find them
18360   if test "x$new_path" = x \
18361       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18362       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18363     new_path=`$CYGPATH -u "$path"`
18364   fi
18365   if test "x$new_path" = x; then
18366     # Oops. Which didn't find the executable.
18367     # The splitting of arguments from the executable at a space might have been incorrect,
18368     # since paths with space are more likely in Windows. Give it another try with the whole
18369     # argument.
18370     path="$complete"
18371     arguments="EOL"
18372     new_path=`$CYGPATH -u "$path"`
18373     new_path=`$WHICH "$new_path" 2> /dev/null`
18374     # bat and cmd files are not always considered executable in cygwin causing which
18375     # to not find them
18376     if test "x$new_path" = x \
18377         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18378         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18379       new_path=`$CYGPATH -u "$path"`
18380     fi
18381     if test "x$new_path" = x; then
18382       # It's still not found. Now this is an unrecoverable error.
18383       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18384 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18385       has_space=`$ECHO "$complete" | $GREP " "`
18386       if test "x$has_space" != x; then
18387         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18388 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18389       fi
18390       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18391     fi
18392   fi
18393 
18394   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18395   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18396   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18397   # "foo.exe" is OK but "foo" is an error.
18398   #
18399   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18400   # It is also a way to make sure we got the proper file name for the real test later on.
18401   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18402   if test "x$test_shortpath" = x; then
18403     # Short path failed, file does not exist as specified.
18404     # Try adding .exe or .cmd
18405     if test -f "${new_path}.exe"; then
18406       input_to_shortpath="${new_path}.exe"
18407     elif test -f "${new_path}.cmd"; then
18408       input_to_shortpath="${new_path}.cmd"
18409     else
18410       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18411 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18412       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18413 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18414       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18415     fi
18416   else
18417     input_to_shortpath="$new_path"
18418   fi
18419 
18420   # Call helper function which possibly converts this using DOS-style short mode.
18421   # If so, the updated path is stored in $new_path.
18422   new_path="$input_to_shortpath"
18423 
18424   input_path="$input_to_shortpath"
18425   # Check if we need to convert this using DOS-style short mode. If the path
18426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18427   # take no chances and rewrite it.
18428   # Note: m4 eats our [], so we need to use [ and ] instead.
18429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18430   if test "x$has_forbidden_chars" != x; then
18431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18432     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18433     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18434     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18435       # Going to short mode and back again did indeed matter. Since short mode is
18436       # case insensitive, let's make it lowercase to improve readability.
18437       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18438       # Now convert it back to Unix-style (cygpath)
18439       input_path=`$CYGPATH -u "$shortmode_path"`
18440       new_path="$input_path"
18441     fi
18442   fi
18443 
18444   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18445   if test "x$test_cygdrive_prefix" = x; then
18446     # As a simple fix, exclude /usr/bin since it's not a real path.
18447     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18448       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18449       # a path prefixed by /cygdrive for fixpath to work.
18450       new_path="$CYGWIN_ROOT_PATH$input_path"
18451     fi
18452   fi
18453 
18454   # remove trailing .exe if any
18455   new_path="${new_path/%.exe/}"
18456 
18457     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18458 
18459   # First separate the path from the arguments. This will split at the first
18460   # space.
18461   complete="$FOUND_MAKE"
18462   path="${complete%% *}"
18463   tmp="$complete EOL"
18464   arguments="${tmp#* }"
18465 
18466   # Input might be given as Windows format, start by converting to
18467   # unix format.
18468   new_path="$path"
18469 
18470   windows_path="$new_path"
18471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18472     unix_path=`$CYGPATH -u "$windows_path"`
18473     new_path="$unix_path"
18474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18476     new_path="$unix_path"
18477   fi
18478 
18479 
18480   # Now try to locate executable using which
18481   new_path=`$WHICH "$new_path" 2> /dev/null`
18482 
18483   if test "x$new_path" = x; then
18484     # Oops. Which didn't find the executable.
18485     # The splitting of arguments from the executable at a space might have been incorrect,
18486     # since paths with space are more likely in Windows. Give it another try with the whole
18487     # argument.
18488     path="$complete"
18489     arguments="EOL"
18490     new_path="$path"
18491 
18492   windows_path="$new_path"
18493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18494     unix_path=`$CYGPATH -u "$windows_path"`
18495     new_path="$unix_path"
18496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18498     new_path="$unix_path"
18499   fi
18500 
18501 
18502     new_path=`$WHICH "$new_path" 2> /dev/null`
18503     # bat and cmd files are not always considered executable in MSYS causing which
18504     # to not find them
18505     if test "x$new_path" = x \
18506         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18507         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18508       new_path="$path"
18509 
18510   windows_path="$new_path"
18511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18512     unix_path=`$CYGPATH -u "$windows_path"`
18513     new_path="$unix_path"
18514   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18515     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18516     new_path="$unix_path"
18517   fi
18518 
18519     fi
18520 
18521     if test "x$new_path" = x; then
18522       # It's still not found. Now this is an unrecoverable error.
18523       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18524 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18525       has_space=`$ECHO "$complete" | $GREP " "`
18526       if test "x$has_space" != x; then
18527         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18528 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18529       fi
18530       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18531     fi
18532   fi
18533 
18534   # Now new_path has a complete unix path to the binary
18535   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18536     # Keep paths in /bin as-is, but remove trailing .exe if any
18537     new_path="${new_path/%.exe/}"
18538     # Do not save /bin paths to all_fixpath_prefixes!
18539   else
18540     # Not in mixed or Windows style, start by that.
18541     new_path=`cmd //c echo $new_path`
18542 
18543   input_path="$new_path"
18544   # Check if we need to convert this using DOS-style short mode. If the path
18545   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18546   # take no chances and rewrite it.
18547   # Note: m4 eats our [], so we need to use [ and ] instead.
18548   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18549   if test "x$has_forbidden_chars" != x; then
18550     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18551     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18552   fi
18553 
18554     # Output is in $new_path
18555 
18556   windows_path="$new_path"
18557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18558     unix_path=`$CYGPATH -u "$windows_path"`
18559     new_path="$unix_path"
18560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18562     new_path="$unix_path"
18563   fi
18564 
18565     # remove trailing .exe if any
18566     new_path="${new_path/%.exe/}"
18567 
18568     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18569     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18570   fi
18571 
18572     else
18573       # We're on a unix platform. Hooray! :)
18574       # First separate the path from the arguments. This will split at the first
18575       # space.
18576       complete="$FOUND_MAKE"
18577       path="${complete%% *}"
18578       tmp="$complete EOL"
18579       arguments="${tmp#* }"
18580 
18581       # Cannot rely on the command "which" here since it doesn't always work.
18582       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18583       if test -z "$is_absolute_path"; then
18584         # Path to executable is not absolute. Find it.
18585         IFS_save="$IFS"
18586         IFS=:
18587         for p in $PATH; do
18588           if test -f "$p/$path" && test -x "$p/$path"; then
18589             new_path="$p/$path"
18590             break
18591           fi
18592         done
18593         IFS="$IFS_save"
18594       else
18595         # This is an absolute path, we can use it without further modifications.
18596         new_path="$path"
18597       fi
18598 
18599       if test "x$new_path" = x; then
18600         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18601 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18602         has_space=`$ECHO "$complete" | $GREP " "`
18603         if test "x$has_space" != x; then
18604           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18605 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18606         fi
18607         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18608       fi
18609     fi
18610 
18611     # Now join together the path and the arguments once again
18612     if test "x$arguments" != xEOL; then
18613       new_complete="$new_path ${arguments% *}"
18614     else
18615       new_complete="$new_path"
18616     fi
18617 
18618     if test "x$complete" != "x$new_complete"; then
18619       FOUND_MAKE="$new_complete"
18620       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18621 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18622     fi
18623   fi
18624 
18625         fi
18626       fi
18627     fi
18628   fi
18629 
18630         fi
18631         PATH=$OLD_PATH
18632       fi
18633     fi
18634 
18635     if test "x$FOUND_MAKE" = x; then
18636       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
18637     fi
18638 
18639   else
18640     # The variable is set, but is it from the command line or the environment?
18641 
18642     # Try to remove the string !MAKE! from our list.
18643     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18644     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18645       # If it failed, the variable was not from the command line. Ignore it,
18646       # but warn the user (except for BASH, which is always set by the calling BASH).
18647       if test "xMAKE" != xBASH; then
18648         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18649 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18650       fi
18651       # Try to locate tool using the code snippet
18652 
18653     # Try our hardest to locate a correct version of GNU make
18654     for ac_prog in gmake
18655 do
18656   # Extract the first word of "$ac_prog", so it can be a program name with args.
18657 set dummy $ac_prog; ac_word=$2
18658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18659 $as_echo_n "checking for $ac_word... " >&6; }
18660 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18661   $as_echo_n "(cached) " >&6
18662 else
18663   case $CHECK_GMAKE in
18664   [\\/]* | ?:[\\/]*)
18665   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18666   ;;
18667   *)
18668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18669 for as_dir in $PATH
18670 do
18671   IFS=$as_save_IFS
18672   test -z "$as_dir" && as_dir=.
18673     for ac_exec_ext in '' $ac_executable_extensions; do
18674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18675     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18677     break 2
18678   fi
18679 done
18680   done
18681 IFS=$as_save_IFS
18682 
18683   ;;
18684 esac
18685 fi
18686 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18687 if test -n "$CHECK_GMAKE"; then
18688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18689 $as_echo "$CHECK_GMAKE" >&6; }
18690 else
18691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18692 $as_echo "no" >&6; }
18693 fi
18694 
18695 
18696   test -n "$CHECK_GMAKE" && break
18697 done
18698 
18699 
18700   MAKE_CANDIDATE=""$CHECK_GMAKE""
18701   DESCRIPTION="gmake in PATH"
18702 
18703   # On Cygwin, we require a newer version of make than on other platforms
18704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18705     MAKE_VERSION_EXPR="-e 4\."
18706     MAKE_REQUIRED_VERSION="4.0"
18707    else
18708     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18709     MAKE_REQUIRED_VERSION="3.81"
18710   fi
18711 
18712   if test "x$MAKE_CANDIDATE" != x; then
18713     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18714 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18715     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18716     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18717     if test "x$IS_GNU_MAKE" = x; then
18718       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18719 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18720     else
18721       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18722       if test "x$IS_MODERN_MAKE" = x; then
18723         { $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
18724 $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;}
18725       else
18726         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18727           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18728             MAKE_EXPECTED_ENV='cygwin'
18729           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18730             MAKE_EXPECTED_ENV='msys'
18731           else
18732             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18733           fi
18734           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18735           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18736         else
18737           # Not relevant for non-Windows
18738           IS_MAKE_CORRECT_ENV=true
18739         fi
18740         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18741           { $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
18742 $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;}
18743         else
18744           FOUND_MAKE=$MAKE_CANDIDATE
18745 
18746   # Only process if variable expands to non-empty
18747 
18748   if test "x$FOUND_MAKE" != x; then
18749     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18750 
18751   # First separate the path from the arguments. This will split at the first
18752   # space.
18753   complete="$FOUND_MAKE"
18754   path="${complete%% *}"
18755   tmp="$complete EOL"
18756   arguments="${tmp#* }"
18757 
18758   # Input might be given as Windows format, start by converting to
18759   # unix format.
18760   new_path=`$CYGPATH -u "$path"`
18761 
18762   # Now try to locate executable using which
18763   new_path=`$WHICH "$new_path" 2> /dev/null`
18764   # bat and cmd files are not always considered executable in cygwin causing which
18765   # to not find them
18766   if test "x$new_path" = x \
18767       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18768       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18769     new_path=`$CYGPATH -u "$path"`
18770   fi
18771   if test "x$new_path" = x; then
18772     # Oops. Which didn't find the executable.
18773     # The splitting of arguments from the executable at a space might have been incorrect,
18774     # since paths with space are more likely in Windows. Give it another try with the whole
18775     # argument.
18776     path="$complete"
18777     arguments="EOL"
18778     new_path=`$CYGPATH -u "$path"`
18779     new_path=`$WHICH "$new_path" 2> /dev/null`
18780     # bat and cmd files are not always considered executable in cygwin causing which
18781     # to not find them
18782     if test "x$new_path" = x \
18783         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18784         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18785       new_path=`$CYGPATH -u "$path"`
18786     fi
18787     if test "x$new_path" = x; then
18788       # It's still not found. Now this is an unrecoverable error.
18789       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18790 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18791       has_space=`$ECHO "$complete" | $GREP " "`
18792       if test "x$has_space" != x; then
18793         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18794 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18795       fi
18796       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18797     fi
18798   fi
18799 
18800   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18801   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18802   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18803   # "foo.exe" is OK but "foo" is an error.
18804   #
18805   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18806   # It is also a way to make sure we got the proper file name for the real test later on.
18807   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18808   if test "x$test_shortpath" = x; then
18809     # Short path failed, file does not exist as specified.
18810     # Try adding .exe or .cmd
18811     if test -f "${new_path}.exe"; then
18812       input_to_shortpath="${new_path}.exe"
18813     elif test -f "${new_path}.cmd"; then
18814       input_to_shortpath="${new_path}.cmd"
18815     else
18816       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18817 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18818       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18819 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18820       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18821     fi
18822   else
18823     input_to_shortpath="$new_path"
18824   fi
18825 
18826   # Call helper function which possibly converts this using DOS-style short mode.
18827   # If so, the updated path is stored in $new_path.
18828   new_path="$input_to_shortpath"
18829 
18830   input_path="$input_to_shortpath"
18831   # Check if we need to convert this using DOS-style short mode. If the path
18832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18833   # take no chances and rewrite it.
18834   # Note: m4 eats our [], so we need to use [ and ] instead.
18835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18836   if test "x$has_forbidden_chars" != x; then
18837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18838     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18839     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18840     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18841       # Going to short mode and back again did indeed matter. Since short mode is
18842       # case insensitive, let's make it lowercase to improve readability.
18843       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18844       # Now convert it back to Unix-style (cygpath)
18845       input_path=`$CYGPATH -u "$shortmode_path"`
18846       new_path="$input_path"
18847     fi
18848   fi
18849 
18850   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18851   if test "x$test_cygdrive_prefix" = x; then
18852     # As a simple fix, exclude /usr/bin since it's not a real path.
18853     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18854       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18855       # a path prefixed by /cygdrive for fixpath to work.
18856       new_path="$CYGWIN_ROOT_PATH$input_path"
18857     fi
18858   fi
18859 
18860   # remove trailing .exe if any
18861   new_path="${new_path/%.exe/}"
18862 
18863     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18864 
18865   # First separate the path from the arguments. This will split at the first
18866   # space.
18867   complete="$FOUND_MAKE"
18868   path="${complete%% *}"
18869   tmp="$complete EOL"
18870   arguments="${tmp#* }"
18871 
18872   # Input might be given as Windows format, start by converting to
18873   # unix format.
18874   new_path="$path"
18875 
18876   windows_path="$new_path"
18877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18878     unix_path=`$CYGPATH -u "$windows_path"`
18879     new_path="$unix_path"
18880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18882     new_path="$unix_path"
18883   fi
18884 
18885 
18886   # Now try to locate executable using which
18887   new_path=`$WHICH "$new_path" 2> /dev/null`
18888 
18889   if test "x$new_path" = x; then
18890     # Oops. Which didn't find the executable.
18891     # The splitting of arguments from the executable at a space might have been incorrect,
18892     # since paths with space are more likely in Windows. Give it another try with the whole
18893     # argument.
18894     path="$complete"
18895     arguments="EOL"
18896     new_path="$path"
18897 
18898   windows_path="$new_path"
18899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18900     unix_path=`$CYGPATH -u "$windows_path"`
18901     new_path="$unix_path"
18902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18903     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18904     new_path="$unix_path"
18905   fi
18906 
18907 
18908     new_path=`$WHICH "$new_path" 2> /dev/null`
18909     # bat and cmd files are not always considered executable in MSYS causing which
18910     # to not find them
18911     if test "x$new_path" = x \
18912         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18913         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18914       new_path="$path"
18915 
18916   windows_path="$new_path"
18917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18918     unix_path=`$CYGPATH -u "$windows_path"`
18919     new_path="$unix_path"
18920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18922     new_path="$unix_path"
18923   fi
18924 
18925     fi
18926 
18927     if test "x$new_path" = x; then
18928       # It's still not found. Now this is an unrecoverable error.
18929       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18930 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18931       has_space=`$ECHO "$complete" | $GREP " "`
18932       if test "x$has_space" != x; then
18933         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18934 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18935       fi
18936       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18937     fi
18938   fi
18939 
18940   # Now new_path has a complete unix path to the binary
18941   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18942     # Keep paths in /bin as-is, but remove trailing .exe if any
18943     new_path="${new_path/%.exe/}"
18944     # Do not save /bin paths to all_fixpath_prefixes!
18945   else
18946     # Not in mixed or Windows style, start by that.
18947     new_path=`cmd //c echo $new_path`
18948 
18949   input_path="$new_path"
18950   # Check if we need to convert this using DOS-style short mode. If the path
18951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18952   # take no chances and rewrite it.
18953   # Note: m4 eats our [], so we need to use [ and ] instead.
18954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18955   if test "x$has_forbidden_chars" != x; then
18956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18957     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18958   fi
18959 
18960     # Output is in $new_path
18961 
18962   windows_path="$new_path"
18963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18964     unix_path=`$CYGPATH -u "$windows_path"`
18965     new_path="$unix_path"
18966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18968     new_path="$unix_path"
18969   fi
18970 
18971     # remove trailing .exe if any
18972     new_path="${new_path/%.exe/}"
18973 
18974     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18975     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18976   fi
18977 
18978     else
18979       # We're on a unix platform. Hooray! :)
18980       # First separate the path from the arguments. This will split at the first
18981       # space.
18982       complete="$FOUND_MAKE"
18983       path="${complete%% *}"
18984       tmp="$complete EOL"
18985       arguments="${tmp#* }"
18986 
18987       # Cannot rely on the command "which" here since it doesn't always work.
18988       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18989       if test -z "$is_absolute_path"; then
18990         # Path to executable is not absolute. Find it.
18991         IFS_save="$IFS"
18992         IFS=:
18993         for p in $PATH; do
18994           if test -f "$p/$path" && test -x "$p/$path"; then
18995             new_path="$p/$path"
18996             break
18997           fi
18998         done
18999         IFS="$IFS_save"
19000       else
19001         # This is an absolute path, we can use it without further modifications.
19002         new_path="$path"
19003       fi
19004 
19005       if test "x$new_path" = x; then
19006         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19007 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19008         has_space=`$ECHO "$complete" | $GREP " "`
19009         if test "x$has_space" != x; then
19010           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19011 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19012         fi
19013         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19014       fi
19015     fi
19016 
19017     # Now join together the path and the arguments once again
19018     if test "x$arguments" != xEOL; then
19019       new_complete="$new_path ${arguments% *}"
19020     else
19021       new_complete="$new_path"
19022     fi
19023 
19024     if test "x$complete" != "x$new_complete"; then
19025       FOUND_MAKE="$new_complete"
19026       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19027 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19028     fi
19029   fi
19030 
19031         fi
19032       fi
19033     fi
19034   fi
19035 
19036 
19037     if test "x$FOUND_MAKE" = x; then
19038       for ac_prog in make
19039 do
19040   # Extract the first word of "$ac_prog", so it can be a program name with args.
19041 set dummy $ac_prog; ac_word=$2
19042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19043 $as_echo_n "checking for $ac_word... " >&6; }
19044 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19045   $as_echo_n "(cached) " >&6
19046 else
19047   case $CHECK_MAKE in
19048   [\\/]* | ?:[\\/]*)
19049   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19050   ;;
19051   *)
19052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19053 for as_dir in $PATH
19054 do
19055   IFS=$as_save_IFS
19056   test -z "$as_dir" && as_dir=.
19057     for ac_exec_ext in '' $ac_executable_extensions; do
19058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19059     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19061     break 2
19062   fi
19063 done
19064   done
19065 IFS=$as_save_IFS
19066 
19067   ;;
19068 esac
19069 fi
19070 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19071 if test -n "$CHECK_MAKE"; then
19072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19073 $as_echo "$CHECK_MAKE" >&6; }
19074 else
19075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19076 $as_echo "no" >&6; }
19077 fi
19078 
19079 
19080   test -n "$CHECK_MAKE" && break
19081 done
19082 
19083 
19084   MAKE_CANDIDATE=""$CHECK_MAKE""
19085   DESCRIPTION="make in PATH"
19086 
19087   # On Cygwin, we require a newer version of make than on other platforms
19088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19089     MAKE_VERSION_EXPR="-e 4\."
19090     MAKE_REQUIRED_VERSION="4.0"
19091    else
19092     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19093     MAKE_REQUIRED_VERSION="3.81"
19094   fi
19095 
19096   if test "x$MAKE_CANDIDATE" != x; then
19097     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19098 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19099     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19100     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19101     if test "x$IS_GNU_MAKE" = x; then
19102       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19103 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19104     else
19105       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19106       if test "x$IS_MODERN_MAKE" = x; then
19107         { $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
19108 $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;}
19109       else
19110         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19111           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19112             MAKE_EXPECTED_ENV='cygwin'
19113           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19114             MAKE_EXPECTED_ENV='msys'
19115           else
19116             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19117           fi
19118           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19119           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19120         else
19121           # Not relevant for non-Windows
19122           IS_MAKE_CORRECT_ENV=true
19123         fi
19124         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19125           { $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
19126 $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;}
19127         else
19128           FOUND_MAKE=$MAKE_CANDIDATE
19129 
19130   # Only process if variable expands to non-empty
19131 
19132   if test "x$FOUND_MAKE" != x; then
19133     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19134 
19135   # First separate the path from the arguments. This will split at the first
19136   # space.
19137   complete="$FOUND_MAKE"
19138   path="${complete%% *}"
19139   tmp="$complete EOL"
19140   arguments="${tmp#* }"
19141 
19142   # Input might be given as Windows format, start by converting to
19143   # unix format.
19144   new_path=`$CYGPATH -u "$path"`
19145 
19146   # Now try to locate executable using which
19147   new_path=`$WHICH "$new_path" 2> /dev/null`
19148   # bat and cmd files are not always considered executable in cygwin causing which
19149   # to not find them
19150   if test "x$new_path" = x \
19151       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19152       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19153     new_path=`$CYGPATH -u "$path"`
19154   fi
19155   if test "x$new_path" = x; then
19156     # Oops. Which didn't find the executable.
19157     # The splitting of arguments from the executable at a space might have been incorrect,
19158     # since paths with space are more likely in Windows. Give it another try with the whole
19159     # argument.
19160     path="$complete"
19161     arguments="EOL"
19162     new_path=`$CYGPATH -u "$path"`
19163     new_path=`$WHICH "$new_path" 2> /dev/null`
19164     # bat and cmd files are not always considered executable in cygwin causing which
19165     # to not find them
19166     if test "x$new_path" = x \
19167         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19168         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19169       new_path=`$CYGPATH -u "$path"`
19170     fi
19171     if test "x$new_path" = x; then
19172       # It's still not found. Now this is an unrecoverable error.
19173       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19174 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19175       has_space=`$ECHO "$complete" | $GREP " "`
19176       if test "x$has_space" != x; then
19177         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19178 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19179       fi
19180       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19181     fi
19182   fi
19183 
19184   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19185   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19186   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19187   # "foo.exe" is OK but "foo" is an error.
19188   #
19189   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19190   # It is also a way to make sure we got the proper file name for the real test later on.
19191   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19192   if test "x$test_shortpath" = x; then
19193     # Short path failed, file does not exist as specified.
19194     # Try adding .exe or .cmd
19195     if test -f "${new_path}.exe"; then
19196       input_to_shortpath="${new_path}.exe"
19197     elif test -f "${new_path}.cmd"; then
19198       input_to_shortpath="${new_path}.cmd"
19199     else
19200       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19201 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19202       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19203 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19204       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19205     fi
19206   else
19207     input_to_shortpath="$new_path"
19208   fi
19209 
19210   # Call helper function which possibly converts this using DOS-style short mode.
19211   # If so, the updated path is stored in $new_path.
19212   new_path="$input_to_shortpath"
19213 
19214   input_path="$input_to_shortpath"
19215   # Check if we need to convert this using DOS-style short mode. If the path
19216   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19217   # take no chances and rewrite it.
19218   # Note: m4 eats our [], so we need to use [ and ] instead.
19219   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19220   if test "x$has_forbidden_chars" != x; then
19221     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19222     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19223     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19224     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19225       # Going to short mode and back again did indeed matter. Since short mode is
19226       # case insensitive, let's make it lowercase to improve readability.
19227       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19228       # Now convert it back to Unix-style (cygpath)
19229       input_path=`$CYGPATH -u "$shortmode_path"`
19230       new_path="$input_path"
19231     fi
19232   fi
19233 
19234   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19235   if test "x$test_cygdrive_prefix" = x; then
19236     # As a simple fix, exclude /usr/bin since it's not a real path.
19237     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19238       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19239       # a path prefixed by /cygdrive for fixpath to work.
19240       new_path="$CYGWIN_ROOT_PATH$input_path"
19241     fi
19242   fi
19243 
19244   # remove trailing .exe if any
19245   new_path="${new_path/%.exe/}"
19246 
19247     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19248 
19249   # First separate the path from the arguments. This will split at the first
19250   # space.
19251   complete="$FOUND_MAKE"
19252   path="${complete%% *}"
19253   tmp="$complete EOL"
19254   arguments="${tmp#* }"
19255 
19256   # Input might be given as Windows format, start by converting to
19257   # unix format.
19258   new_path="$path"
19259 
19260   windows_path="$new_path"
19261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19262     unix_path=`$CYGPATH -u "$windows_path"`
19263     new_path="$unix_path"
19264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19266     new_path="$unix_path"
19267   fi
19268 
19269 
19270   # Now try to locate executable using which
19271   new_path=`$WHICH "$new_path" 2> /dev/null`
19272 
19273   if test "x$new_path" = x; then
19274     # Oops. Which didn't find the executable.
19275     # The splitting of arguments from the executable at a space might have been incorrect,
19276     # since paths with space are more likely in Windows. Give it another try with the whole
19277     # argument.
19278     path="$complete"
19279     arguments="EOL"
19280     new_path="$path"
19281 
19282   windows_path="$new_path"
19283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19284     unix_path=`$CYGPATH -u "$windows_path"`
19285     new_path="$unix_path"
19286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19288     new_path="$unix_path"
19289   fi
19290 
19291 
19292     new_path=`$WHICH "$new_path" 2> /dev/null`
19293     # bat and cmd files are not always considered executable in MSYS causing which
19294     # to not find them
19295     if test "x$new_path" = x \
19296         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19297         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19298       new_path="$path"
19299 
19300   windows_path="$new_path"
19301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19302     unix_path=`$CYGPATH -u "$windows_path"`
19303     new_path="$unix_path"
19304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19305     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19306     new_path="$unix_path"
19307   fi
19308 
19309     fi
19310 
19311     if test "x$new_path" = x; then
19312       # It's still not found. Now this is an unrecoverable error.
19313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19314 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19315       has_space=`$ECHO "$complete" | $GREP " "`
19316       if test "x$has_space" != x; then
19317         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19318 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19319       fi
19320       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19321     fi
19322   fi
19323 
19324   # Now new_path has a complete unix path to the binary
19325   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19326     # Keep paths in /bin as-is, but remove trailing .exe if any
19327     new_path="${new_path/%.exe/}"
19328     # Do not save /bin paths to all_fixpath_prefixes!
19329   else
19330     # Not in mixed or Windows style, start by that.
19331     new_path=`cmd //c echo $new_path`
19332 
19333   input_path="$new_path"
19334   # Check if we need to convert this using DOS-style short mode. If the path
19335   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19336   # take no chances and rewrite it.
19337   # Note: m4 eats our [], so we need to use [ and ] instead.
19338   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19339   if test "x$has_forbidden_chars" != x; then
19340     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19341     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19342   fi
19343 
19344     # Output is in $new_path
19345 
19346   windows_path="$new_path"
19347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19348     unix_path=`$CYGPATH -u "$windows_path"`
19349     new_path="$unix_path"
19350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19352     new_path="$unix_path"
19353   fi
19354 
19355     # remove trailing .exe if any
19356     new_path="${new_path/%.exe/}"
19357 
19358     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19359     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19360   fi
19361 
19362     else
19363       # We're on a unix platform. Hooray! :)
19364       # First separate the path from the arguments. This will split at the first
19365       # space.
19366       complete="$FOUND_MAKE"
19367       path="${complete%% *}"
19368       tmp="$complete EOL"
19369       arguments="${tmp#* }"
19370 
19371       # Cannot rely on the command "which" here since it doesn't always work.
19372       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19373       if test -z "$is_absolute_path"; then
19374         # Path to executable is not absolute. Find it.
19375         IFS_save="$IFS"
19376         IFS=:
19377         for p in $PATH; do
19378           if test -f "$p/$path" && test -x "$p/$path"; then
19379             new_path="$p/$path"
19380             break
19381           fi
19382         done
19383         IFS="$IFS_save"
19384       else
19385         # This is an absolute path, we can use it without further modifications.
19386         new_path="$path"
19387       fi
19388 
19389       if test "x$new_path" = x; then
19390         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19391 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19392         has_space=`$ECHO "$complete" | $GREP " "`
19393         if test "x$has_space" != x; then
19394           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19395 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19396         fi
19397         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19398       fi
19399     fi
19400 
19401     # Now join together the path and the arguments once again
19402     if test "x$arguments" != xEOL; then
19403       new_complete="$new_path ${arguments% *}"
19404     else
19405       new_complete="$new_path"
19406     fi
19407 
19408     if test "x$complete" != "x$new_complete"; then
19409       FOUND_MAKE="$new_complete"
19410       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19411 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19412     fi
19413   fi
19414 
19415         fi
19416       fi
19417     fi
19418   fi
19419 
19420     fi
19421 
19422     if test "x$FOUND_MAKE" = x; then
19423       if test "x$TOOLCHAIN_PATH" != x; then
19424         # We have a toolchain path, check that as well before giving up.
19425         OLD_PATH=$PATH
19426         PATH=$TOOLCHAIN_PATH:$PATH
19427         for ac_prog in gmake
19428 do
19429   # Extract the first word of "$ac_prog", so it can be a program name with args.
19430 set dummy $ac_prog; ac_word=$2
19431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19432 $as_echo_n "checking for $ac_word... " >&6; }
19433 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19434   $as_echo_n "(cached) " >&6
19435 else
19436   case $CHECK_TOOLSDIR_GMAKE in
19437   [\\/]* | ?:[\\/]*)
19438   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19439   ;;
19440   *)
19441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19442 for as_dir in $PATH
19443 do
19444   IFS=$as_save_IFS
19445   test -z "$as_dir" && as_dir=.
19446     for ac_exec_ext in '' $ac_executable_extensions; do
19447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19448     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19450     break 2
19451   fi
19452 done
19453   done
19454 IFS=$as_save_IFS
19455 
19456   ;;
19457 esac
19458 fi
19459 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19460 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19462 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19463 else
19464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19465 $as_echo "no" >&6; }
19466 fi
19467 
19468 
19469   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19470 done
19471 
19472 
19473   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19474   DESCRIPTION="gmake in tools-dir"
19475 
19476   # On Cygwin, we require a newer version of make than on other platforms
19477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19478     MAKE_VERSION_EXPR="-e 4\."
19479     MAKE_REQUIRED_VERSION="4.0"
19480    else
19481     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19482     MAKE_REQUIRED_VERSION="3.81"
19483   fi
19484 
19485   if test "x$MAKE_CANDIDATE" != x; then
19486     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19487 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19488     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19489     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19490     if test "x$IS_GNU_MAKE" = x; then
19491       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19492 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19493     else
19494       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19495       if test "x$IS_MODERN_MAKE" = x; then
19496         { $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
19497 $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;}
19498       else
19499         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19500           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19501             MAKE_EXPECTED_ENV='cygwin'
19502           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19503             MAKE_EXPECTED_ENV='msys'
19504           else
19505             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19506           fi
19507           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19508           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19509         else
19510           # Not relevant for non-Windows
19511           IS_MAKE_CORRECT_ENV=true
19512         fi
19513         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19514           { $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
19515 $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;}
19516         else
19517           FOUND_MAKE=$MAKE_CANDIDATE
19518 
19519   # Only process if variable expands to non-empty
19520 
19521   if test "x$FOUND_MAKE" != x; then
19522     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19523 
19524   # First separate the path from the arguments. This will split at the first
19525   # space.
19526   complete="$FOUND_MAKE"
19527   path="${complete%% *}"
19528   tmp="$complete EOL"
19529   arguments="${tmp#* }"
19530 
19531   # Input might be given as Windows format, start by converting to
19532   # unix format.
19533   new_path=`$CYGPATH -u "$path"`
19534 
19535   # Now try to locate executable using which
19536   new_path=`$WHICH "$new_path" 2> /dev/null`
19537   # bat and cmd files are not always considered executable in cygwin causing which
19538   # to not find them
19539   if test "x$new_path" = x \
19540       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19541       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19542     new_path=`$CYGPATH -u "$path"`
19543   fi
19544   if test "x$new_path" = x; then
19545     # Oops. Which didn't find the executable.
19546     # The splitting of arguments from the executable at a space might have been incorrect,
19547     # since paths with space are more likely in Windows. Give it another try with the whole
19548     # argument.
19549     path="$complete"
19550     arguments="EOL"
19551     new_path=`$CYGPATH -u "$path"`
19552     new_path=`$WHICH "$new_path" 2> /dev/null`
19553     # bat and cmd files are not always considered executable in cygwin causing which
19554     # to not find them
19555     if test "x$new_path" = x \
19556         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19557         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19558       new_path=`$CYGPATH -u "$path"`
19559     fi
19560     if test "x$new_path" = x; then
19561       # It's still not found. Now this is an unrecoverable error.
19562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19563 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19564       has_space=`$ECHO "$complete" | $GREP " "`
19565       if test "x$has_space" != x; then
19566         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19567 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19568       fi
19569       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19570     fi
19571   fi
19572 
19573   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19574   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19575   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19576   # "foo.exe" is OK but "foo" is an error.
19577   #
19578   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19579   # It is also a way to make sure we got the proper file name for the real test later on.
19580   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19581   if test "x$test_shortpath" = x; then
19582     # Short path failed, file does not exist as specified.
19583     # Try adding .exe or .cmd
19584     if test -f "${new_path}.exe"; then
19585       input_to_shortpath="${new_path}.exe"
19586     elif test -f "${new_path}.cmd"; then
19587       input_to_shortpath="${new_path}.cmd"
19588     else
19589       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19590 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19591       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19592 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19593       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19594     fi
19595   else
19596     input_to_shortpath="$new_path"
19597   fi
19598 
19599   # Call helper function which possibly converts this using DOS-style short mode.
19600   # If so, the updated path is stored in $new_path.
19601   new_path="$input_to_shortpath"
19602 
19603   input_path="$input_to_shortpath"
19604   # Check if we need to convert this using DOS-style short mode. If the path
19605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19606   # take no chances and rewrite it.
19607   # Note: m4 eats our [], so we need to use [ and ] instead.
19608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19609   if test "x$has_forbidden_chars" != x; then
19610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19611     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19612     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19613     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19614       # Going to short mode and back again did indeed matter. Since short mode is
19615       # case insensitive, let's make it lowercase to improve readability.
19616       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19617       # Now convert it back to Unix-style (cygpath)
19618       input_path=`$CYGPATH -u "$shortmode_path"`
19619       new_path="$input_path"
19620     fi
19621   fi
19622 
19623   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19624   if test "x$test_cygdrive_prefix" = x; then
19625     # As a simple fix, exclude /usr/bin since it's not a real path.
19626     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19627       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19628       # a path prefixed by /cygdrive for fixpath to work.
19629       new_path="$CYGWIN_ROOT_PATH$input_path"
19630     fi
19631   fi
19632 
19633   # remove trailing .exe if any
19634   new_path="${new_path/%.exe/}"
19635 
19636     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19637 
19638   # First separate the path from the arguments. This will split at the first
19639   # space.
19640   complete="$FOUND_MAKE"
19641   path="${complete%% *}"
19642   tmp="$complete EOL"
19643   arguments="${tmp#* }"
19644 
19645   # Input might be given as Windows format, start by converting to
19646   # unix format.
19647   new_path="$path"
19648 
19649   windows_path="$new_path"
19650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19651     unix_path=`$CYGPATH -u "$windows_path"`
19652     new_path="$unix_path"
19653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19655     new_path="$unix_path"
19656   fi
19657 
19658 
19659   # Now try to locate executable using which
19660   new_path=`$WHICH "$new_path" 2> /dev/null`
19661 
19662   if test "x$new_path" = x; then
19663     # Oops. Which didn't find the executable.
19664     # The splitting of arguments from the executable at a space might have been incorrect,
19665     # since paths with space are more likely in Windows. Give it another try with the whole
19666     # argument.
19667     path="$complete"
19668     arguments="EOL"
19669     new_path="$path"
19670 
19671   windows_path="$new_path"
19672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19673     unix_path=`$CYGPATH -u "$windows_path"`
19674     new_path="$unix_path"
19675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19677     new_path="$unix_path"
19678   fi
19679 
19680 
19681     new_path=`$WHICH "$new_path" 2> /dev/null`
19682     # bat and cmd files are not always considered executable in MSYS causing which
19683     # to not find them
19684     if test "x$new_path" = x \
19685         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19686         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19687       new_path="$path"
19688 
19689   windows_path="$new_path"
19690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19691     unix_path=`$CYGPATH -u "$windows_path"`
19692     new_path="$unix_path"
19693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19695     new_path="$unix_path"
19696   fi
19697 
19698     fi
19699 
19700     if test "x$new_path" = x; then
19701       # It's still not found. Now this is an unrecoverable error.
19702       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19703 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19704       has_space=`$ECHO "$complete" | $GREP " "`
19705       if test "x$has_space" != x; then
19706         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19707 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19708       fi
19709       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19710     fi
19711   fi
19712 
19713   # Now new_path has a complete unix path to the binary
19714   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19715     # Keep paths in /bin as-is, but remove trailing .exe if any
19716     new_path="${new_path/%.exe/}"
19717     # Do not save /bin paths to all_fixpath_prefixes!
19718   else
19719     # Not in mixed or Windows style, start by that.
19720     new_path=`cmd //c echo $new_path`
19721 
19722   input_path="$new_path"
19723   # Check if we need to convert this using DOS-style short mode. If the path
19724   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19725   # take no chances and rewrite it.
19726   # Note: m4 eats our [], so we need to use [ and ] instead.
19727   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19728   if test "x$has_forbidden_chars" != x; then
19729     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19730     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19731   fi
19732 
19733     # Output is in $new_path
19734 
19735   windows_path="$new_path"
19736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19737     unix_path=`$CYGPATH -u "$windows_path"`
19738     new_path="$unix_path"
19739   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19740     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19741     new_path="$unix_path"
19742   fi
19743 
19744     # remove trailing .exe if any
19745     new_path="${new_path/%.exe/}"
19746 
19747     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19748     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19749   fi
19750 
19751     else
19752       # We're on a unix platform. Hooray! :)
19753       # First separate the path from the arguments. This will split at the first
19754       # space.
19755       complete="$FOUND_MAKE"
19756       path="${complete%% *}"
19757       tmp="$complete EOL"
19758       arguments="${tmp#* }"
19759 
19760       # Cannot rely on the command "which" here since it doesn't always work.
19761       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19762       if test -z "$is_absolute_path"; then
19763         # Path to executable is not absolute. Find it.
19764         IFS_save="$IFS"
19765         IFS=:
19766         for p in $PATH; do
19767           if test -f "$p/$path" && test -x "$p/$path"; then
19768             new_path="$p/$path"
19769             break
19770           fi
19771         done
19772         IFS="$IFS_save"
19773       else
19774         # This is an absolute path, we can use it without further modifications.
19775         new_path="$path"
19776       fi
19777 
19778       if test "x$new_path" = x; then
19779         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19780 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19781         has_space=`$ECHO "$complete" | $GREP " "`
19782         if test "x$has_space" != x; then
19783           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19784 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19785         fi
19786         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19787       fi
19788     fi
19789 
19790     # Now join together the path and the arguments once again
19791     if test "x$arguments" != xEOL; then
19792       new_complete="$new_path ${arguments% *}"
19793     else
19794       new_complete="$new_path"
19795     fi
19796 
19797     if test "x$complete" != "x$new_complete"; then
19798       FOUND_MAKE="$new_complete"
19799       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19800 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19801     fi
19802   fi
19803 
19804         fi
19805       fi
19806     fi
19807   fi
19808 
19809         if test "x$FOUND_MAKE" = x; then
19810           for ac_prog in make
19811 do
19812   # Extract the first word of "$ac_prog", so it can be a program name with args.
19813 set dummy $ac_prog; ac_word=$2
19814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19815 $as_echo_n "checking for $ac_word... " >&6; }
19816 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19817   $as_echo_n "(cached) " >&6
19818 else
19819   case $CHECK_TOOLSDIR_MAKE in
19820   [\\/]* | ?:[\\/]*)
19821   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19822   ;;
19823   *)
19824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19825 for as_dir in $PATH
19826 do
19827   IFS=$as_save_IFS
19828   test -z "$as_dir" && as_dir=.
19829     for ac_exec_ext in '' $ac_executable_extensions; do
19830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19831     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19833     break 2
19834   fi
19835 done
19836   done
19837 IFS=$as_save_IFS
19838 
19839   ;;
19840 esac
19841 fi
19842 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19843 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19845 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19846 else
19847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19848 $as_echo "no" >&6; }
19849 fi
19850 
19851 
19852   test -n "$CHECK_TOOLSDIR_MAKE" && break
19853 done
19854 
19855 
19856   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19857   DESCRIPTION="make in tools-dir"
19858 
19859   # On Cygwin, we require a newer version of make than on other platforms
19860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19861     MAKE_VERSION_EXPR="-e 4\."
19862     MAKE_REQUIRED_VERSION="4.0"
19863    else
19864     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19865     MAKE_REQUIRED_VERSION="3.81"
19866   fi
19867 
19868   if test "x$MAKE_CANDIDATE" != x; then
19869     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19870 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19871     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19872     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19873     if test "x$IS_GNU_MAKE" = x; then
19874       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19875 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19876     else
19877       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19878       if test "x$IS_MODERN_MAKE" = x; then
19879         { $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
19880 $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;}
19881       else
19882         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19883           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19884             MAKE_EXPECTED_ENV='cygwin'
19885           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19886             MAKE_EXPECTED_ENV='msys'
19887           else
19888             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19889           fi
19890           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19891           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19892         else
19893           # Not relevant for non-Windows
19894           IS_MAKE_CORRECT_ENV=true
19895         fi
19896         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19897           { $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
19898 $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;}
19899         else
19900           FOUND_MAKE=$MAKE_CANDIDATE
19901 
19902   # Only process if variable expands to non-empty
19903 
19904   if test "x$FOUND_MAKE" != x; then
19905     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19906 
19907   # First separate the path from the arguments. This will split at the first
19908   # space.
19909   complete="$FOUND_MAKE"
19910   path="${complete%% *}"
19911   tmp="$complete EOL"
19912   arguments="${tmp#* }"
19913 
19914   # Input might be given as Windows format, start by converting to
19915   # unix format.
19916   new_path=`$CYGPATH -u "$path"`
19917 
19918   # Now try to locate executable using which
19919   new_path=`$WHICH "$new_path" 2> /dev/null`
19920   # bat and cmd files are not always considered executable in cygwin causing which
19921   # to not find them
19922   if test "x$new_path" = x \
19923       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19924       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19925     new_path=`$CYGPATH -u "$path"`
19926   fi
19927   if test "x$new_path" = x; then
19928     # Oops. Which didn't find the executable.
19929     # The splitting of arguments from the executable at a space might have been incorrect,
19930     # since paths with space are more likely in Windows. Give it another try with the whole
19931     # argument.
19932     path="$complete"
19933     arguments="EOL"
19934     new_path=`$CYGPATH -u "$path"`
19935     new_path=`$WHICH "$new_path" 2> /dev/null`
19936     # bat and cmd files are not always considered executable in cygwin causing which
19937     # to not find them
19938     if test "x$new_path" = x \
19939         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19940         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19941       new_path=`$CYGPATH -u "$path"`
19942     fi
19943     if test "x$new_path" = x; then
19944       # It's still not found. Now this is an unrecoverable error.
19945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19946 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19947       has_space=`$ECHO "$complete" | $GREP " "`
19948       if test "x$has_space" != x; then
19949         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19950 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19951       fi
19952       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19953     fi
19954   fi
19955 
19956   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19957   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19958   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19959   # "foo.exe" is OK but "foo" is an error.
19960   #
19961   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19962   # It is also a way to make sure we got the proper file name for the real test later on.
19963   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19964   if test "x$test_shortpath" = x; then
19965     # Short path failed, file does not exist as specified.
19966     # Try adding .exe or .cmd
19967     if test -f "${new_path}.exe"; then
19968       input_to_shortpath="${new_path}.exe"
19969     elif test -f "${new_path}.cmd"; then
19970       input_to_shortpath="${new_path}.cmd"
19971     else
19972       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19973 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19974       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19975 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19976       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19977     fi
19978   else
19979     input_to_shortpath="$new_path"
19980   fi
19981 
19982   # Call helper function which possibly converts this using DOS-style short mode.
19983   # If so, the updated path is stored in $new_path.
19984   new_path="$input_to_shortpath"
19985 
19986   input_path="$input_to_shortpath"
19987   # Check if we need to convert this using DOS-style short mode. If the path
19988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19989   # take no chances and rewrite it.
19990   # Note: m4 eats our [], so we need to use [ and ] instead.
19991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19992   if test "x$has_forbidden_chars" != x; then
19993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19994     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19995     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19996     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19997       # Going to short mode and back again did indeed matter. Since short mode is
19998       # case insensitive, let's make it lowercase to improve readability.
19999       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20000       # Now convert it back to Unix-style (cygpath)
20001       input_path=`$CYGPATH -u "$shortmode_path"`
20002       new_path="$input_path"
20003     fi
20004   fi
20005 
20006   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20007   if test "x$test_cygdrive_prefix" = x; then
20008     # As a simple fix, exclude /usr/bin since it's not a real path.
20009     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20010       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20011       # a path prefixed by /cygdrive for fixpath to work.
20012       new_path="$CYGWIN_ROOT_PATH$input_path"
20013     fi
20014   fi
20015 
20016   # remove trailing .exe if any
20017   new_path="${new_path/%.exe/}"
20018 
20019     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20020 
20021   # First separate the path from the arguments. This will split at the first
20022   # space.
20023   complete="$FOUND_MAKE"
20024   path="${complete%% *}"
20025   tmp="$complete EOL"
20026   arguments="${tmp#* }"
20027 
20028   # Input might be given as Windows format, start by converting to
20029   # unix format.
20030   new_path="$path"
20031 
20032   windows_path="$new_path"
20033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20034     unix_path=`$CYGPATH -u "$windows_path"`
20035     new_path="$unix_path"
20036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20037     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20038     new_path="$unix_path"
20039   fi
20040 
20041 
20042   # Now try to locate executable using which
20043   new_path=`$WHICH "$new_path" 2> /dev/null`
20044 
20045   if test "x$new_path" = x; then
20046     # Oops. Which didn't find the executable.
20047     # The splitting of arguments from the executable at a space might have been incorrect,
20048     # since paths with space are more likely in Windows. Give it another try with the whole
20049     # argument.
20050     path="$complete"
20051     arguments="EOL"
20052     new_path="$path"
20053 
20054   windows_path="$new_path"
20055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20056     unix_path=`$CYGPATH -u "$windows_path"`
20057     new_path="$unix_path"
20058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20060     new_path="$unix_path"
20061   fi
20062 
20063 
20064     new_path=`$WHICH "$new_path" 2> /dev/null`
20065     # bat and cmd files are not always considered executable in MSYS causing which
20066     # to not find them
20067     if test "x$new_path" = x \
20068         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20069         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20070       new_path="$path"
20071 
20072   windows_path="$new_path"
20073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20074     unix_path=`$CYGPATH -u "$windows_path"`
20075     new_path="$unix_path"
20076   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20077     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20078     new_path="$unix_path"
20079   fi
20080 
20081     fi
20082 
20083     if test "x$new_path" = x; then
20084       # It's still not found. Now this is an unrecoverable error.
20085       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20086 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20087       has_space=`$ECHO "$complete" | $GREP " "`
20088       if test "x$has_space" != x; then
20089         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20090 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20091       fi
20092       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20093     fi
20094   fi
20095 
20096   # Now new_path has a complete unix path to the binary
20097   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20098     # Keep paths in /bin as-is, but remove trailing .exe if any
20099     new_path="${new_path/%.exe/}"
20100     # Do not save /bin paths to all_fixpath_prefixes!
20101   else
20102     # Not in mixed or Windows style, start by that.
20103     new_path=`cmd //c echo $new_path`
20104 
20105   input_path="$new_path"
20106   # Check if we need to convert this using DOS-style short mode. If the path
20107   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20108   # take no chances and rewrite it.
20109   # Note: m4 eats our [], so we need to use [ and ] instead.
20110   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20111   if test "x$has_forbidden_chars" != x; then
20112     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20113     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20114   fi
20115 
20116     # Output is in $new_path
20117 
20118   windows_path="$new_path"
20119   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20120     unix_path=`$CYGPATH -u "$windows_path"`
20121     new_path="$unix_path"
20122   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20123     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20124     new_path="$unix_path"
20125   fi
20126 
20127     # remove trailing .exe if any
20128     new_path="${new_path/%.exe/}"
20129 
20130     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20131     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20132   fi
20133 
20134     else
20135       # We're on a unix platform. Hooray! :)
20136       # First separate the path from the arguments. This will split at the first
20137       # space.
20138       complete="$FOUND_MAKE"
20139       path="${complete%% *}"
20140       tmp="$complete EOL"
20141       arguments="${tmp#* }"
20142 
20143       # Cannot rely on the command "which" here since it doesn't always work.
20144       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20145       if test -z "$is_absolute_path"; then
20146         # Path to executable is not absolute. Find it.
20147         IFS_save="$IFS"
20148         IFS=:
20149         for p in $PATH; do
20150           if test -f "$p/$path" && test -x "$p/$path"; then
20151             new_path="$p/$path"
20152             break
20153           fi
20154         done
20155         IFS="$IFS_save"
20156       else
20157         # This is an absolute path, we can use it without further modifications.
20158         new_path="$path"
20159       fi
20160 
20161       if test "x$new_path" = x; then
20162         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20163 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20164         has_space=`$ECHO "$complete" | $GREP " "`
20165         if test "x$has_space" != x; then
20166           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20167 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20168         fi
20169         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20170       fi
20171     fi
20172 
20173     # Now join together the path and the arguments once again
20174     if test "x$arguments" != xEOL; then
20175       new_complete="$new_path ${arguments% *}"
20176     else
20177       new_complete="$new_path"
20178     fi
20179 
20180     if test "x$complete" != "x$new_complete"; then
20181       FOUND_MAKE="$new_complete"
20182       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20183 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20184     fi
20185   fi
20186 
20187         fi
20188       fi
20189     fi
20190   fi
20191 
20192         fi
20193         PATH=$OLD_PATH
20194       fi
20195     fi
20196 
20197     if test "x$FOUND_MAKE" = x; then
20198       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
20199     fi
20200 
20201     else
20202       # If it succeeded, then it was overridden by the user. We will use it
20203       # for the tool.
20204 
20205       # First remove it from the list of overridden variables, so we can test
20206       # for unknown variables in the end.
20207       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20208 
20209       # Check if we try to supply an empty value
20210       if test "x$MAKE" = x; then
20211         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20212 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20213         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20214 $as_echo_n "checking for MAKE... " >&6; }
20215         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20216 $as_echo "disabled" >&6; }
20217       else
20218         # Check if the provided tool contains a complete path.
20219         tool_specified="$MAKE"
20220         tool_basename="${tool_specified##*/}"
20221         if test "x$tool_basename" = "x$tool_specified"; then
20222           # A command without a complete path is provided, search $PATH.
20223           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20224 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20225           # Extract the first word of "$tool_basename", so it can be a program name with args.
20226 set dummy $tool_basename; ac_word=$2
20227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20228 $as_echo_n "checking for $ac_word... " >&6; }
20229 if ${ac_cv_path_MAKE+:} false; then :
20230   $as_echo_n "(cached) " >&6
20231 else
20232   case $MAKE in
20233   [\\/]* | ?:[\\/]*)
20234   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20235   ;;
20236   *)
20237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20238 for as_dir in $PATH
20239 do
20240   IFS=$as_save_IFS
20241   test -z "$as_dir" && as_dir=.
20242     for ac_exec_ext in '' $ac_executable_extensions; do
20243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20244     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20246     break 2
20247   fi
20248 done
20249   done
20250 IFS=$as_save_IFS
20251 
20252   ;;
20253 esac
20254 fi
20255 MAKE=$ac_cv_path_MAKE
20256 if test -n "$MAKE"; then
20257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20258 $as_echo "$MAKE" >&6; }
20259 else
20260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20261 $as_echo "no" >&6; }
20262 fi
20263 
20264 
20265           if test "x$MAKE" = x; then
20266             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20267           fi
20268         else
20269           # Otherwise we believe it is a complete path. Use it as it is.
20270           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20271 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20272           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20273 $as_echo_n "checking for MAKE... " >&6; }
20274           if test ! -x "$tool_specified"; then
20275             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20276 $as_echo "not found" >&6; }
20277             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20278           fi
20279           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20280 $as_echo "$tool_specified" >&6; }
20281         fi
20282       fi
20283     fi
20284 
20285     # If MAKE was set by user, verify the version
20286 
20287   MAKE_CANDIDATE=""$MAKE""
20288   DESCRIPTION="user supplied MAKE=$MAKE"
20289 
20290   # On Cygwin, we require a newer version of make than on other platforms
20291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20292     MAKE_VERSION_EXPR="-e 4\."
20293     MAKE_REQUIRED_VERSION="4.0"
20294    else
20295     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20296     MAKE_REQUIRED_VERSION="3.81"
20297   fi
20298 
20299   if test "x$MAKE_CANDIDATE" != x; then
20300     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20301 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20302     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20303     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20304     if test "x$IS_GNU_MAKE" = x; then
20305       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20306 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20307     else
20308       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20309       if test "x$IS_MODERN_MAKE" = x; then
20310         { $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
20311 $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;}
20312       else
20313         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20314           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20315             MAKE_EXPECTED_ENV='cygwin'
20316           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20317             MAKE_EXPECTED_ENV='msys'
20318           else
20319             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20320           fi
20321           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20322           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20323         else
20324           # Not relevant for non-Windows
20325           IS_MAKE_CORRECT_ENV=true
20326         fi
20327         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20328           { $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
20329 $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;}
20330         else
20331           FOUND_MAKE=$MAKE_CANDIDATE
20332 
20333   # Only process if variable expands to non-empty
20334 
20335   if test "x$FOUND_MAKE" != x; then
20336     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20337 
20338   # First separate the path from the arguments. This will split at the first
20339   # space.
20340   complete="$FOUND_MAKE"
20341   path="${complete%% *}"
20342   tmp="$complete EOL"
20343   arguments="${tmp#* }"
20344 
20345   # Input might be given as Windows format, start by converting to
20346   # unix format.
20347   new_path=`$CYGPATH -u "$path"`
20348 
20349   # Now try to locate executable using which
20350   new_path=`$WHICH "$new_path" 2> /dev/null`
20351   # bat and cmd files are not always considered executable in cygwin causing which
20352   # to not find them
20353   if test "x$new_path" = x \
20354       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20355       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20356     new_path=`$CYGPATH -u "$path"`
20357   fi
20358   if test "x$new_path" = x; then
20359     # Oops. Which didn't find the executable.
20360     # The splitting of arguments from the executable at a space might have been incorrect,
20361     # since paths with space are more likely in Windows. Give it another try with the whole
20362     # argument.
20363     path="$complete"
20364     arguments="EOL"
20365     new_path=`$CYGPATH -u "$path"`
20366     new_path=`$WHICH "$new_path" 2> /dev/null`
20367     # bat and cmd files are not always considered executable in cygwin causing which
20368     # to not find them
20369     if test "x$new_path" = x \
20370         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20371         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20372       new_path=`$CYGPATH -u "$path"`
20373     fi
20374     if test "x$new_path" = x; then
20375       # It's still not found. Now this is an unrecoverable error.
20376       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20377 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20378       has_space=`$ECHO "$complete" | $GREP " "`
20379       if test "x$has_space" != x; then
20380         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20381 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20382       fi
20383       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20384     fi
20385   fi
20386 
20387   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20388   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20389   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20390   # "foo.exe" is OK but "foo" is an error.
20391   #
20392   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20393   # It is also a way to make sure we got the proper file name for the real test later on.
20394   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20395   if test "x$test_shortpath" = x; then
20396     # Short path failed, file does not exist as specified.
20397     # Try adding .exe or .cmd
20398     if test -f "${new_path}.exe"; then
20399       input_to_shortpath="${new_path}.exe"
20400     elif test -f "${new_path}.cmd"; then
20401       input_to_shortpath="${new_path}.cmd"
20402     else
20403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20404 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20405       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20406 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20407       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20408     fi
20409   else
20410     input_to_shortpath="$new_path"
20411   fi
20412 
20413   # Call helper function which possibly converts this using DOS-style short mode.
20414   # If so, the updated path is stored in $new_path.
20415   new_path="$input_to_shortpath"
20416 
20417   input_path="$input_to_shortpath"
20418   # Check if we need to convert this using DOS-style short mode. If the path
20419   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20420   # take no chances and rewrite it.
20421   # Note: m4 eats our [], so we need to use [ and ] instead.
20422   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20423   if test "x$has_forbidden_chars" != x; then
20424     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20425     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20426     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20427     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20428       # Going to short mode and back again did indeed matter. Since short mode is
20429       # case insensitive, let's make it lowercase to improve readability.
20430       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20431       # Now convert it back to Unix-style (cygpath)
20432       input_path=`$CYGPATH -u "$shortmode_path"`
20433       new_path="$input_path"
20434     fi
20435   fi
20436 
20437   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20438   if test "x$test_cygdrive_prefix" = x; then
20439     # As a simple fix, exclude /usr/bin since it's not a real path.
20440     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20441       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20442       # a path prefixed by /cygdrive for fixpath to work.
20443       new_path="$CYGWIN_ROOT_PATH$input_path"
20444     fi
20445   fi
20446 
20447   # remove trailing .exe if any
20448   new_path="${new_path/%.exe/}"
20449 
20450     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20451 
20452   # First separate the path from the arguments. This will split at the first
20453   # space.
20454   complete="$FOUND_MAKE"
20455   path="${complete%% *}"
20456   tmp="$complete EOL"
20457   arguments="${tmp#* }"
20458 
20459   # Input might be given as Windows format, start by converting to
20460   # unix format.
20461   new_path="$path"
20462 
20463   windows_path="$new_path"
20464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20465     unix_path=`$CYGPATH -u "$windows_path"`
20466     new_path="$unix_path"
20467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20469     new_path="$unix_path"
20470   fi
20471 
20472 
20473   # Now try to locate executable using which
20474   new_path=`$WHICH "$new_path" 2> /dev/null`
20475 
20476   if test "x$new_path" = x; then
20477     # Oops. Which didn't find the executable.
20478     # The splitting of arguments from the executable at a space might have been incorrect,
20479     # since paths with space are more likely in Windows. Give it another try with the whole
20480     # argument.
20481     path="$complete"
20482     arguments="EOL"
20483     new_path="$path"
20484 
20485   windows_path="$new_path"
20486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20487     unix_path=`$CYGPATH -u "$windows_path"`
20488     new_path="$unix_path"
20489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20491     new_path="$unix_path"
20492   fi
20493 
20494 
20495     new_path=`$WHICH "$new_path" 2> /dev/null`
20496     # bat and cmd files are not always considered executable in MSYS causing which
20497     # to not find them
20498     if test "x$new_path" = x \
20499         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20500         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20501       new_path="$path"
20502 
20503   windows_path="$new_path"
20504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20505     unix_path=`$CYGPATH -u "$windows_path"`
20506     new_path="$unix_path"
20507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20508     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20509     new_path="$unix_path"
20510   fi
20511 
20512     fi
20513 
20514     if test "x$new_path" = x; then
20515       # It's still not found. Now this is an unrecoverable error.
20516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20517 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20518       has_space=`$ECHO "$complete" | $GREP " "`
20519       if test "x$has_space" != x; then
20520         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20521 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20522       fi
20523       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20524     fi
20525   fi
20526 
20527   # Now new_path has a complete unix path to the binary
20528   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20529     # Keep paths in /bin as-is, but remove trailing .exe if any
20530     new_path="${new_path/%.exe/}"
20531     # Do not save /bin paths to all_fixpath_prefixes!
20532   else
20533     # Not in mixed or Windows style, start by that.
20534     new_path=`cmd //c echo $new_path`
20535 
20536   input_path="$new_path"
20537   # Check if we need to convert this using DOS-style short mode. If the path
20538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20539   # take no chances and rewrite it.
20540   # Note: m4 eats our [], so we need to use [ and ] instead.
20541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20542   if test "x$has_forbidden_chars" != x; then
20543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20544     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20545   fi
20546 
20547     # Output is in $new_path
20548 
20549   windows_path="$new_path"
20550   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20551     unix_path=`$CYGPATH -u "$windows_path"`
20552     new_path="$unix_path"
20553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20554     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20555     new_path="$unix_path"
20556   fi
20557 
20558     # remove trailing .exe if any
20559     new_path="${new_path/%.exe/}"
20560 
20561     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20562     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20563   fi
20564 
20565     else
20566       # We're on a unix platform. Hooray! :)
20567       # First separate the path from the arguments. This will split at the first
20568       # space.
20569       complete="$FOUND_MAKE"
20570       path="${complete%% *}"
20571       tmp="$complete EOL"
20572       arguments="${tmp#* }"
20573 
20574       # Cannot rely on the command "which" here since it doesn't always work.
20575       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20576       if test -z "$is_absolute_path"; then
20577         # Path to executable is not absolute. Find it.
20578         IFS_save="$IFS"
20579         IFS=:
20580         for p in $PATH; do
20581           if test -f "$p/$path" && test -x "$p/$path"; then
20582             new_path="$p/$path"
20583             break
20584           fi
20585         done
20586         IFS="$IFS_save"
20587       else
20588         # This is an absolute path, we can use it without further modifications.
20589         new_path="$path"
20590       fi
20591 
20592       if test "x$new_path" = x; then
20593         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20594 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20595         has_space=`$ECHO "$complete" | $GREP " "`
20596         if test "x$has_space" != x; then
20597           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20598 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20599         fi
20600         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20601       fi
20602     fi
20603 
20604     # Now join together the path and the arguments once again
20605     if test "x$arguments" != xEOL; then
20606       new_complete="$new_path ${arguments% *}"
20607     else
20608       new_complete="$new_path"
20609     fi
20610 
20611     if test "x$complete" != "x$new_complete"; then
20612       FOUND_MAKE="$new_complete"
20613       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20614 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20615     fi
20616   fi
20617 
20618         fi
20619       fi
20620     fi
20621   fi
20622 
20623     if test "x$FOUND_MAKE" = x; then
20624       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20625     fi
20626 
20627   fi
20628 
20629 
20630   MAKE=$FOUND_MAKE
20631 
20632   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20633 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20634 
20635 
20636   # Check if make supports the output sync option and if so, setup using it.
20637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20638 $as_echo_n "checking if make --output-sync is supported... " >&6; }
20639   if $MAKE --version -O > /dev/null 2>&1; then
20640     OUTPUT_SYNC_SUPPORTED=true
20641     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20642 $as_echo "yes" >&6; }
20643     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20644 $as_echo_n "checking for output-sync value... " >&6; }
20645 
20646 # Check whether --with-output-sync was given.
20647 if test "${with_output_sync+set}" = set; then :
20648   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20649 fi
20650 
20651     if test "x$OUTPUT_SYNC" = "x"; then
20652       OUTPUT_SYNC=none
20653     fi
20654     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20655 $as_echo "$OUTPUT_SYNC" >&6; }
20656     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20657       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20658     fi
20659   else
20660     OUTPUT_SYNC_SUPPORTED=false
20661     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20662 $as_echo "no" >&6; }
20663   fi
20664 
20665 
20666 
20667 
20668 
20669 
20670   # Test if find supports -delete
20671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20672 $as_echo_n "checking if find supports -delete... " >&6; }
20673   FIND_DELETE="-delete"
20674 
20675   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20676 
20677   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20678 
20679   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20680   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20681     # No, it does not.
20682     rm $DELETEDIR/TestIfFindSupportsDelete
20683     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20684       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20685       FIND_DELETE="-print | xargs rm"
20686     else
20687       FIND_DELETE="-exec rm \{\} \+"
20688     fi
20689     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20690 $as_echo "no" >&6; }
20691   else
20692     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20693 $as_echo "yes" >&6; }
20694   fi
20695   rmdir $DELETEDIR
20696 
20697 
20698 
20699   # These tools might not be installed by default,
20700   # need hint on how to install them.
20701 
20702 
20703 
20704   # Publish this variable in the help.
20705 
20706 
20707   if [ -z "${UNZIP+x}" ]; then
20708     # The variable is not set by user, try to locate tool using the code snippet
20709     for ac_prog in unzip
20710 do
20711   # Extract the first word of "$ac_prog", so it can be a program name with args.
20712 set dummy $ac_prog; ac_word=$2
20713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20714 $as_echo_n "checking for $ac_word... " >&6; }
20715 if ${ac_cv_path_UNZIP+:} false; then :
20716   $as_echo_n "(cached) " >&6
20717 else
20718   case $UNZIP in
20719   [\\/]* | ?:[\\/]*)
20720   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20721   ;;
20722   *)
20723   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20724 for as_dir in $PATH
20725 do
20726   IFS=$as_save_IFS
20727   test -z "$as_dir" && as_dir=.
20728     for ac_exec_ext in '' $ac_executable_extensions; do
20729   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20730     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20731     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20732     break 2
20733   fi
20734 done
20735   done
20736 IFS=$as_save_IFS
20737 
20738   ;;
20739 esac
20740 fi
20741 UNZIP=$ac_cv_path_UNZIP
20742 if test -n "$UNZIP"; then
20743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20744 $as_echo "$UNZIP" >&6; }
20745 else
20746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20747 $as_echo "no" >&6; }
20748 fi
20749 
20750 
20751   test -n "$UNZIP" && break
20752 done
20753 
20754   else
20755     # The variable is set, but is it from the command line or the environment?
20756 
20757     # Try to remove the string !UNZIP! from our list.
20758     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20759     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20760       # If it failed, the variable was not from the command line. Ignore it,
20761       # but warn the user (except for BASH, which is always set by the calling BASH).
20762       if test "xUNZIP" != xBASH; then
20763         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20764 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20765       fi
20766       # Try to locate tool using the code snippet
20767       for ac_prog in unzip
20768 do
20769   # Extract the first word of "$ac_prog", so it can be a program name with args.
20770 set dummy $ac_prog; ac_word=$2
20771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20772 $as_echo_n "checking for $ac_word... " >&6; }
20773 if ${ac_cv_path_UNZIP+:} false; then :
20774   $as_echo_n "(cached) " >&6
20775 else
20776   case $UNZIP in
20777   [\\/]* | ?:[\\/]*)
20778   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20779   ;;
20780   *)
20781   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20782 for as_dir in $PATH
20783 do
20784   IFS=$as_save_IFS
20785   test -z "$as_dir" && as_dir=.
20786     for ac_exec_ext in '' $ac_executable_extensions; do
20787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20788     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20790     break 2
20791   fi
20792 done
20793   done
20794 IFS=$as_save_IFS
20795 
20796   ;;
20797 esac
20798 fi
20799 UNZIP=$ac_cv_path_UNZIP
20800 if test -n "$UNZIP"; then
20801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20802 $as_echo "$UNZIP" >&6; }
20803 else
20804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20805 $as_echo "no" >&6; }
20806 fi
20807 
20808 
20809   test -n "$UNZIP" && break
20810 done
20811 
20812     else
20813       # If it succeeded, then it was overridden by the user. We will use it
20814       # for the tool.
20815 
20816       # First remove it from the list of overridden variables, so we can test
20817       # for unknown variables in the end.
20818       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20819 
20820       # Check if we try to supply an empty value
20821       if test "x$UNZIP" = x; then
20822         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20823 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20824         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20825 $as_echo_n "checking for UNZIP... " >&6; }
20826         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20827 $as_echo "disabled" >&6; }
20828       else
20829         # Check if the provided tool contains a complete path.
20830         tool_specified="$UNZIP"
20831         tool_basename="${tool_specified##*/}"
20832         if test "x$tool_basename" = "x$tool_specified"; then
20833           # A command without a complete path is provided, search $PATH.
20834           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20835 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20836           # Extract the first word of "$tool_basename", so it can be a program name with args.
20837 set dummy $tool_basename; ac_word=$2
20838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20839 $as_echo_n "checking for $ac_word... " >&6; }
20840 if ${ac_cv_path_UNZIP+:} false; then :
20841   $as_echo_n "(cached) " >&6
20842 else
20843   case $UNZIP in
20844   [\\/]* | ?:[\\/]*)
20845   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20846   ;;
20847   *)
20848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20849 for as_dir in $PATH
20850 do
20851   IFS=$as_save_IFS
20852   test -z "$as_dir" && as_dir=.
20853     for ac_exec_ext in '' $ac_executable_extensions; do
20854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20855     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20857     break 2
20858   fi
20859 done
20860   done
20861 IFS=$as_save_IFS
20862 
20863   ;;
20864 esac
20865 fi
20866 UNZIP=$ac_cv_path_UNZIP
20867 if test -n "$UNZIP"; then
20868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20869 $as_echo "$UNZIP" >&6; }
20870 else
20871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20872 $as_echo "no" >&6; }
20873 fi
20874 
20875 
20876           if test "x$UNZIP" = x; then
20877             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20878           fi
20879         else
20880           # Otherwise we believe it is a complete path. Use it as it is.
20881           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20882 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20883           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20884 $as_echo_n "checking for UNZIP... " >&6; }
20885           if test ! -x "$tool_specified"; then
20886             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20887 $as_echo "not found" >&6; }
20888             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20889           fi
20890           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20891 $as_echo "$tool_specified" >&6; }
20892         fi
20893       fi
20894     fi
20895 
20896   fi
20897 
20898 
20899 
20900   if test "x$UNZIP" = x; then
20901     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20902   fi
20903 
20904 
20905 
20906 
20907 
20908   # Publish this variable in the help.
20909 
20910 
20911   if [ -z "${ZIP+x}" ]; then
20912     # The variable is not set by user, try to locate tool using the code snippet
20913     for ac_prog in zip
20914 do
20915   # Extract the first word of "$ac_prog", so it can be a program name with args.
20916 set dummy $ac_prog; ac_word=$2
20917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20918 $as_echo_n "checking for $ac_word... " >&6; }
20919 if ${ac_cv_path_ZIP+:} false; then :
20920   $as_echo_n "(cached) " >&6
20921 else
20922   case $ZIP in
20923   [\\/]* | ?:[\\/]*)
20924   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20925   ;;
20926   *)
20927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20928 for as_dir in $PATH
20929 do
20930   IFS=$as_save_IFS
20931   test -z "$as_dir" && as_dir=.
20932     for ac_exec_ext in '' $ac_executable_extensions; do
20933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20934     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20936     break 2
20937   fi
20938 done
20939   done
20940 IFS=$as_save_IFS
20941 
20942   ;;
20943 esac
20944 fi
20945 ZIP=$ac_cv_path_ZIP
20946 if test -n "$ZIP"; then
20947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20948 $as_echo "$ZIP" >&6; }
20949 else
20950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20951 $as_echo "no" >&6; }
20952 fi
20953 
20954 
20955   test -n "$ZIP" && break
20956 done
20957 
20958   else
20959     # The variable is set, but is it from the command line or the environment?
20960 
20961     # Try to remove the string !ZIP! from our list.
20962     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20963     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20964       # If it failed, the variable was not from the command line. Ignore it,
20965       # but warn the user (except for BASH, which is always set by the calling BASH).
20966       if test "xZIP" != xBASH; then
20967         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20968 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20969       fi
20970       # Try to locate tool using the code snippet
20971       for ac_prog in zip
20972 do
20973   # Extract the first word of "$ac_prog", so it can be a program name with args.
20974 set dummy $ac_prog; ac_word=$2
20975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20976 $as_echo_n "checking for $ac_word... " >&6; }
20977 if ${ac_cv_path_ZIP+:} false; then :
20978   $as_echo_n "(cached) " >&6
20979 else
20980   case $ZIP in
20981   [\\/]* | ?:[\\/]*)
20982   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20983   ;;
20984   *)
20985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20986 for as_dir in $PATH
20987 do
20988   IFS=$as_save_IFS
20989   test -z "$as_dir" && as_dir=.
20990     for ac_exec_ext in '' $ac_executable_extensions; do
20991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20992     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20994     break 2
20995   fi
20996 done
20997   done
20998 IFS=$as_save_IFS
20999 
21000   ;;
21001 esac
21002 fi
21003 ZIP=$ac_cv_path_ZIP
21004 if test -n "$ZIP"; then
21005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21006 $as_echo "$ZIP" >&6; }
21007 else
21008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21009 $as_echo "no" >&6; }
21010 fi
21011 
21012 
21013   test -n "$ZIP" && break
21014 done
21015 
21016     else
21017       # If it succeeded, then it was overridden by the user. We will use it
21018       # for the tool.
21019 
21020       # First remove it from the list of overridden variables, so we can test
21021       # for unknown variables in the end.
21022       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21023 
21024       # Check if we try to supply an empty value
21025       if test "x$ZIP" = x; then
21026         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21027 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21028         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21029 $as_echo_n "checking for ZIP... " >&6; }
21030         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21031 $as_echo "disabled" >&6; }
21032       else
21033         # Check if the provided tool contains a complete path.
21034         tool_specified="$ZIP"
21035         tool_basename="${tool_specified##*/}"
21036         if test "x$tool_basename" = "x$tool_specified"; then
21037           # A command without a complete path is provided, search $PATH.
21038           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21039 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21040           # Extract the first word of "$tool_basename", so it can be a program name with args.
21041 set dummy $tool_basename; ac_word=$2
21042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21043 $as_echo_n "checking for $ac_word... " >&6; }
21044 if ${ac_cv_path_ZIP+:} false; then :
21045   $as_echo_n "(cached) " >&6
21046 else
21047   case $ZIP in
21048   [\\/]* | ?:[\\/]*)
21049   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21050   ;;
21051   *)
21052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21053 for as_dir in $PATH
21054 do
21055   IFS=$as_save_IFS
21056   test -z "$as_dir" && as_dir=.
21057     for ac_exec_ext in '' $ac_executable_extensions; do
21058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21059     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21061     break 2
21062   fi
21063 done
21064   done
21065 IFS=$as_save_IFS
21066 
21067   ;;
21068 esac
21069 fi
21070 ZIP=$ac_cv_path_ZIP
21071 if test -n "$ZIP"; then
21072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21073 $as_echo "$ZIP" >&6; }
21074 else
21075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21076 $as_echo "no" >&6; }
21077 fi
21078 
21079 
21080           if test "x$ZIP" = x; then
21081             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21082           fi
21083         else
21084           # Otherwise we believe it is a complete path. Use it as it is.
21085           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21086 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21087           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21088 $as_echo_n "checking for ZIP... " >&6; }
21089           if test ! -x "$tool_specified"; then
21090             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21091 $as_echo "not found" >&6; }
21092             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21093           fi
21094           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21095 $as_echo "$tool_specified" >&6; }
21096         fi
21097       fi
21098     fi
21099 
21100   fi
21101 
21102 
21103 
21104   if test "x$ZIP" = x; then
21105     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21106   fi
21107 
21108 
21109 
21110   # Non-required basic tools
21111 
21112 
21113 
21114   # Publish this variable in the help.
21115 
21116 
21117   if [ -z "${LDD+x}" ]; then
21118     # The variable is not set by user, try to locate tool using the code snippet
21119     for ac_prog in ldd
21120 do
21121   # Extract the first word of "$ac_prog", so it can be a program name with args.
21122 set dummy $ac_prog; ac_word=$2
21123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21124 $as_echo_n "checking for $ac_word... " >&6; }
21125 if ${ac_cv_path_LDD+:} false; then :
21126   $as_echo_n "(cached) " >&6
21127 else
21128   case $LDD in
21129   [\\/]* | ?:[\\/]*)
21130   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21131   ;;
21132   *)
21133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21134 for as_dir in $PATH
21135 do
21136   IFS=$as_save_IFS
21137   test -z "$as_dir" && as_dir=.
21138     for ac_exec_ext in '' $ac_executable_extensions; do
21139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21140     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21142     break 2
21143   fi
21144 done
21145   done
21146 IFS=$as_save_IFS
21147 
21148   ;;
21149 esac
21150 fi
21151 LDD=$ac_cv_path_LDD
21152 if test -n "$LDD"; then
21153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21154 $as_echo "$LDD" >&6; }
21155 else
21156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21157 $as_echo "no" >&6; }
21158 fi
21159 
21160 
21161   test -n "$LDD" && break
21162 done
21163 
21164   else
21165     # The variable is set, but is it from the command line or the environment?
21166 
21167     # Try to remove the string !LDD! from our list.
21168     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21169     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21170       # If it failed, the variable was not from the command line. Ignore it,
21171       # but warn the user (except for BASH, which is always set by the calling BASH).
21172       if test "xLDD" != xBASH; then
21173         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21174 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21175       fi
21176       # Try to locate tool using the code snippet
21177       for ac_prog in ldd
21178 do
21179   # Extract the first word of "$ac_prog", so it can be a program name with args.
21180 set dummy $ac_prog; ac_word=$2
21181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21182 $as_echo_n "checking for $ac_word... " >&6; }
21183 if ${ac_cv_path_LDD+:} false; then :
21184   $as_echo_n "(cached) " >&6
21185 else
21186   case $LDD in
21187   [\\/]* | ?:[\\/]*)
21188   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21189   ;;
21190   *)
21191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21192 for as_dir in $PATH
21193 do
21194   IFS=$as_save_IFS
21195   test -z "$as_dir" && as_dir=.
21196     for ac_exec_ext in '' $ac_executable_extensions; do
21197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21198     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21200     break 2
21201   fi
21202 done
21203   done
21204 IFS=$as_save_IFS
21205 
21206   ;;
21207 esac
21208 fi
21209 LDD=$ac_cv_path_LDD
21210 if test -n "$LDD"; then
21211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21212 $as_echo "$LDD" >&6; }
21213 else
21214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21215 $as_echo "no" >&6; }
21216 fi
21217 
21218 
21219   test -n "$LDD" && break
21220 done
21221 
21222     else
21223       # If it succeeded, then it was overridden by the user. We will use it
21224       # for the tool.
21225 
21226       # First remove it from the list of overridden variables, so we can test
21227       # for unknown variables in the end.
21228       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21229 
21230       # Check if we try to supply an empty value
21231       if test "x$LDD" = x; then
21232         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21233 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21234         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21235 $as_echo_n "checking for LDD... " >&6; }
21236         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21237 $as_echo "disabled" >&6; }
21238       else
21239         # Check if the provided tool contains a complete path.
21240         tool_specified="$LDD"
21241         tool_basename="${tool_specified##*/}"
21242         if test "x$tool_basename" = "x$tool_specified"; then
21243           # A command without a complete path is provided, search $PATH.
21244           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21245 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21246           # Extract the first word of "$tool_basename", so it can be a program name with args.
21247 set dummy $tool_basename; ac_word=$2
21248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21249 $as_echo_n "checking for $ac_word... " >&6; }
21250 if ${ac_cv_path_LDD+:} false; then :
21251   $as_echo_n "(cached) " >&6
21252 else
21253   case $LDD in
21254   [\\/]* | ?:[\\/]*)
21255   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21256   ;;
21257   *)
21258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21259 for as_dir in $PATH
21260 do
21261   IFS=$as_save_IFS
21262   test -z "$as_dir" && as_dir=.
21263     for ac_exec_ext in '' $ac_executable_extensions; do
21264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21265     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21267     break 2
21268   fi
21269 done
21270   done
21271 IFS=$as_save_IFS
21272 
21273   ;;
21274 esac
21275 fi
21276 LDD=$ac_cv_path_LDD
21277 if test -n "$LDD"; then
21278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21279 $as_echo "$LDD" >&6; }
21280 else
21281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21282 $as_echo "no" >&6; }
21283 fi
21284 
21285 
21286           if test "x$LDD" = x; then
21287             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21288           fi
21289         else
21290           # Otherwise we believe it is a complete path. Use it as it is.
21291           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21292 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21293           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21294 $as_echo_n "checking for LDD... " >&6; }
21295           if test ! -x "$tool_specified"; then
21296             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21297 $as_echo "not found" >&6; }
21298             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21299           fi
21300           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21301 $as_echo "$tool_specified" >&6; }
21302         fi
21303       fi
21304     fi
21305 
21306   fi
21307 
21308 
21309   if test "x$LDD" = "x"; then
21310     # List shared lib dependencies is used for
21311     # debug output and checking for forbidden dependencies.
21312     # We can build without it.
21313     LDD="true"
21314   fi
21315 
21316 
21317   # Publish this variable in the help.
21318 
21319 
21320   if [ -z "${OTOOL+x}" ]; then
21321     # The variable is not set by user, try to locate tool using the code snippet
21322     for ac_prog in otool
21323 do
21324   # Extract the first word of "$ac_prog", so it can be a program name with args.
21325 set dummy $ac_prog; ac_word=$2
21326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21327 $as_echo_n "checking for $ac_word... " >&6; }
21328 if ${ac_cv_path_OTOOL+:} false; then :
21329   $as_echo_n "(cached) " >&6
21330 else
21331   case $OTOOL in
21332   [\\/]* | ?:[\\/]*)
21333   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21334   ;;
21335   *)
21336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21337 for as_dir in $PATH
21338 do
21339   IFS=$as_save_IFS
21340   test -z "$as_dir" && as_dir=.
21341     for ac_exec_ext in '' $ac_executable_extensions; do
21342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21343     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21345     break 2
21346   fi
21347 done
21348   done
21349 IFS=$as_save_IFS
21350 
21351   ;;
21352 esac
21353 fi
21354 OTOOL=$ac_cv_path_OTOOL
21355 if test -n "$OTOOL"; then
21356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21357 $as_echo "$OTOOL" >&6; }
21358 else
21359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21360 $as_echo "no" >&6; }
21361 fi
21362 
21363 
21364   test -n "$OTOOL" && break
21365 done
21366 
21367   else
21368     # The variable is set, but is it from the command line or the environment?
21369 
21370     # Try to remove the string !OTOOL! from our list.
21371     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21372     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21373       # If it failed, the variable was not from the command line. Ignore it,
21374       # but warn the user (except for BASH, which is always set by the calling BASH).
21375       if test "xOTOOL" != xBASH; then
21376         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21377 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21378       fi
21379       # Try to locate tool using the code snippet
21380       for ac_prog in otool
21381 do
21382   # Extract the first word of "$ac_prog", so it can be a program name with args.
21383 set dummy $ac_prog; ac_word=$2
21384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21385 $as_echo_n "checking for $ac_word... " >&6; }
21386 if ${ac_cv_path_OTOOL+:} false; then :
21387   $as_echo_n "(cached) " >&6
21388 else
21389   case $OTOOL in
21390   [\\/]* | ?:[\\/]*)
21391   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21392   ;;
21393   *)
21394   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21395 for as_dir in $PATH
21396 do
21397   IFS=$as_save_IFS
21398   test -z "$as_dir" && as_dir=.
21399     for ac_exec_ext in '' $ac_executable_extensions; do
21400   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21401     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21403     break 2
21404   fi
21405 done
21406   done
21407 IFS=$as_save_IFS
21408 
21409   ;;
21410 esac
21411 fi
21412 OTOOL=$ac_cv_path_OTOOL
21413 if test -n "$OTOOL"; then
21414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21415 $as_echo "$OTOOL" >&6; }
21416 else
21417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21418 $as_echo "no" >&6; }
21419 fi
21420 
21421 
21422   test -n "$OTOOL" && break
21423 done
21424 
21425     else
21426       # If it succeeded, then it was overridden by the user. We will use it
21427       # for the tool.
21428 
21429       # First remove it from the list of overridden variables, so we can test
21430       # for unknown variables in the end.
21431       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21432 
21433       # Check if we try to supply an empty value
21434       if test "x$OTOOL" = x; then
21435         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21436 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21437         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21438 $as_echo_n "checking for OTOOL... " >&6; }
21439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21440 $as_echo "disabled" >&6; }
21441       else
21442         # Check if the provided tool contains a complete path.
21443         tool_specified="$OTOOL"
21444         tool_basename="${tool_specified##*/}"
21445         if test "x$tool_basename" = "x$tool_specified"; then
21446           # A command without a complete path is provided, search $PATH.
21447           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21448 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21449           # Extract the first word of "$tool_basename", so it can be a program name with args.
21450 set dummy $tool_basename; ac_word=$2
21451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21452 $as_echo_n "checking for $ac_word... " >&6; }
21453 if ${ac_cv_path_OTOOL+:} false; then :
21454   $as_echo_n "(cached) " >&6
21455 else
21456   case $OTOOL in
21457   [\\/]* | ?:[\\/]*)
21458   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21459   ;;
21460   *)
21461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21462 for as_dir in $PATH
21463 do
21464   IFS=$as_save_IFS
21465   test -z "$as_dir" && as_dir=.
21466     for ac_exec_ext in '' $ac_executable_extensions; do
21467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21468     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21470     break 2
21471   fi
21472 done
21473   done
21474 IFS=$as_save_IFS
21475 
21476   ;;
21477 esac
21478 fi
21479 OTOOL=$ac_cv_path_OTOOL
21480 if test -n "$OTOOL"; then
21481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21482 $as_echo "$OTOOL" >&6; }
21483 else
21484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21485 $as_echo "no" >&6; }
21486 fi
21487 
21488 
21489           if test "x$OTOOL" = x; then
21490             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21491           fi
21492         else
21493           # Otherwise we believe it is a complete path. Use it as it is.
21494           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21495 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21496           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21497 $as_echo_n "checking for OTOOL... " >&6; }
21498           if test ! -x "$tool_specified"; then
21499             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21500 $as_echo "not found" >&6; }
21501             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21502           fi
21503           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21504 $as_echo "$tool_specified" >&6; }
21505         fi
21506       fi
21507     fi
21508 
21509   fi
21510 
21511 
21512   if test "x$OTOOL" = "x"; then
21513     OTOOL="true"
21514   fi
21515 
21516 
21517   # Publish this variable in the help.
21518 
21519 
21520   if [ -z "${READELF+x}" ]; then
21521     # The variable is not set by user, try to locate tool using the code snippet
21522     for ac_prog in greadelf readelf
21523 do
21524   # Extract the first word of "$ac_prog", so it can be a program name with args.
21525 set dummy $ac_prog; ac_word=$2
21526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21527 $as_echo_n "checking for $ac_word... " >&6; }
21528 if ${ac_cv_path_READELF+:} false; then :
21529   $as_echo_n "(cached) " >&6
21530 else
21531   case $READELF in
21532   [\\/]* | ?:[\\/]*)
21533   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21534   ;;
21535   *)
21536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21537 for as_dir in $PATH
21538 do
21539   IFS=$as_save_IFS
21540   test -z "$as_dir" && as_dir=.
21541     for ac_exec_ext in '' $ac_executable_extensions; do
21542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21543     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21545     break 2
21546   fi
21547 done
21548   done
21549 IFS=$as_save_IFS
21550 
21551   ;;
21552 esac
21553 fi
21554 READELF=$ac_cv_path_READELF
21555 if test -n "$READELF"; then
21556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21557 $as_echo "$READELF" >&6; }
21558 else
21559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21560 $as_echo "no" >&6; }
21561 fi
21562 
21563 
21564   test -n "$READELF" && break
21565 done
21566 
21567   else
21568     # The variable is set, but is it from the command line or the environment?
21569 
21570     # Try to remove the string !READELF! from our list.
21571     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21572     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21573       # If it failed, the variable was not from the command line. Ignore it,
21574       # but warn the user (except for BASH, which is always set by the calling BASH).
21575       if test "xREADELF" != xBASH; then
21576         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21577 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21578       fi
21579       # Try to locate tool using the code snippet
21580       for ac_prog in greadelf readelf
21581 do
21582   # Extract the first word of "$ac_prog", so it can be a program name with args.
21583 set dummy $ac_prog; ac_word=$2
21584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21585 $as_echo_n "checking for $ac_word... " >&6; }
21586 if ${ac_cv_path_READELF+:} false; then :
21587   $as_echo_n "(cached) " >&6
21588 else
21589   case $READELF in
21590   [\\/]* | ?:[\\/]*)
21591   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21592   ;;
21593   *)
21594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21595 for as_dir in $PATH
21596 do
21597   IFS=$as_save_IFS
21598   test -z "$as_dir" && as_dir=.
21599     for ac_exec_ext in '' $ac_executable_extensions; do
21600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21601     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21603     break 2
21604   fi
21605 done
21606   done
21607 IFS=$as_save_IFS
21608 
21609   ;;
21610 esac
21611 fi
21612 READELF=$ac_cv_path_READELF
21613 if test -n "$READELF"; then
21614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21615 $as_echo "$READELF" >&6; }
21616 else
21617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21618 $as_echo "no" >&6; }
21619 fi
21620 
21621 
21622   test -n "$READELF" && break
21623 done
21624 
21625     else
21626       # If it succeeded, then it was overridden by the user. We will use it
21627       # for the tool.
21628 
21629       # First remove it from the list of overridden variables, so we can test
21630       # for unknown variables in the end.
21631       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21632 
21633       # Check if we try to supply an empty value
21634       if test "x$READELF" = x; then
21635         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21636 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21637         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21638 $as_echo_n "checking for READELF... " >&6; }
21639         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21640 $as_echo "disabled" >&6; }
21641       else
21642         # Check if the provided tool contains a complete path.
21643         tool_specified="$READELF"
21644         tool_basename="${tool_specified##*/}"
21645         if test "x$tool_basename" = "x$tool_specified"; then
21646           # A command without a complete path is provided, search $PATH.
21647           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21648 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21649           # Extract the first word of "$tool_basename", so it can be a program name with args.
21650 set dummy $tool_basename; ac_word=$2
21651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21652 $as_echo_n "checking for $ac_word... " >&6; }
21653 if ${ac_cv_path_READELF+:} false; then :
21654   $as_echo_n "(cached) " >&6
21655 else
21656   case $READELF in
21657   [\\/]* | ?:[\\/]*)
21658   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21659   ;;
21660   *)
21661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21662 for as_dir in $PATH
21663 do
21664   IFS=$as_save_IFS
21665   test -z "$as_dir" && as_dir=.
21666     for ac_exec_ext in '' $ac_executable_extensions; do
21667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21668     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21670     break 2
21671   fi
21672 done
21673   done
21674 IFS=$as_save_IFS
21675 
21676   ;;
21677 esac
21678 fi
21679 READELF=$ac_cv_path_READELF
21680 if test -n "$READELF"; then
21681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21682 $as_echo "$READELF" >&6; }
21683 else
21684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21685 $as_echo "no" >&6; }
21686 fi
21687 
21688 
21689           if test "x$READELF" = x; then
21690             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21691           fi
21692         else
21693           # Otherwise we believe it is a complete path. Use it as it is.
21694           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21695 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21696           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21697 $as_echo_n "checking for READELF... " >&6; }
21698           if test ! -x "$tool_specified"; then
21699             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21700 $as_echo "not found" >&6; }
21701             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21702           fi
21703           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21704 $as_echo "$tool_specified" >&6; }
21705         fi
21706       fi
21707     fi
21708 
21709   fi
21710 
21711 
21712 
21713 
21714   # Publish this variable in the help.
21715 
21716 
21717   if [ -z "${HG+x}" ]; then
21718     # The variable is not set by user, try to locate tool using the code snippet
21719     for ac_prog in hg
21720 do
21721   # Extract the first word of "$ac_prog", so it can be a program name with args.
21722 set dummy $ac_prog; ac_word=$2
21723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21724 $as_echo_n "checking for $ac_word... " >&6; }
21725 if ${ac_cv_path_HG+:} false; then :
21726   $as_echo_n "(cached) " >&6
21727 else
21728   case $HG in
21729   [\\/]* | ?:[\\/]*)
21730   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21731   ;;
21732   *)
21733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21734 for as_dir in $PATH
21735 do
21736   IFS=$as_save_IFS
21737   test -z "$as_dir" && as_dir=.
21738     for ac_exec_ext in '' $ac_executable_extensions; do
21739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21740     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21742     break 2
21743   fi
21744 done
21745   done
21746 IFS=$as_save_IFS
21747 
21748   ;;
21749 esac
21750 fi
21751 HG=$ac_cv_path_HG
21752 if test -n "$HG"; then
21753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21754 $as_echo "$HG" >&6; }
21755 else
21756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21757 $as_echo "no" >&6; }
21758 fi
21759 
21760 
21761   test -n "$HG" && break
21762 done
21763 
21764   else
21765     # The variable is set, but is it from the command line or the environment?
21766 
21767     # Try to remove the string !HG! from our list.
21768     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21769     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21770       # If it failed, the variable was not from the command line. Ignore it,
21771       # but warn the user (except for BASH, which is always set by the calling BASH).
21772       if test "xHG" != xBASH; then
21773         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21774 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21775       fi
21776       # Try to locate tool using the code snippet
21777       for ac_prog in hg
21778 do
21779   # Extract the first word of "$ac_prog", so it can be a program name with args.
21780 set dummy $ac_prog; ac_word=$2
21781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21782 $as_echo_n "checking for $ac_word... " >&6; }
21783 if ${ac_cv_path_HG+:} false; then :
21784   $as_echo_n "(cached) " >&6
21785 else
21786   case $HG in
21787   [\\/]* | ?:[\\/]*)
21788   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21789   ;;
21790   *)
21791   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21792 for as_dir in $PATH
21793 do
21794   IFS=$as_save_IFS
21795   test -z "$as_dir" && as_dir=.
21796     for ac_exec_ext in '' $ac_executable_extensions; do
21797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21798     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21800     break 2
21801   fi
21802 done
21803   done
21804 IFS=$as_save_IFS
21805 
21806   ;;
21807 esac
21808 fi
21809 HG=$ac_cv_path_HG
21810 if test -n "$HG"; then
21811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21812 $as_echo "$HG" >&6; }
21813 else
21814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21815 $as_echo "no" >&6; }
21816 fi
21817 
21818 
21819   test -n "$HG" && break
21820 done
21821 
21822     else
21823       # If it succeeded, then it was overridden by the user. We will use it
21824       # for the tool.
21825 
21826       # First remove it from the list of overridden variables, so we can test
21827       # for unknown variables in the end.
21828       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21829 
21830       # Check if we try to supply an empty value
21831       if test "x$HG" = x; then
21832         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21833 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21834         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21835 $as_echo_n "checking for HG... " >&6; }
21836         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21837 $as_echo "disabled" >&6; }
21838       else
21839         # Check if the provided tool contains a complete path.
21840         tool_specified="$HG"
21841         tool_basename="${tool_specified##*/}"
21842         if test "x$tool_basename" = "x$tool_specified"; then
21843           # A command without a complete path is provided, search $PATH.
21844           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21845 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21846           # Extract the first word of "$tool_basename", so it can be a program name with args.
21847 set dummy $tool_basename; ac_word=$2
21848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21849 $as_echo_n "checking for $ac_word... " >&6; }
21850 if ${ac_cv_path_HG+:} false; then :
21851   $as_echo_n "(cached) " >&6
21852 else
21853   case $HG in
21854   [\\/]* | ?:[\\/]*)
21855   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21856   ;;
21857   *)
21858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21859 for as_dir in $PATH
21860 do
21861   IFS=$as_save_IFS
21862   test -z "$as_dir" && as_dir=.
21863     for ac_exec_ext in '' $ac_executable_extensions; do
21864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21865     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21867     break 2
21868   fi
21869 done
21870   done
21871 IFS=$as_save_IFS
21872 
21873   ;;
21874 esac
21875 fi
21876 HG=$ac_cv_path_HG
21877 if test -n "$HG"; then
21878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21879 $as_echo "$HG" >&6; }
21880 else
21881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21882 $as_echo "no" >&6; }
21883 fi
21884 
21885 
21886           if test "x$HG" = x; then
21887             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21888           fi
21889         else
21890           # Otherwise we believe it is a complete path. Use it as it is.
21891           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21892 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21893           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21894 $as_echo_n "checking for HG... " >&6; }
21895           if test ! -x "$tool_specified"; then
21896             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21897 $as_echo "not found" >&6; }
21898             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21899           fi
21900           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21901 $as_echo "$tool_specified" >&6; }
21902         fi
21903       fi
21904     fi
21905 
21906   fi
21907 
21908 
21909 
21910 
21911   # Publish this variable in the help.
21912 
21913 
21914   if [ -z "${STAT+x}" ]; then
21915     # The variable is not set by user, try to locate tool using the code snippet
21916     for ac_prog in stat
21917 do
21918   # Extract the first word of "$ac_prog", so it can be a program name with args.
21919 set dummy $ac_prog; ac_word=$2
21920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21921 $as_echo_n "checking for $ac_word... " >&6; }
21922 if ${ac_cv_path_STAT+:} false; then :
21923   $as_echo_n "(cached) " >&6
21924 else
21925   case $STAT in
21926   [\\/]* | ?:[\\/]*)
21927   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21928   ;;
21929   *)
21930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21931 for as_dir in $PATH
21932 do
21933   IFS=$as_save_IFS
21934   test -z "$as_dir" && as_dir=.
21935     for ac_exec_ext in '' $ac_executable_extensions; do
21936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21937     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21939     break 2
21940   fi
21941 done
21942   done
21943 IFS=$as_save_IFS
21944 
21945   ;;
21946 esac
21947 fi
21948 STAT=$ac_cv_path_STAT
21949 if test -n "$STAT"; then
21950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21951 $as_echo "$STAT" >&6; }
21952 else
21953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21954 $as_echo "no" >&6; }
21955 fi
21956 
21957 
21958   test -n "$STAT" && break
21959 done
21960 
21961   else
21962     # The variable is set, but is it from the command line or the environment?
21963 
21964     # Try to remove the string !STAT! from our list.
21965     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21966     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21967       # If it failed, the variable was not from the command line. Ignore it,
21968       # but warn the user (except for BASH, which is always set by the calling BASH).
21969       if test "xSTAT" != xBASH; then
21970         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21971 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21972       fi
21973       # Try to locate tool using the code snippet
21974       for ac_prog in stat
21975 do
21976   # Extract the first word of "$ac_prog", so it can be a program name with args.
21977 set dummy $ac_prog; ac_word=$2
21978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21979 $as_echo_n "checking for $ac_word... " >&6; }
21980 if ${ac_cv_path_STAT+:} false; then :
21981   $as_echo_n "(cached) " >&6
21982 else
21983   case $STAT in
21984   [\\/]* | ?:[\\/]*)
21985   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21986   ;;
21987   *)
21988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21989 for as_dir in $PATH
21990 do
21991   IFS=$as_save_IFS
21992   test -z "$as_dir" && as_dir=.
21993     for ac_exec_ext in '' $ac_executable_extensions; do
21994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21995     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21997     break 2
21998   fi
21999 done
22000   done
22001 IFS=$as_save_IFS
22002 
22003   ;;
22004 esac
22005 fi
22006 STAT=$ac_cv_path_STAT
22007 if test -n "$STAT"; then
22008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22009 $as_echo "$STAT" >&6; }
22010 else
22011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22012 $as_echo "no" >&6; }
22013 fi
22014 
22015 
22016   test -n "$STAT" && break
22017 done
22018 
22019     else
22020       # If it succeeded, then it was overridden by the user. We will use it
22021       # for the tool.
22022 
22023       # First remove it from the list of overridden variables, so we can test
22024       # for unknown variables in the end.
22025       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22026 
22027       # Check if we try to supply an empty value
22028       if test "x$STAT" = x; then
22029         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22030 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22031         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22032 $as_echo_n "checking for STAT... " >&6; }
22033         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22034 $as_echo "disabled" >&6; }
22035       else
22036         # Check if the provided tool contains a complete path.
22037         tool_specified="$STAT"
22038         tool_basename="${tool_specified##*/}"
22039         if test "x$tool_basename" = "x$tool_specified"; then
22040           # A command without a complete path is provided, search $PATH.
22041           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22042 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22043           # Extract the first word of "$tool_basename", so it can be a program name with args.
22044 set dummy $tool_basename; ac_word=$2
22045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22046 $as_echo_n "checking for $ac_word... " >&6; }
22047 if ${ac_cv_path_STAT+:} false; then :
22048   $as_echo_n "(cached) " >&6
22049 else
22050   case $STAT in
22051   [\\/]* | ?:[\\/]*)
22052   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22053   ;;
22054   *)
22055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22056 for as_dir in $PATH
22057 do
22058   IFS=$as_save_IFS
22059   test -z "$as_dir" && as_dir=.
22060     for ac_exec_ext in '' $ac_executable_extensions; do
22061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22062     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22064     break 2
22065   fi
22066 done
22067   done
22068 IFS=$as_save_IFS
22069 
22070   ;;
22071 esac
22072 fi
22073 STAT=$ac_cv_path_STAT
22074 if test -n "$STAT"; then
22075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22076 $as_echo "$STAT" >&6; }
22077 else
22078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22079 $as_echo "no" >&6; }
22080 fi
22081 
22082 
22083           if test "x$STAT" = x; then
22084             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22085           fi
22086         else
22087           # Otherwise we believe it is a complete path. Use it as it is.
22088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22089 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22090           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22091 $as_echo_n "checking for STAT... " >&6; }
22092           if test ! -x "$tool_specified"; then
22093             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22094 $as_echo "not found" >&6; }
22095             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22096           fi
22097           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22098 $as_echo "$tool_specified" >&6; }
22099         fi
22100       fi
22101     fi
22102 
22103   fi
22104 
22105 
22106 
22107 
22108   # Publish this variable in the help.
22109 
22110 
22111   if [ -z "${TIME+x}" ]; then
22112     # The variable is not set by user, try to locate tool using the code snippet
22113     for ac_prog in time
22114 do
22115   # Extract the first word of "$ac_prog", so it can be a program name with args.
22116 set dummy $ac_prog; ac_word=$2
22117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22118 $as_echo_n "checking for $ac_word... " >&6; }
22119 if ${ac_cv_path_TIME+:} false; then :
22120   $as_echo_n "(cached) " >&6
22121 else
22122   case $TIME in
22123   [\\/]* | ?:[\\/]*)
22124   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22125   ;;
22126   *)
22127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22128 for as_dir in $PATH
22129 do
22130   IFS=$as_save_IFS
22131   test -z "$as_dir" && as_dir=.
22132     for ac_exec_ext in '' $ac_executable_extensions; do
22133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22134     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22136     break 2
22137   fi
22138 done
22139   done
22140 IFS=$as_save_IFS
22141 
22142   ;;
22143 esac
22144 fi
22145 TIME=$ac_cv_path_TIME
22146 if test -n "$TIME"; then
22147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22148 $as_echo "$TIME" >&6; }
22149 else
22150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22151 $as_echo "no" >&6; }
22152 fi
22153 
22154 
22155   test -n "$TIME" && break
22156 done
22157 
22158   else
22159     # The variable is set, but is it from the command line or the environment?
22160 
22161     # Try to remove the string !TIME! from our list.
22162     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22163     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22164       # If it failed, the variable was not from the command line. Ignore it,
22165       # but warn the user (except for BASH, which is always set by the calling BASH).
22166       if test "xTIME" != xBASH; then
22167         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22168 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22169       fi
22170       # Try to locate tool using the code snippet
22171       for ac_prog in time
22172 do
22173   # Extract the first word of "$ac_prog", so it can be a program name with args.
22174 set dummy $ac_prog; ac_word=$2
22175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22176 $as_echo_n "checking for $ac_word... " >&6; }
22177 if ${ac_cv_path_TIME+:} false; then :
22178   $as_echo_n "(cached) " >&6
22179 else
22180   case $TIME in
22181   [\\/]* | ?:[\\/]*)
22182   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22183   ;;
22184   *)
22185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22186 for as_dir in $PATH
22187 do
22188   IFS=$as_save_IFS
22189   test -z "$as_dir" && as_dir=.
22190     for ac_exec_ext in '' $ac_executable_extensions; do
22191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22192     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22194     break 2
22195   fi
22196 done
22197   done
22198 IFS=$as_save_IFS
22199 
22200   ;;
22201 esac
22202 fi
22203 TIME=$ac_cv_path_TIME
22204 if test -n "$TIME"; then
22205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22206 $as_echo "$TIME" >&6; }
22207 else
22208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22209 $as_echo "no" >&6; }
22210 fi
22211 
22212 
22213   test -n "$TIME" && break
22214 done
22215 
22216     else
22217       # If it succeeded, then it was overridden by the user. We will use it
22218       # for the tool.
22219 
22220       # First remove it from the list of overridden variables, so we can test
22221       # for unknown variables in the end.
22222       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22223 
22224       # Check if we try to supply an empty value
22225       if test "x$TIME" = x; then
22226         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22227 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22228         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22229 $as_echo_n "checking for TIME... " >&6; }
22230         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22231 $as_echo "disabled" >&6; }
22232       else
22233         # Check if the provided tool contains a complete path.
22234         tool_specified="$TIME"
22235         tool_basename="${tool_specified##*/}"
22236         if test "x$tool_basename" = "x$tool_specified"; then
22237           # A command without a complete path is provided, search $PATH.
22238           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22239 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22240           # Extract the first word of "$tool_basename", so it can be a program name with args.
22241 set dummy $tool_basename; ac_word=$2
22242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22243 $as_echo_n "checking for $ac_word... " >&6; }
22244 if ${ac_cv_path_TIME+:} false; then :
22245   $as_echo_n "(cached) " >&6
22246 else
22247   case $TIME in
22248   [\\/]* | ?:[\\/]*)
22249   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22250   ;;
22251   *)
22252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22253 for as_dir in $PATH
22254 do
22255   IFS=$as_save_IFS
22256   test -z "$as_dir" && as_dir=.
22257     for ac_exec_ext in '' $ac_executable_extensions; do
22258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22259     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22261     break 2
22262   fi
22263 done
22264   done
22265 IFS=$as_save_IFS
22266 
22267   ;;
22268 esac
22269 fi
22270 TIME=$ac_cv_path_TIME
22271 if test -n "$TIME"; then
22272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22273 $as_echo "$TIME" >&6; }
22274 else
22275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22276 $as_echo "no" >&6; }
22277 fi
22278 
22279 
22280           if test "x$TIME" = x; then
22281             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22282           fi
22283         else
22284           # Otherwise we believe it is a complete path. Use it as it is.
22285           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22286 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22287           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22288 $as_echo_n "checking for TIME... " >&6; }
22289           if test ! -x "$tool_specified"; then
22290             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22291 $as_echo "not found" >&6; }
22292             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22293           fi
22294           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22295 $as_echo "$tool_specified" >&6; }
22296         fi
22297       fi
22298     fi
22299 
22300   fi
22301 
22302 
22303 
22304 
22305   # Publish this variable in the help.
22306 
22307 
22308   if [ -z "${DTRACE+x}" ]; then
22309     # The variable is not set by user, try to locate tool using the code snippet
22310     for ac_prog in dtrace
22311 do
22312   # Extract the first word of "$ac_prog", so it can be a program name with args.
22313 set dummy $ac_prog; ac_word=$2
22314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22315 $as_echo_n "checking for $ac_word... " >&6; }
22316 if ${ac_cv_path_DTRACE+:} false; then :
22317   $as_echo_n "(cached) " >&6
22318 else
22319   case $DTRACE in
22320   [\\/]* | ?:[\\/]*)
22321   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22322   ;;
22323   *)
22324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22325 for as_dir in $PATH
22326 do
22327   IFS=$as_save_IFS
22328   test -z "$as_dir" && as_dir=.
22329     for ac_exec_ext in '' $ac_executable_extensions; do
22330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22331     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22333     break 2
22334   fi
22335 done
22336   done
22337 IFS=$as_save_IFS
22338 
22339   ;;
22340 esac
22341 fi
22342 DTRACE=$ac_cv_path_DTRACE
22343 if test -n "$DTRACE"; then
22344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22345 $as_echo "$DTRACE" >&6; }
22346 else
22347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22348 $as_echo "no" >&6; }
22349 fi
22350 
22351 
22352   test -n "$DTRACE" && break
22353 done
22354 
22355   else
22356     # The variable is set, but is it from the command line or the environment?
22357 
22358     # Try to remove the string !DTRACE! from our list.
22359     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22360     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22361       # If it failed, the variable was not from the command line. Ignore it,
22362       # but warn the user (except for BASH, which is always set by the calling BASH).
22363       if test "xDTRACE" != xBASH; then
22364         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22365 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22366       fi
22367       # Try to locate tool using the code snippet
22368       for ac_prog in dtrace
22369 do
22370   # Extract the first word of "$ac_prog", so it can be a program name with args.
22371 set dummy $ac_prog; ac_word=$2
22372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22373 $as_echo_n "checking for $ac_word... " >&6; }
22374 if ${ac_cv_path_DTRACE+:} false; then :
22375   $as_echo_n "(cached) " >&6
22376 else
22377   case $DTRACE in
22378   [\\/]* | ?:[\\/]*)
22379   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22380   ;;
22381   *)
22382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22383 for as_dir in $PATH
22384 do
22385   IFS=$as_save_IFS
22386   test -z "$as_dir" && as_dir=.
22387     for ac_exec_ext in '' $ac_executable_extensions; do
22388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22389     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22391     break 2
22392   fi
22393 done
22394   done
22395 IFS=$as_save_IFS
22396 
22397   ;;
22398 esac
22399 fi
22400 DTRACE=$ac_cv_path_DTRACE
22401 if test -n "$DTRACE"; then
22402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22403 $as_echo "$DTRACE" >&6; }
22404 else
22405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22406 $as_echo "no" >&6; }
22407 fi
22408 
22409 
22410   test -n "$DTRACE" && break
22411 done
22412 
22413     else
22414       # If it succeeded, then it was overridden by the user. We will use it
22415       # for the tool.
22416 
22417       # First remove it from the list of overridden variables, so we can test
22418       # for unknown variables in the end.
22419       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22420 
22421       # Check if we try to supply an empty value
22422       if test "x$DTRACE" = x; then
22423         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22424 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22425         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22426 $as_echo_n "checking for DTRACE... " >&6; }
22427         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22428 $as_echo "disabled" >&6; }
22429       else
22430         # Check if the provided tool contains a complete path.
22431         tool_specified="$DTRACE"
22432         tool_basename="${tool_specified##*/}"
22433         if test "x$tool_basename" = "x$tool_specified"; then
22434           # A command without a complete path is provided, search $PATH.
22435           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22436 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22437           # Extract the first word of "$tool_basename", so it can be a program name with args.
22438 set dummy $tool_basename; ac_word=$2
22439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22440 $as_echo_n "checking for $ac_word... " >&6; }
22441 if ${ac_cv_path_DTRACE+:} false; then :
22442   $as_echo_n "(cached) " >&6
22443 else
22444   case $DTRACE in
22445   [\\/]* | ?:[\\/]*)
22446   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22447   ;;
22448   *)
22449   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22450 for as_dir in $PATH
22451 do
22452   IFS=$as_save_IFS
22453   test -z "$as_dir" && as_dir=.
22454     for ac_exec_ext in '' $ac_executable_extensions; do
22455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22456     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22458     break 2
22459   fi
22460 done
22461   done
22462 IFS=$as_save_IFS
22463 
22464   ;;
22465 esac
22466 fi
22467 DTRACE=$ac_cv_path_DTRACE
22468 if test -n "$DTRACE"; then
22469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22470 $as_echo "$DTRACE" >&6; }
22471 else
22472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22473 $as_echo "no" >&6; }
22474 fi
22475 
22476 
22477           if test "x$DTRACE" = x; then
22478             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22479           fi
22480         else
22481           # Otherwise we believe it is a complete path. Use it as it is.
22482           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22483 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22484           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22485 $as_echo_n "checking for DTRACE... " >&6; }
22486           if test ! -x "$tool_specified"; then
22487             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22488 $as_echo "not found" >&6; }
22489             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22490           fi
22491           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22492 $as_echo "$tool_specified" >&6; }
22493         fi
22494       fi
22495     fi
22496 
22497   fi
22498 
22499 
22500 
22501 
22502   # Publish this variable in the help.
22503 
22504 
22505   if [ -z "${PATCH+x}" ]; then
22506     # The variable is not set by user, try to locate tool using the code snippet
22507     for ac_prog in gpatch patch
22508 do
22509   # Extract the first word of "$ac_prog", so it can be a program name with args.
22510 set dummy $ac_prog; ac_word=$2
22511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22512 $as_echo_n "checking for $ac_word... " >&6; }
22513 if ${ac_cv_path_PATCH+:} false; then :
22514   $as_echo_n "(cached) " >&6
22515 else
22516   case $PATCH in
22517   [\\/]* | ?:[\\/]*)
22518   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22519   ;;
22520   *)
22521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22522 for as_dir in $PATH
22523 do
22524   IFS=$as_save_IFS
22525   test -z "$as_dir" && as_dir=.
22526     for ac_exec_ext in '' $ac_executable_extensions; do
22527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22528     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22530     break 2
22531   fi
22532 done
22533   done
22534 IFS=$as_save_IFS
22535 
22536   ;;
22537 esac
22538 fi
22539 PATCH=$ac_cv_path_PATCH
22540 if test -n "$PATCH"; then
22541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22542 $as_echo "$PATCH" >&6; }
22543 else
22544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22545 $as_echo "no" >&6; }
22546 fi
22547 
22548 
22549   test -n "$PATCH" && break
22550 done
22551 
22552   else
22553     # The variable is set, but is it from the command line or the environment?
22554 
22555     # Try to remove the string !PATCH! from our list.
22556     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22557     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22558       # If it failed, the variable was not from the command line. Ignore it,
22559       # but warn the user (except for BASH, which is always set by the calling BASH).
22560       if test "xPATCH" != xBASH; then
22561         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22562 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22563       fi
22564       # Try to locate tool using the code snippet
22565       for ac_prog in gpatch patch
22566 do
22567   # Extract the first word of "$ac_prog", so it can be a program name with args.
22568 set dummy $ac_prog; ac_word=$2
22569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22570 $as_echo_n "checking for $ac_word... " >&6; }
22571 if ${ac_cv_path_PATCH+:} false; then :
22572   $as_echo_n "(cached) " >&6
22573 else
22574   case $PATCH in
22575   [\\/]* | ?:[\\/]*)
22576   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22577   ;;
22578   *)
22579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22580 for as_dir in $PATH
22581 do
22582   IFS=$as_save_IFS
22583   test -z "$as_dir" && as_dir=.
22584     for ac_exec_ext in '' $ac_executable_extensions; do
22585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22586     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22588     break 2
22589   fi
22590 done
22591   done
22592 IFS=$as_save_IFS
22593 
22594   ;;
22595 esac
22596 fi
22597 PATCH=$ac_cv_path_PATCH
22598 if test -n "$PATCH"; then
22599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22600 $as_echo "$PATCH" >&6; }
22601 else
22602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22603 $as_echo "no" >&6; }
22604 fi
22605 
22606 
22607   test -n "$PATCH" && break
22608 done
22609 
22610     else
22611       # If it succeeded, then it was overridden by the user. We will use it
22612       # for the tool.
22613 
22614       # First remove it from the list of overridden variables, so we can test
22615       # for unknown variables in the end.
22616       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22617 
22618       # Check if we try to supply an empty value
22619       if test "x$PATCH" = x; then
22620         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22621 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22622         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22623 $as_echo_n "checking for PATCH... " >&6; }
22624         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22625 $as_echo "disabled" >&6; }
22626       else
22627         # Check if the provided tool contains a complete path.
22628         tool_specified="$PATCH"
22629         tool_basename="${tool_specified##*/}"
22630         if test "x$tool_basename" = "x$tool_specified"; then
22631           # A command without a complete path is provided, search $PATH.
22632           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22633 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22634           # Extract the first word of "$tool_basename", so it can be a program name with args.
22635 set dummy $tool_basename; ac_word=$2
22636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22637 $as_echo_n "checking for $ac_word... " >&6; }
22638 if ${ac_cv_path_PATCH+:} false; then :
22639   $as_echo_n "(cached) " >&6
22640 else
22641   case $PATCH in
22642   [\\/]* | ?:[\\/]*)
22643   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22644   ;;
22645   *)
22646   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22647 for as_dir in $PATH
22648 do
22649   IFS=$as_save_IFS
22650   test -z "$as_dir" && as_dir=.
22651     for ac_exec_ext in '' $ac_executable_extensions; do
22652   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22653     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22654     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22655     break 2
22656   fi
22657 done
22658   done
22659 IFS=$as_save_IFS
22660 
22661   ;;
22662 esac
22663 fi
22664 PATCH=$ac_cv_path_PATCH
22665 if test -n "$PATCH"; then
22666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22667 $as_echo "$PATCH" >&6; }
22668 else
22669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22670 $as_echo "no" >&6; }
22671 fi
22672 
22673 
22674           if test "x$PATCH" = x; then
22675             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22676           fi
22677         else
22678           # Otherwise we believe it is a complete path. Use it as it is.
22679           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22680 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22681           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22682 $as_echo_n "checking for PATCH... " >&6; }
22683           if test ! -x "$tool_specified"; then
22684             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22685 $as_echo "not found" >&6; }
22686             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22687           fi
22688           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22689 $as_echo "$tool_specified" >&6; }
22690         fi
22691       fi
22692     fi
22693 
22694   fi
22695 
22696 
22697   # Check if it's GNU time
22698   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22699   if test "x$IS_GNU_TIME" != x; then
22700     IS_GNU_TIME=yes
22701   else
22702     IS_GNU_TIME=no
22703   fi
22704 
22705 
22706   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22707 
22708 
22709 
22710   # Publish this variable in the help.
22711 
22712 
22713   if [ -z "${DSYMUTIL+x}" ]; then
22714     # The variable is not set by user, try to locate tool using the code snippet
22715     for ac_prog in dsymutil
22716 do
22717   # Extract the first word of "$ac_prog", so it can be a program name with args.
22718 set dummy $ac_prog; ac_word=$2
22719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22720 $as_echo_n "checking for $ac_word... " >&6; }
22721 if ${ac_cv_path_DSYMUTIL+:} false; then :
22722   $as_echo_n "(cached) " >&6
22723 else
22724   case $DSYMUTIL in
22725   [\\/]* | ?:[\\/]*)
22726   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22727   ;;
22728   *)
22729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22730 for as_dir in $PATH
22731 do
22732   IFS=$as_save_IFS
22733   test -z "$as_dir" && as_dir=.
22734     for ac_exec_ext in '' $ac_executable_extensions; do
22735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22736     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22738     break 2
22739   fi
22740 done
22741   done
22742 IFS=$as_save_IFS
22743 
22744   ;;
22745 esac
22746 fi
22747 DSYMUTIL=$ac_cv_path_DSYMUTIL
22748 if test -n "$DSYMUTIL"; then
22749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22750 $as_echo "$DSYMUTIL" >&6; }
22751 else
22752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22753 $as_echo "no" >&6; }
22754 fi
22755 
22756 
22757   test -n "$DSYMUTIL" && break
22758 done
22759 
22760   else
22761     # The variable is set, but is it from the command line or the environment?
22762 
22763     # Try to remove the string !DSYMUTIL! from our list.
22764     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22765     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22766       # If it failed, the variable was not from the command line. Ignore it,
22767       # but warn the user (except for BASH, which is always set by the calling BASH).
22768       if test "xDSYMUTIL" != xBASH; then
22769         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22770 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22771       fi
22772       # Try to locate tool using the code snippet
22773       for ac_prog in dsymutil
22774 do
22775   # Extract the first word of "$ac_prog", so it can be a program name with args.
22776 set dummy $ac_prog; ac_word=$2
22777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22778 $as_echo_n "checking for $ac_word... " >&6; }
22779 if ${ac_cv_path_DSYMUTIL+:} false; then :
22780   $as_echo_n "(cached) " >&6
22781 else
22782   case $DSYMUTIL in
22783   [\\/]* | ?:[\\/]*)
22784   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22785   ;;
22786   *)
22787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22788 for as_dir in $PATH
22789 do
22790   IFS=$as_save_IFS
22791   test -z "$as_dir" && as_dir=.
22792     for ac_exec_ext in '' $ac_executable_extensions; do
22793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22794     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22796     break 2
22797   fi
22798 done
22799   done
22800 IFS=$as_save_IFS
22801 
22802   ;;
22803 esac
22804 fi
22805 DSYMUTIL=$ac_cv_path_DSYMUTIL
22806 if test -n "$DSYMUTIL"; then
22807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22808 $as_echo "$DSYMUTIL" >&6; }
22809 else
22810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22811 $as_echo "no" >&6; }
22812 fi
22813 
22814 
22815   test -n "$DSYMUTIL" && break
22816 done
22817 
22818     else
22819       # If it succeeded, then it was overridden by the user. We will use it
22820       # for the tool.
22821 
22822       # First remove it from the list of overridden variables, so we can test
22823       # for unknown variables in the end.
22824       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22825 
22826       # Check if we try to supply an empty value
22827       if test "x$DSYMUTIL" = x; then
22828         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22829 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22830         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22831 $as_echo_n "checking for DSYMUTIL... " >&6; }
22832         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22833 $as_echo "disabled" >&6; }
22834       else
22835         # Check if the provided tool contains a complete path.
22836         tool_specified="$DSYMUTIL"
22837         tool_basename="${tool_specified##*/}"
22838         if test "x$tool_basename" = "x$tool_specified"; then
22839           # A command without a complete path is provided, search $PATH.
22840           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22841 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22842           # Extract the first word of "$tool_basename", so it can be a program name with args.
22843 set dummy $tool_basename; ac_word=$2
22844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22845 $as_echo_n "checking for $ac_word... " >&6; }
22846 if ${ac_cv_path_DSYMUTIL+:} false; then :
22847   $as_echo_n "(cached) " >&6
22848 else
22849   case $DSYMUTIL in
22850   [\\/]* | ?:[\\/]*)
22851   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22852   ;;
22853   *)
22854   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22855 for as_dir in $PATH
22856 do
22857   IFS=$as_save_IFS
22858   test -z "$as_dir" && as_dir=.
22859     for ac_exec_ext in '' $ac_executable_extensions; do
22860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22861     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22863     break 2
22864   fi
22865 done
22866   done
22867 IFS=$as_save_IFS
22868 
22869   ;;
22870 esac
22871 fi
22872 DSYMUTIL=$ac_cv_path_DSYMUTIL
22873 if test -n "$DSYMUTIL"; then
22874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22875 $as_echo "$DSYMUTIL" >&6; }
22876 else
22877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22878 $as_echo "no" >&6; }
22879 fi
22880 
22881 
22882           if test "x$DSYMUTIL" = x; then
22883             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22884           fi
22885         else
22886           # Otherwise we believe it is a complete path. Use it as it is.
22887           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22888 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22889           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22890 $as_echo_n "checking for DSYMUTIL... " >&6; }
22891           if test ! -x "$tool_specified"; then
22892             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22893 $as_echo "not found" >&6; }
22894             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22895           fi
22896           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22897 $as_echo "$tool_specified" >&6; }
22898         fi
22899       fi
22900     fi
22901 
22902   fi
22903 
22904 
22905 
22906   if test "x$DSYMUTIL" = x; then
22907     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22908   fi
22909 
22910 
22911 
22912 
22913 
22914   # Publish this variable in the help.
22915 
22916 
22917   if [ -z "${XATTR+x}" ]; then
22918     # The variable is not set by user, try to locate tool using the code snippet
22919     for ac_prog in xattr
22920 do
22921   # Extract the first word of "$ac_prog", so it can be a program name with args.
22922 set dummy $ac_prog; ac_word=$2
22923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22924 $as_echo_n "checking for $ac_word... " >&6; }
22925 if ${ac_cv_path_XATTR+:} false; then :
22926   $as_echo_n "(cached) " >&6
22927 else
22928   case $XATTR in
22929   [\\/]* | ?:[\\/]*)
22930   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22931   ;;
22932   *)
22933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22934 for as_dir in $PATH
22935 do
22936   IFS=$as_save_IFS
22937   test -z "$as_dir" && as_dir=.
22938     for ac_exec_ext in '' $ac_executable_extensions; do
22939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22940     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22942     break 2
22943   fi
22944 done
22945   done
22946 IFS=$as_save_IFS
22947 
22948   ;;
22949 esac
22950 fi
22951 XATTR=$ac_cv_path_XATTR
22952 if test -n "$XATTR"; then
22953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22954 $as_echo "$XATTR" >&6; }
22955 else
22956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22957 $as_echo "no" >&6; }
22958 fi
22959 
22960 
22961   test -n "$XATTR" && break
22962 done
22963 
22964   else
22965     # The variable is set, but is it from the command line or the environment?
22966 
22967     # Try to remove the string !XATTR! from our list.
22968     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22969     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22970       # If it failed, the variable was not from the command line. Ignore it,
22971       # but warn the user (except for BASH, which is always set by the calling BASH).
22972       if test "xXATTR" != xBASH; then
22973         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22974 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22975       fi
22976       # Try to locate tool using the code snippet
22977       for ac_prog in xattr
22978 do
22979   # Extract the first word of "$ac_prog", so it can be a program name with args.
22980 set dummy $ac_prog; ac_word=$2
22981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22982 $as_echo_n "checking for $ac_word... " >&6; }
22983 if ${ac_cv_path_XATTR+:} false; then :
22984   $as_echo_n "(cached) " >&6
22985 else
22986   case $XATTR in
22987   [\\/]* | ?:[\\/]*)
22988   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22989   ;;
22990   *)
22991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22992 for as_dir in $PATH
22993 do
22994   IFS=$as_save_IFS
22995   test -z "$as_dir" && as_dir=.
22996     for ac_exec_ext in '' $ac_executable_extensions; do
22997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22998     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23000     break 2
23001   fi
23002 done
23003   done
23004 IFS=$as_save_IFS
23005 
23006   ;;
23007 esac
23008 fi
23009 XATTR=$ac_cv_path_XATTR
23010 if test -n "$XATTR"; then
23011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23012 $as_echo "$XATTR" >&6; }
23013 else
23014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23015 $as_echo "no" >&6; }
23016 fi
23017 
23018 
23019   test -n "$XATTR" && break
23020 done
23021 
23022     else
23023       # If it succeeded, then it was overridden by the user. We will use it
23024       # for the tool.
23025 
23026       # First remove it from the list of overridden variables, so we can test
23027       # for unknown variables in the end.
23028       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23029 
23030       # Check if we try to supply an empty value
23031       if test "x$XATTR" = x; then
23032         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23033 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23034         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23035 $as_echo_n "checking for XATTR... " >&6; }
23036         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23037 $as_echo "disabled" >&6; }
23038       else
23039         # Check if the provided tool contains a complete path.
23040         tool_specified="$XATTR"
23041         tool_basename="${tool_specified##*/}"
23042         if test "x$tool_basename" = "x$tool_specified"; then
23043           # A command without a complete path is provided, search $PATH.
23044           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23045 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23046           # Extract the first word of "$tool_basename", so it can be a program name with args.
23047 set dummy $tool_basename; ac_word=$2
23048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23049 $as_echo_n "checking for $ac_word... " >&6; }
23050 if ${ac_cv_path_XATTR+:} false; then :
23051   $as_echo_n "(cached) " >&6
23052 else
23053   case $XATTR in
23054   [\\/]* | ?:[\\/]*)
23055   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23056   ;;
23057   *)
23058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23059 for as_dir in $PATH
23060 do
23061   IFS=$as_save_IFS
23062   test -z "$as_dir" && as_dir=.
23063     for ac_exec_ext in '' $ac_executable_extensions; do
23064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23065     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23067     break 2
23068   fi
23069 done
23070   done
23071 IFS=$as_save_IFS
23072 
23073   ;;
23074 esac
23075 fi
23076 XATTR=$ac_cv_path_XATTR
23077 if test -n "$XATTR"; then
23078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23079 $as_echo "$XATTR" >&6; }
23080 else
23081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23082 $as_echo "no" >&6; }
23083 fi
23084 
23085 
23086           if test "x$XATTR" = x; then
23087             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23088           fi
23089         else
23090           # Otherwise we believe it is a complete path. Use it as it is.
23091           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23092 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23093           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23094 $as_echo_n "checking for XATTR... " >&6; }
23095           if test ! -x "$tool_specified"; then
23096             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23097 $as_echo "not found" >&6; }
23098             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23099           fi
23100           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23101 $as_echo "$tool_specified" >&6; }
23102         fi
23103       fi
23104     fi
23105 
23106   fi
23107 
23108 
23109 
23110   if test "x$XATTR" = x; then
23111     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23112   fi
23113 
23114 
23115 
23116 
23117   # Publish this variable in the help.
23118 
23119 
23120   if [ -z "${CODESIGN+x}" ]; then
23121     # The variable is not set by user, try to locate tool using the code snippet
23122     for ac_prog in codesign
23123 do
23124   # Extract the first word of "$ac_prog", so it can be a program name with args.
23125 set dummy $ac_prog; ac_word=$2
23126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23127 $as_echo_n "checking for $ac_word... " >&6; }
23128 if ${ac_cv_path_CODESIGN+:} false; then :
23129   $as_echo_n "(cached) " >&6
23130 else
23131   case $CODESIGN in
23132   [\\/]* | ?:[\\/]*)
23133   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23134   ;;
23135   *)
23136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23137 for as_dir in $PATH
23138 do
23139   IFS=$as_save_IFS
23140   test -z "$as_dir" && as_dir=.
23141     for ac_exec_ext in '' $ac_executable_extensions; do
23142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23143     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23145     break 2
23146   fi
23147 done
23148   done
23149 IFS=$as_save_IFS
23150 
23151   ;;
23152 esac
23153 fi
23154 CODESIGN=$ac_cv_path_CODESIGN
23155 if test -n "$CODESIGN"; then
23156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23157 $as_echo "$CODESIGN" >&6; }
23158 else
23159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23160 $as_echo "no" >&6; }
23161 fi
23162 
23163 
23164   test -n "$CODESIGN" && break
23165 done
23166 
23167   else
23168     # The variable is set, but is it from the command line or the environment?
23169 
23170     # Try to remove the string !CODESIGN! from our list.
23171     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23172     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23173       # If it failed, the variable was not from the command line. Ignore it,
23174       # but warn the user (except for BASH, which is always set by the calling BASH).
23175       if test "xCODESIGN" != xBASH; then
23176         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23177 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23178       fi
23179       # Try to locate tool using the code snippet
23180       for ac_prog in codesign
23181 do
23182   # Extract the first word of "$ac_prog", so it can be a program name with args.
23183 set dummy $ac_prog; ac_word=$2
23184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23185 $as_echo_n "checking for $ac_word... " >&6; }
23186 if ${ac_cv_path_CODESIGN+:} false; then :
23187   $as_echo_n "(cached) " >&6
23188 else
23189   case $CODESIGN in
23190   [\\/]* | ?:[\\/]*)
23191   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23192   ;;
23193   *)
23194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23195 for as_dir in $PATH
23196 do
23197   IFS=$as_save_IFS
23198   test -z "$as_dir" && as_dir=.
23199     for ac_exec_ext in '' $ac_executable_extensions; do
23200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23201     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23203     break 2
23204   fi
23205 done
23206   done
23207 IFS=$as_save_IFS
23208 
23209   ;;
23210 esac
23211 fi
23212 CODESIGN=$ac_cv_path_CODESIGN
23213 if test -n "$CODESIGN"; then
23214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23215 $as_echo "$CODESIGN" >&6; }
23216 else
23217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23218 $as_echo "no" >&6; }
23219 fi
23220 
23221 
23222   test -n "$CODESIGN" && break
23223 done
23224 
23225     else
23226       # If it succeeded, then it was overridden by the user. We will use it
23227       # for the tool.
23228 
23229       # First remove it from the list of overridden variables, so we can test
23230       # for unknown variables in the end.
23231       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23232 
23233       # Check if we try to supply an empty value
23234       if test "x$CODESIGN" = x; then
23235         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23236 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23237         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23238 $as_echo_n "checking for CODESIGN... " >&6; }
23239         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23240 $as_echo "disabled" >&6; }
23241       else
23242         # Check if the provided tool contains a complete path.
23243         tool_specified="$CODESIGN"
23244         tool_basename="${tool_specified##*/}"
23245         if test "x$tool_basename" = "x$tool_specified"; then
23246           # A command without a complete path is provided, search $PATH.
23247           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23248 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23249           # Extract the first word of "$tool_basename", so it can be a program name with args.
23250 set dummy $tool_basename; ac_word=$2
23251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23252 $as_echo_n "checking for $ac_word... " >&6; }
23253 if ${ac_cv_path_CODESIGN+:} false; then :
23254   $as_echo_n "(cached) " >&6
23255 else
23256   case $CODESIGN in
23257   [\\/]* | ?:[\\/]*)
23258   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23259   ;;
23260   *)
23261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23262 for as_dir in $PATH
23263 do
23264   IFS=$as_save_IFS
23265   test -z "$as_dir" && as_dir=.
23266     for ac_exec_ext in '' $ac_executable_extensions; do
23267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23268     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23270     break 2
23271   fi
23272 done
23273   done
23274 IFS=$as_save_IFS
23275 
23276   ;;
23277 esac
23278 fi
23279 CODESIGN=$ac_cv_path_CODESIGN
23280 if test -n "$CODESIGN"; then
23281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23282 $as_echo "$CODESIGN" >&6; }
23283 else
23284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23285 $as_echo "no" >&6; }
23286 fi
23287 
23288 
23289           if test "x$CODESIGN" = x; then
23290             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23291           fi
23292         else
23293           # Otherwise we believe it is a complete path. Use it as it is.
23294           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23295 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23296           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23297 $as_echo_n "checking for CODESIGN... " >&6; }
23298           if test ! -x "$tool_specified"; then
23299             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23300 $as_echo "not found" >&6; }
23301             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23302           fi
23303           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23304 $as_echo "$tool_specified" >&6; }
23305         fi
23306       fi
23307     fi
23308 
23309   fi
23310 
23311 
23312     if test "x$CODESIGN" != "x"; then
23313       # Verify that the openjdk_codesign certificate is present
23314       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23315 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23316       rm -f codesign-testfile
23317       touch codesign-testfile
23318       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23319       rm -f codesign-testfile
23320       if test "x$CODESIGN" = x; then
23321         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23322 $as_echo "no" >&6; }
23323       else
23324         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23325 $as_echo "yes" >&6; }
23326       fi
23327     fi
23328 
23329 
23330 
23331   # Publish this variable in the help.
23332 
23333 
23334   if [ -z "${SETFILE+x}" ]; then
23335     # The variable is not set by user, try to locate tool using the code snippet
23336     for ac_prog in SetFile
23337 do
23338   # Extract the first word of "$ac_prog", so it can be a program name with args.
23339 set dummy $ac_prog; ac_word=$2
23340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23341 $as_echo_n "checking for $ac_word... " >&6; }
23342 if ${ac_cv_path_SETFILE+:} false; then :
23343   $as_echo_n "(cached) " >&6
23344 else
23345   case $SETFILE in
23346   [\\/]* | ?:[\\/]*)
23347   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23348   ;;
23349   *)
23350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23351 for as_dir in $PATH
23352 do
23353   IFS=$as_save_IFS
23354   test -z "$as_dir" && as_dir=.
23355     for ac_exec_ext in '' $ac_executable_extensions; do
23356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23357     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23359     break 2
23360   fi
23361 done
23362   done
23363 IFS=$as_save_IFS
23364 
23365   ;;
23366 esac
23367 fi
23368 SETFILE=$ac_cv_path_SETFILE
23369 if test -n "$SETFILE"; then
23370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23371 $as_echo "$SETFILE" >&6; }
23372 else
23373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23374 $as_echo "no" >&6; }
23375 fi
23376 
23377 
23378   test -n "$SETFILE" && break
23379 done
23380 
23381   else
23382     # The variable is set, but is it from the command line or the environment?
23383 
23384     # Try to remove the string !SETFILE! from our list.
23385     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23386     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23387       # If it failed, the variable was not from the command line. Ignore it,
23388       # but warn the user (except for BASH, which is always set by the calling BASH).
23389       if test "xSETFILE" != xBASH; then
23390         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23391 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23392       fi
23393       # Try to locate tool using the code snippet
23394       for ac_prog in SetFile
23395 do
23396   # Extract the first word of "$ac_prog", so it can be a program name with args.
23397 set dummy $ac_prog; ac_word=$2
23398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23399 $as_echo_n "checking for $ac_word... " >&6; }
23400 if ${ac_cv_path_SETFILE+:} false; then :
23401   $as_echo_n "(cached) " >&6
23402 else
23403   case $SETFILE in
23404   [\\/]* | ?:[\\/]*)
23405   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23406   ;;
23407   *)
23408   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23409 for as_dir in $PATH
23410 do
23411   IFS=$as_save_IFS
23412   test -z "$as_dir" && as_dir=.
23413     for ac_exec_ext in '' $ac_executable_extensions; do
23414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23415     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23417     break 2
23418   fi
23419 done
23420   done
23421 IFS=$as_save_IFS
23422 
23423   ;;
23424 esac
23425 fi
23426 SETFILE=$ac_cv_path_SETFILE
23427 if test -n "$SETFILE"; then
23428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23429 $as_echo "$SETFILE" >&6; }
23430 else
23431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23432 $as_echo "no" >&6; }
23433 fi
23434 
23435 
23436   test -n "$SETFILE" && break
23437 done
23438 
23439     else
23440       # If it succeeded, then it was overridden by the user. We will use it
23441       # for the tool.
23442 
23443       # First remove it from the list of overridden variables, so we can test
23444       # for unknown variables in the end.
23445       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23446 
23447       # Check if we try to supply an empty value
23448       if test "x$SETFILE" = x; then
23449         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23450 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23451         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23452 $as_echo_n "checking for SETFILE... " >&6; }
23453         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23454 $as_echo "disabled" >&6; }
23455       else
23456         # Check if the provided tool contains a complete path.
23457         tool_specified="$SETFILE"
23458         tool_basename="${tool_specified##*/}"
23459         if test "x$tool_basename" = "x$tool_specified"; then
23460           # A command without a complete path is provided, search $PATH.
23461           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23462 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23463           # Extract the first word of "$tool_basename", so it can be a program name with args.
23464 set dummy $tool_basename; ac_word=$2
23465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23466 $as_echo_n "checking for $ac_word... " >&6; }
23467 if ${ac_cv_path_SETFILE+:} false; then :
23468   $as_echo_n "(cached) " >&6
23469 else
23470   case $SETFILE in
23471   [\\/]* | ?:[\\/]*)
23472   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23473   ;;
23474   *)
23475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23476 for as_dir in $PATH
23477 do
23478   IFS=$as_save_IFS
23479   test -z "$as_dir" && as_dir=.
23480     for ac_exec_ext in '' $ac_executable_extensions; do
23481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23482     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23484     break 2
23485   fi
23486 done
23487   done
23488 IFS=$as_save_IFS
23489 
23490   ;;
23491 esac
23492 fi
23493 SETFILE=$ac_cv_path_SETFILE
23494 if test -n "$SETFILE"; then
23495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23496 $as_echo "$SETFILE" >&6; }
23497 else
23498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23499 $as_echo "no" >&6; }
23500 fi
23501 
23502 
23503           if test "x$SETFILE" = x; then
23504             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23505           fi
23506         else
23507           # Otherwise we believe it is a complete path. Use it as it is.
23508           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23509 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23510           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23511 $as_echo_n "checking for SETFILE... " >&6; }
23512           if test ! -x "$tool_specified"; then
23513             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23514 $as_echo "not found" >&6; }
23515             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23516           fi
23517           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23518 $as_echo "$tool_specified" >&6; }
23519         fi
23520       fi
23521     fi
23522 
23523   fi
23524 
23525 
23526 
23527   if test "x$SETFILE" = x; then
23528     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23529   fi
23530 
23531 
23532   fi
23533 
23534 
23535   # Test if bash supports pipefail.
23536   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23537 $as_echo_n "checking if bash supports pipefail... " >&6; }
23538   if ${BASH} -c 'set -o pipefail'; then
23539     BASH_ARGS="$BASH_ARGS -o pipefail"
23540     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23541 $as_echo "yes" >&6; }
23542   else
23543     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23544 $as_echo "no" >&6; }
23545   fi
23546 
23547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23548 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23549   if ${BASH} -e -c 'true'; then
23550     BASH_ARGS="$BASH_ARGS -e"
23551     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23552 $as_echo "yes" >&6; }
23553   else
23554     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23555 $as_echo "no" >&6; }
23556   fi
23557 
23558 
23559 
23560 
23561 # Check if pkg-config is available.
23562 
23563 
23564 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23565         if test -n "$ac_tool_prefix"; then
23566   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23567 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23569 $as_echo_n "checking for $ac_word... " >&6; }
23570 if ${ac_cv_path_PKG_CONFIG+:} false; then :
23571   $as_echo_n "(cached) " >&6
23572 else
23573   case $PKG_CONFIG in
23574   [\\/]* | ?:[\\/]*)
23575   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23576   ;;
23577   *)
23578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23579 for as_dir in $PATH
23580 do
23581   IFS=$as_save_IFS
23582   test -z "$as_dir" && as_dir=.
23583     for ac_exec_ext in '' $ac_executable_extensions; do
23584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23585     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23587     break 2
23588   fi
23589 done
23590   done
23591 IFS=$as_save_IFS
23592 
23593   ;;
23594 esac
23595 fi
23596 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23597 if test -n "$PKG_CONFIG"; then
23598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23599 $as_echo "$PKG_CONFIG" >&6; }
23600 else
23601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23602 $as_echo "no" >&6; }
23603 fi
23604 
23605 
23606 fi
23607 if test -z "$ac_cv_path_PKG_CONFIG"; then
23608   ac_pt_PKG_CONFIG=$PKG_CONFIG
23609   # Extract the first word of "pkg-config", so it can be a program name with args.
23610 set dummy pkg-config; ac_word=$2
23611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23612 $as_echo_n "checking for $ac_word... " >&6; }
23613 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23614   $as_echo_n "(cached) " >&6
23615 else
23616   case $ac_pt_PKG_CONFIG in
23617   [\\/]* | ?:[\\/]*)
23618   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23619   ;;
23620   *)
23621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23622 for as_dir in $PATH
23623 do
23624   IFS=$as_save_IFS
23625   test -z "$as_dir" && as_dir=.
23626     for ac_exec_ext in '' $ac_executable_extensions; do
23627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23628     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23630     break 2
23631   fi
23632 done
23633   done
23634 IFS=$as_save_IFS
23635 
23636   ;;
23637 esac
23638 fi
23639 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23640 if test -n "$ac_pt_PKG_CONFIG"; then
23641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23642 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
23643 else
23644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23645 $as_echo "no" >&6; }
23646 fi
23647 
23648   if test "x$ac_pt_PKG_CONFIG" = x; then
23649     PKG_CONFIG=""
23650   else
23651     case $cross_compiling:$ac_tool_warned in
23652 yes:)
23653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23654 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23655 ac_tool_warned=yes ;;
23656 esac
23657     PKG_CONFIG=$ac_pt_PKG_CONFIG
23658   fi
23659 else
23660   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23661 fi
23662 
23663 fi
23664 if test -n "$PKG_CONFIG"; then
23665         _pkg_min_version=0.9.0
23666         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23667 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23668         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23669                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23670 $as_echo "yes" >&6; }
23671         else
23672                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23673 $as_echo "no" >&6; }
23674                 PKG_CONFIG=""
23675         fi
23676 
23677 fi
23678 
23679 # After basic tools have been setup, we can check build os specific details.
23680 
23681   ###############################################################################
23682 
23683   # Note that this is the build platform OS version!
23684 
23685   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23686   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23687   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23688   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23689 
23690 
23691 
23692 
23693 
23694 # Misc basic settings
23695 
23696 
23697 # Check whether --with-default-make-target was given.
23698 if test "${with_default_make_target+set}" = set; then :
23699   withval=$with_default_make_target;
23700 fi
23701 
23702   if test "x$with_default_make_target" = "x" \
23703       || test "x$with_default_make_target" = "xyes"; then
23704     DEFAULT_MAKE_TARGET="exploded-image"
23705   elif test "x$with_default_make_target" = "xno"; then
23706     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23707   else
23708     DEFAULT_MAKE_TARGET="$with_default_make_target"
23709   fi
23710 
23711 
23712 
23713 
23714 ###############################################################################
23715 #
23716 # Determine OpenJDK variants, options and version numbers.
23717 #
23718 ###############################################################################
23719 
23720 # We need build & target for this.
23721 
23722   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23723   # We always build headless support.
23724   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23725 $as_echo_n "checking headful support... " >&6; }
23726   # Check whether --enable-headful was given.
23727 if test "${enable_headful+set}" = set; then :
23728   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23729 else
23730   SUPPORT_HEADFUL=yes
23731 fi
23732 
23733 
23734   SUPPORT_HEADLESS=yes
23735   BUILD_HEADLESS="BUILD_HEADLESS:=true"
23736 
23737   if test "x$SUPPORT_HEADFUL" = xyes; then
23738     # We are building both headful and headless.
23739     headful_msg="include support for both headful and headless"
23740   fi
23741 
23742   if test "x$SUPPORT_HEADFUL" = xno; then
23743     # Thus we are building headless only.
23744     BUILD_HEADLESS="BUILD_HEADLESS:=true"
23745     headful_msg="headless only"
23746   fi
23747 
23748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23749 $as_echo "$headful_msg" >&6; }
23750 
23751 
23752 
23753 
23754 
23755   # Choose cacerts source file
23756 
23757 # Check whether --with-cacerts-file was given.
23758 if test "${with_cacerts_file+set}" = set; then :
23759   withval=$with_cacerts_file;
23760 fi
23761 
23762   if test "x$with_cacerts_file" != x; then
23763     CACERTS_FILE=$with_cacerts_file
23764   fi
23765 
23766 
23767   # Enable or disable unlimited crypto
23768   # Check whether --enable-unlimited-crypto was given.
23769 if test "${enable_unlimited_crypto+set}" = set; then :
23770   enableval=$enable_unlimited_crypto;
23771 else
23772   enable_unlimited_crypto=no
23773 fi
23774 
23775   if test "x$enable_unlimited_crypto" = "xyes"; then
23776     UNLIMITED_CRYPTO=true
23777   else
23778     UNLIMITED_CRYPTO=false
23779   fi
23780 
23781 
23782   # Should we build the serviceability agent (SA)?
23783   INCLUDE_SA=true
23784   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23785     INCLUDE_SA=false
23786   fi
23787   if test "x$OPENJDK_TARGET_OS" = xaix ; then
23788     INCLUDE_SA=false
23789   fi
23790   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23791     INCLUDE_SA=false
23792   fi
23793 
23794 
23795   # Compress jars
23796   COMPRESS_JARS=false
23797 
23798 
23799 
23800   # Setup default copyright year. Mostly overridden when building close to a new year.
23801 
23802 # Check whether --with-copyright-year was given.
23803 if test "${with_copyright_year+set}" = set; then :
23804   withval=$with_copyright_year;
23805 fi
23806 
23807   if test "x$with_copyright_year" = xyes; then
23808     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23809   elif test "x$with_copyright_year" != x; then
23810     COPYRIGHT_YEAR="$with_copyright_year"
23811   else
23812     COPYRIGHT_YEAR=`date +'%Y'`
23813   fi
23814 
23815 
23816 
23817   # Check whether --enable-keep-packaged-modules was given.
23818 if test "${enable_keep_packaged_modules+set}" = set; then :
23819   enableval=$enable_keep_packaged_modules;
23820 fi
23821 
23822 
23823   if test "x$enable_keep_packaged_modules" = "xyes"; then
23824     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23825 $as_echo_n "checking if packaged modules are kept... " >&6; }
23826     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23827 $as_echo "yes" >&6; }
23828     JLINK_KEEP_PACKAGED_MODULES=true
23829   elif test "x$enable_keep_packaged_modules" = "xno"; then
23830     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23831 $as_echo_n "checking if packaged modules are kept... " >&6; }
23832     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23833 $as_echo "no" >&6; }
23834     JLINK_KEEP_PACKAGED_MODULES=false
23835   elif test "x$enable_keep_packaged_modules" = "x"; then
23836     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23837 $as_echo "yes (default)" >&6; }
23838     JLINK_KEEP_PACKAGED_MODULES=true
23839   else
23840     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23841   fi
23842 
23843 
23844 
23845 
23846   # Warn user that old version arguments are deprecated.
23847 
23848 
23849 # Check whether --with-milestone was given.
23850 if test "${with_milestone+set}" = set; then :
23851   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23852 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23853 fi
23854 
23855 
23856 
23857 
23858 # Check whether --with-update-version was given.
23859 if test "${with_update_version+set}" = set; then :
23860   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23861 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23862 fi
23863 
23864 
23865 
23866 
23867 # Check whether --with-user-release-suffix was given.
23868 if test "${with_user_release_suffix+set}" = set; then :
23869   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
23870 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23871 fi
23872 
23873 
23874 
23875 
23876 # Check whether --with-build-number was given.
23877 if test "${with_build_number+set}" = set; then :
23878   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23879 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23880 fi
23881 
23882 
23883 
23884   # Source the version numbers file
23885   . $AUTOCONF_DIR/version-numbers
23886 
23887   # Some non-version number information is set in that file
23888 
23889 
23890 
23891 
23892 
23893 
23894 
23895 
23896 
23897   # Override version from arguments
23898 
23899   # If --with-version-string is set, process it first. It is possible to
23900   # override parts with more specific flags, since these are processed later.
23901 
23902 # Check whether --with-version-string was given.
23903 if test "${with_version_string+set}" = set; then :
23904   withval=$with_version_string;
23905 fi
23906 
23907   if test "x$with_version_string" = xyes; then
23908     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23909   elif test "x$with_version_string" != x; then
23910     # Additional [] needed to keep m4 from mangling shell constructs.
23911     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23912       VERSION_MAJOR=${BASH_REMATCH[1]}
23913       VERSION_MINOR=${BASH_REMATCH[3]}
23914       VERSION_SECURITY=${BASH_REMATCH[5]}
23915       VERSION_PATCH=${BASH_REMATCH[7]}
23916       VERSION_PRE=${BASH_REMATCH[9]}
23917       version_plus_separator=${BASH_REMATCH[11]}
23918       VERSION_BUILD=${BASH_REMATCH[12]}
23919       VERSION_OPT=${BASH_REMATCH[14]}
23920       # Unspecified numerical fields are interpreted as 0.
23921       if test "x$VERSION_MINOR" = x; then
23922         VERSION_MINOR=0
23923       fi
23924       if test "x$VERSION_SECURITY" = x; then
23925         VERSION_SECURITY=0
23926       fi
23927       if test "x$VERSION_PATCH" = x; then
23928         VERSION_PATCH=0
23929       fi
23930       if test "x$version_plus_separator" != x \
23931           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23932         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23933       fi
23934       # Stop the version part process from setting default values.
23935       # We still allow them to explicitely override though.
23936       NO_DEFAULT_VERSION_PARTS=true
23937     else
23938       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23939     fi
23940   fi
23941 
23942 
23943 # Check whether --with-version-pre was given.
23944 if test "${with_version_pre+set}" = set; then :
23945   withval=$with_version_pre; with_version_pre_present=true
23946 else
23947   with_version_pre_present=false
23948 fi
23949 
23950 
23951   if test "x$with_version_pre_present" = xtrue; then
23952     if test "x$with_version_pre" = xyes; then
23953       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23954     elif test "x$with_version_pre" = xno; then
23955       # Interpret --without-* as empty string instead of the literal "no"
23956       VERSION_PRE=
23957     else
23958       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23959        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23960       if test "x$VERSION_PRE" != "x$with_version_pre"; then
23961         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23962 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23963       fi
23964     fi
23965   else
23966     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23967       # Default is to use "internal" as pre
23968       VERSION_PRE="internal"
23969     fi
23970   fi
23971 
23972 
23973 # Check whether --with-version-opt was given.
23974 if test "${with_version_opt+set}" = set; then :
23975   withval=$with_version_opt; with_version_opt_present=true
23976 else
23977   with_version_opt_present=false
23978 fi
23979 
23980 
23981   if test "x$with_version_opt_present" = xtrue; then
23982     if test "x$with_version_opt" = xyes; then
23983       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23984     elif test "x$with_version_opt" = xno; then
23985       # Interpret --without-* as empty string instead of the literal "no"
23986       VERSION_OPT=
23987     else
23988       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23989        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23990       if test "x$VERSION_OPT" != "x$with_version_opt"; then
23991         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23992 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23993       fi
23994     fi
23995   else
23996     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23997       # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23998       timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23999       # Outer [ ] to quote m4.
24000        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24001       VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24002     fi
24003   fi
24004 
24005 
24006 # Check whether --with-version-build was given.
24007 if test "${with_version_build+set}" = set; then :
24008   withval=$with_version_build; with_version_build_present=true
24009 else
24010   with_version_build_present=false
24011 fi
24012 
24013 
24014   if test "x$with_version_build_present" = xtrue; then
24015     if test "x$with_version_build" = xyes; then
24016       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24017     elif test "x$with_version_build" = xno; then
24018       # Interpret --without-* as empty string instead of the literal "no"
24019       VERSION_BUILD=
24020     elif test "x$with_version_build" = x; then
24021       VERSION_BUILD=
24022     else
24023 
24024   # Additional [] needed to keep m4 from mangling shell constructs.
24025   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24026     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24027   fi
24028   # Extract the version number without leading zeros.
24029   cleaned_value=${BASH_REMATCH[1]}
24030   if test "x$cleaned_value" = x; then
24031     # Special case for zero
24032     cleaned_value=${BASH_REMATCH[2]}
24033   fi
24034 
24035   if test $cleaned_value -gt 255; then
24036     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24037   fi
24038   if test "x$cleaned_value" != "x$with_version_build"; then
24039     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24040 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24041   fi
24042   VERSION_BUILD=$cleaned_value
24043 
24044     fi
24045   else
24046     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24047       # Default is to not have a build number.
24048       VERSION_BUILD=""
24049       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24050       VERSION_BUILD=0
24051     fi
24052   fi
24053 
24054 
24055 # Check whether --with-version-major was given.
24056 if test "${with_version_major+set}" = set; then :
24057   withval=$with_version_major; with_version_major_present=true
24058 else
24059   with_version_major_present=false
24060 fi
24061 
24062 
24063   if test "x$with_version_major_present" = xtrue; then
24064     if test "x$with_version_major" = xyes; then
24065       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24066     else
24067 
24068   # Additional [] needed to keep m4 from mangling shell constructs.
24069   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24070     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24071   fi
24072   # Extract the version number without leading zeros.
24073   cleaned_value=${BASH_REMATCH[1]}
24074   if test "x$cleaned_value" = x; then
24075     # Special case for zero
24076     cleaned_value=${BASH_REMATCH[2]}
24077   fi
24078 
24079   if test $cleaned_value -gt 255; then
24080     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24081   fi
24082   if test "x$cleaned_value" != "x$with_version_major"; then
24083     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24084 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24085   fi
24086   VERSION_MAJOR=$cleaned_value
24087 
24088     fi
24089   else
24090     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24091       # Default is to get value from version-numbers
24092       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24093     fi
24094   fi
24095 
24096 
24097 # Check whether --with-version-minor was given.
24098 if test "${with_version_minor+set}" = set; then :
24099   withval=$with_version_minor; with_version_minor_present=true
24100 else
24101   with_version_minor_present=false
24102 fi
24103 
24104 
24105   if test "x$with_version_minor_present" = xtrue; then
24106     if test "x$with_version_minor" = xyes; then
24107       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24108     elif test "x$with_version_minor" = xno; then
24109       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24110       VERSION_MINOR=0
24111     elif test "x$with_version_minor" = x; then
24112       VERSION_MINOR=0
24113     else
24114 
24115   # Additional [] needed to keep m4 from mangling shell constructs.
24116   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24117     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24118   fi
24119   # Extract the version number without leading zeros.
24120   cleaned_value=${BASH_REMATCH[1]}
24121   if test "x$cleaned_value" = x; then
24122     # Special case for zero
24123     cleaned_value=${BASH_REMATCH[2]}
24124   fi
24125 
24126   if test $cleaned_value -gt 255; then
24127     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24128   fi
24129   if test "x$cleaned_value" != "x$with_version_minor"; then
24130     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24131 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24132   fi
24133   VERSION_MINOR=$cleaned_value
24134 
24135     fi
24136   else
24137     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24138       # Default is 0, if unspecified
24139       VERSION_MINOR=0
24140     fi
24141   fi
24142 
24143 
24144 # Check whether --with-version-security was given.
24145 if test "${with_version_security+set}" = set; then :
24146   withval=$with_version_security; with_version_security_present=true
24147 else
24148   with_version_security_present=false
24149 fi
24150 
24151 
24152   if test "x$with_version_security_present" = xtrue; then
24153     if test "x$with_version_security" = xyes; then
24154       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24155     elif test "x$with_version_security" = xno; then
24156       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24157       VERSION_SECURITY=0
24158     elif test "x$with_version_security" = x; then
24159       VERSION_SECURITY=0
24160     else
24161 
24162   # Additional [] needed to keep m4 from mangling shell constructs.
24163   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24164     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24165   fi
24166   # Extract the version number without leading zeros.
24167   cleaned_value=${BASH_REMATCH[1]}
24168   if test "x$cleaned_value" = x; then
24169     # Special case for zero
24170     cleaned_value=${BASH_REMATCH[2]}
24171   fi
24172 
24173   if test $cleaned_value -gt 255; then
24174     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24175   fi
24176   if test "x$cleaned_value" != "x$with_version_security"; then
24177     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24178 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24179   fi
24180   VERSION_SECURITY=$cleaned_value
24181 
24182     fi
24183   else
24184     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24185       # Default is 0, if unspecified
24186       VERSION_SECURITY=0
24187     fi
24188   fi
24189 
24190 
24191 # Check whether --with-version-patch was given.
24192 if test "${with_version_patch+set}" = set; then :
24193   withval=$with_version_patch; with_version_patch_present=true
24194 else
24195   with_version_patch_present=false
24196 fi
24197 
24198 
24199   if test "x$with_version_patch_present" = xtrue; then
24200     if test "x$with_version_patch" = xyes; then
24201       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24202     elif test "x$with_version_patch" = xno; then
24203       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24204       VERSION_PATCH=0
24205     elif test "x$with_version_patch" = x; then
24206       VERSION_PATCH=0
24207     else
24208 
24209   # Additional [] needed to keep m4 from mangling shell constructs.
24210   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24211     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24212   fi
24213   # Extract the version number without leading zeros.
24214   cleaned_value=${BASH_REMATCH[1]}
24215   if test "x$cleaned_value" = x; then
24216     # Special case for zero
24217     cleaned_value=${BASH_REMATCH[2]}
24218   fi
24219 
24220   if test $cleaned_value -gt 255; then
24221     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24222   fi
24223   if test "x$cleaned_value" != "x$with_version_patch"; then
24224     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24225 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24226   fi
24227   VERSION_PATCH=$cleaned_value
24228 
24229     fi
24230   else
24231     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24232       # Default is 0, if unspecified
24233       VERSION_PATCH=0
24234     fi
24235   fi
24236 
24237   # Calculate derived version properties
24238 
24239   # Set VERSION_IS_GA based on if VERSION_PRE has a value
24240   if test "x$VERSION_PRE" = x; then
24241     VERSION_IS_GA=true
24242   else
24243     VERSION_IS_GA=false
24244   fi
24245 
24246   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24247   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24248 
24249   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24250   # Strip trailing zeroes from stripped_version_number
24251   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24252   VERSION_NUMBER=$stripped_version_number
24253 
24254   # The complete version string, with additional build information
24255   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24256     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24257   else
24258     # If either build or opt is set, we need a + separator
24259     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24260   fi
24261 
24262   # The short version string, just VERSION_NUMBER and PRE, if present.
24263   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24264 
24265   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24266 $as_echo_n "checking for version string... " >&6; }
24267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24268 $as_echo "$VERSION_STRING" >&6; }
24269 
24270 
24271 
24272 
24273 
24274 
24275 
24276 
24277 
24278 
24279 
24280 
24281 
24282 
24283 
24284 ###############################################################################
24285 #
24286 # Setup BootJDK, used to bootstrap the build.
24287 #
24288 ###############################################################################
24289 
24290 
24291   BOOT_JDK_FOUND=no
24292 
24293 # Check whether --with-boot-jdk was given.
24294 if test "${with_boot_jdk+set}" = set; then :
24295   withval=$with_boot_jdk;
24296 fi
24297 
24298 
24299   # We look for the Boot JDK through various means, going from more certain to
24300   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24301   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24302   # must check if this is indeed valid; otherwise we'll continue looking.
24303 
24304   # Test: Is bootjdk explicitely set by command line arguments?
24305 
24306   if test "x$BOOT_JDK_FOUND" = xno; then
24307     # Now execute the test
24308 
24309   if test "x$with_boot_jdk" != x; then
24310     BOOT_JDK=$with_boot_jdk
24311     BOOT_JDK_FOUND=maybe
24312     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24313 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24314   fi
24315 
24316 
24317     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24318     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24319       # Do we have a bin/java?
24320       if test ! -x "$BOOT_JDK/bin/java"; then
24321         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24322 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24323         BOOT_JDK_FOUND=no
24324       else
24325         # Do we have a bin/javac?
24326         if test ! -x "$BOOT_JDK/bin/javac"; then
24327           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24328 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24329           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24330 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24331           BOOT_JDK_FOUND=no
24332         else
24333           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24334           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24335 
24336           # Extra M4 quote needed to protect [] in grep expression.
24337           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24338           if test "x$FOUND_CORRECT_VERSION" = x; then
24339             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24340 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24341             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24342 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24343             BOOT_JDK_FOUND=no
24344           else
24345             # We're done! :-)
24346             BOOT_JDK_FOUND=yes
24347 
24348   # Only process if variable expands to non-empty
24349 
24350   if test "x$BOOT_JDK" != x; then
24351     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24352 
24353   # Input might be given as Windows format, start by converting to
24354   # unix format.
24355   path="$BOOT_JDK"
24356   new_path=`$CYGPATH -u "$path"`
24357 
24358   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24359   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24360   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24361   # "foo.exe" is OK but "foo" is an error.
24362   #
24363   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24364   # It is also a way to make sure we got the proper file name for the real test later on.
24365   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24366   if test "x$test_shortpath" = x; then
24367     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24368 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24369     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24370   fi
24371 
24372   # Call helper function which possibly converts this using DOS-style short mode.
24373   # If so, the updated path is stored in $new_path.
24374 
24375   input_path="$new_path"
24376   # Check if we need to convert this using DOS-style short mode. If the path
24377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24378   # take no chances and rewrite it.
24379   # Note: m4 eats our [], so we need to use [ and ] instead.
24380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24381   if test "x$has_forbidden_chars" != x; then
24382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24383     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24384     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24385     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24386       # Going to short mode and back again did indeed matter. Since short mode is
24387       # case insensitive, let's make it lowercase to improve readability.
24388       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24389       # Now convert it back to Unix-style (cygpath)
24390       input_path=`$CYGPATH -u "$shortmode_path"`
24391       new_path="$input_path"
24392     fi
24393   fi
24394 
24395   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24396   if test "x$test_cygdrive_prefix" = x; then
24397     # As a simple fix, exclude /usr/bin since it's not a real path.
24398     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24399       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24400       # a path prefixed by /cygdrive for fixpath to work.
24401       new_path="$CYGWIN_ROOT_PATH$input_path"
24402     fi
24403   fi
24404 
24405 
24406   if test "x$path" != "x$new_path"; then
24407     BOOT_JDK="$new_path"
24408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24409 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24410   fi
24411 
24412     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24413 
24414   path="$BOOT_JDK"
24415   has_colon=`$ECHO $path | $GREP ^.:`
24416   new_path="$path"
24417   if test "x$has_colon" = x; then
24418     # Not in mixed or Windows style, start by that.
24419     new_path=`cmd //c echo $path`
24420   fi
24421 
24422 
24423   input_path="$new_path"
24424   # Check if we need to convert this using DOS-style short mode. If the path
24425   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24426   # take no chances and rewrite it.
24427   # Note: m4 eats our [], so we need to use [ and ] instead.
24428   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24429   if test "x$has_forbidden_chars" != x; then
24430     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24431     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24432   fi
24433 
24434 
24435   windows_path="$new_path"
24436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24437     unix_path=`$CYGPATH -u "$windows_path"`
24438     new_path="$unix_path"
24439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24441     new_path="$unix_path"
24442   fi
24443 
24444   if test "x$path" != "x$new_path"; then
24445     BOOT_JDK="$new_path"
24446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24447 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24448   fi
24449 
24450   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24451   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24452 
24453     else
24454       # We're on a unix platform. Hooray! :)
24455       path="$BOOT_JDK"
24456       has_space=`$ECHO "$path" | $GREP " "`
24457       if test "x$has_space" != x; then
24458         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24459 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24460         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24461       fi
24462 
24463       # Use eval to expand a potential ~
24464       eval path="$path"
24465       if test ! -f "$path" && test ! -d "$path"; then
24466         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24467       fi
24468 
24469       if test -d "$path"; then
24470         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24471       else
24472         dir="`$DIRNAME "$path"`"
24473         base="`$BASENAME "$path"`"
24474         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24475       fi
24476     fi
24477   fi
24478 
24479             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24480 $as_echo_n "checking for Boot JDK... " >&6; }
24481             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24482 $as_echo "$BOOT_JDK" >&6; }
24483             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24484 $as_echo_n "checking Boot JDK version... " >&6; }
24485             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24486             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24487 $as_echo "$BOOT_JDK_VERSION" >&6; }
24488           fi # end check jdk version
24489         fi # end check javac
24490       fi # end check java
24491     fi # end check boot jdk found
24492   fi
24493 
24494   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24495     # Having specified an argument which is incorrect will produce an instant failure;
24496     # we should not go on looking
24497     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24498   fi
24499 
24500   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24501 
24502   if test "x$BOOT_JDK_FOUND" = xno; then
24503     # Now execute the test
24504 
24505   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24506     # First check at user selected default
24507 
24508   if test "x$BOOT_JDK_FOUND" = xno; then
24509     # Now execute the test
24510 
24511   if test -x /usr/libexec/java_home; then
24512     BOOT_JDK=`/usr/libexec/java_home `
24513     BOOT_JDK_FOUND=maybe
24514     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24515 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24516   fi
24517 
24518 
24519     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24520     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24521       # Do we have a bin/java?
24522       if test ! -x "$BOOT_JDK/bin/java"; then
24523         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24524 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24525         BOOT_JDK_FOUND=no
24526       else
24527         # Do we have a bin/javac?
24528         if test ! -x "$BOOT_JDK/bin/javac"; then
24529           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24530 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24531           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24532 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24533           BOOT_JDK_FOUND=no
24534         else
24535           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24536           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24537 
24538           # Extra M4 quote needed to protect [] in grep expression.
24539           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24540           if test "x$FOUND_CORRECT_VERSION" = x; then
24541             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24543             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24544 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24545             BOOT_JDK_FOUND=no
24546           else
24547             # We're done! :-)
24548             BOOT_JDK_FOUND=yes
24549 
24550   # Only process if variable expands to non-empty
24551 
24552   if test "x$BOOT_JDK" != x; then
24553     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24554 
24555   # Input might be given as Windows format, start by converting to
24556   # unix format.
24557   path="$BOOT_JDK"
24558   new_path=`$CYGPATH -u "$path"`
24559 
24560   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24561   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24562   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24563   # "foo.exe" is OK but "foo" is an error.
24564   #
24565   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24566   # It is also a way to make sure we got the proper file name for the real test later on.
24567   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24568   if test "x$test_shortpath" = x; then
24569     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24570 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24571     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24572   fi
24573 
24574   # Call helper function which possibly converts this using DOS-style short mode.
24575   # If so, the updated path is stored in $new_path.
24576 
24577   input_path="$new_path"
24578   # Check if we need to convert this using DOS-style short mode. If the path
24579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24580   # take no chances and rewrite it.
24581   # Note: m4 eats our [], so we need to use [ and ] instead.
24582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24583   if test "x$has_forbidden_chars" != x; then
24584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24585     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24586     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24587     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24588       # Going to short mode and back again did indeed matter. Since short mode is
24589       # case insensitive, let's make it lowercase to improve readability.
24590       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24591       # Now convert it back to Unix-style (cygpath)
24592       input_path=`$CYGPATH -u "$shortmode_path"`
24593       new_path="$input_path"
24594     fi
24595   fi
24596 
24597   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24598   if test "x$test_cygdrive_prefix" = x; then
24599     # As a simple fix, exclude /usr/bin since it's not a real path.
24600     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24601       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24602       # a path prefixed by /cygdrive for fixpath to work.
24603       new_path="$CYGWIN_ROOT_PATH$input_path"
24604     fi
24605   fi
24606 
24607 
24608   if test "x$path" != "x$new_path"; then
24609     BOOT_JDK="$new_path"
24610     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24611 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24612   fi
24613 
24614     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24615 
24616   path="$BOOT_JDK"
24617   has_colon=`$ECHO $path | $GREP ^.:`
24618   new_path="$path"
24619   if test "x$has_colon" = x; then
24620     # Not in mixed or Windows style, start by that.
24621     new_path=`cmd //c echo $path`
24622   fi
24623 
24624 
24625   input_path="$new_path"
24626   # Check if we need to convert this using DOS-style short mode. If the path
24627   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24628   # take no chances and rewrite it.
24629   # Note: m4 eats our [], so we need to use [ and ] instead.
24630   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24631   if test "x$has_forbidden_chars" != x; then
24632     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24633     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24634   fi
24635 
24636 
24637   windows_path="$new_path"
24638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24639     unix_path=`$CYGPATH -u "$windows_path"`
24640     new_path="$unix_path"
24641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24643     new_path="$unix_path"
24644   fi
24645 
24646   if test "x$path" != "x$new_path"; then
24647     BOOT_JDK="$new_path"
24648     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24649 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24650   fi
24651 
24652   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24653   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24654 
24655     else
24656       # We're on a unix platform. Hooray! :)
24657       path="$BOOT_JDK"
24658       has_space=`$ECHO "$path" | $GREP " "`
24659       if test "x$has_space" != x; then
24660         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24661 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24662         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24663       fi
24664 
24665       # Use eval to expand a potential ~
24666       eval path="$path"
24667       if test ! -f "$path" && test ! -d "$path"; then
24668         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24669       fi
24670 
24671       if test -d "$path"; then
24672         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24673       else
24674         dir="`$DIRNAME "$path"`"
24675         base="`$BASENAME "$path"`"
24676         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24677       fi
24678     fi
24679   fi
24680 
24681             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24682 $as_echo_n "checking for Boot JDK... " >&6; }
24683             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24684 $as_echo "$BOOT_JDK" >&6; }
24685             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24686 $as_echo_n "checking Boot JDK version... " >&6; }
24687             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24688             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24689 $as_echo "$BOOT_JDK_VERSION" >&6; }
24690           fi # end check jdk version
24691         fi # end check javac
24692       fi # end check java
24693     fi # end check boot jdk found
24694   fi
24695 
24696     # If that did not work out (e.g. too old), try explicit versions instead
24697 
24698   if test "x$BOOT_JDK_FOUND" = xno; then
24699     # Now execute the test
24700 
24701   if test -x /usr/libexec/java_home; then
24702     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24703     BOOT_JDK_FOUND=maybe
24704     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24705 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24706   fi
24707 
24708 
24709     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24710     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24711       # Do we have a bin/java?
24712       if test ! -x "$BOOT_JDK/bin/java"; then
24713         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24714 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24715         BOOT_JDK_FOUND=no
24716       else
24717         # Do we have a bin/javac?
24718         if test ! -x "$BOOT_JDK/bin/javac"; then
24719           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24720 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24721           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24722 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24723           BOOT_JDK_FOUND=no
24724         else
24725           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24726           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24727 
24728           # Extra M4 quote needed to protect [] in grep expression.
24729           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24730           if test "x$FOUND_CORRECT_VERSION" = x; then
24731             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24732 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24733             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24734 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24735             BOOT_JDK_FOUND=no
24736           else
24737             # We're done! :-)
24738             BOOT_JDK_FOUND=yes
24739 
24740   # Only process if variable expands to non-empty
24741 
24742   if test "x$BOOT_JDK" != x; then
24743     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24744 
24745   # Input might be given as Windows format, start by converting to
24746   # unix format.
24747   path="$BOOT_JDK"
24748   new_path=`$CYGPATH -u "$path"`
24749 
24750   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24751   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24752   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24753   # "foo.exe" is OK but "foo" is an error.
24754   #
24755   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24756   # It is also a way to make sure we got the proper file name for the real test later on.
24757   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24758   if test "x$test_shortpath" = x; then
24759     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24760 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24761     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24762   fi
24763 
24764   # Call helper function which possibly converts this using DOS-style short mode.
24765   # If so, the updated path is stored in $new_path.
24766 
24767   input_path="$new_path"
24768   # Check if we need to convert this using DOS-style short mode. If the path
24769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24770   # take no chances and rewrite it.
24771   # Note: m4 eats our [], so we need to use [ and ] instead.
24772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24773   if test "x$has_forbidden_chars" != x; then
24774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24775     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24776     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24777     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24778       # Going to short mode and back again did indeed matter. Since short mode is
24779       # case insensitive, let's make it lowercase to improve readability.
24780       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24781       # Now convert it back to Unix-style (cygpath)
24782       input_path=`$CYGPATH -u "$shortmode_path"`
24783       new_path="$input_path"
24784     fi
24785   fi
24786 
24787   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24788   if test "x$test_cygdrive_prefix" = x; then
24789     # As a simple fix, exclude /usr/bin since it's not a real path.
24790     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24791       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24792       # a path prefixed by /cygdrive for fixpath to work.
24793       new_path="$CYGWIN_ROOT_PATH$input_path"
24794     fi
24795   fi
24796 
24797 
24798   if test "x$path" != "x$new_path"; then
24799     BOOT_JDK="$new_path"
24800     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24801 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24802   fi
24803 
24804     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24805 
24806   path="$BOOT_JDK"
24807   has_colon=`$ECHO $path | $GREP ^.:`
24808   new_path="$path"
24809   if test "x$has_colon" = x; then
24810     # Not in mixed or Windows style, start by that.
24811     new_path=`cmd //c echo $path`
24812   fi
24813 
24814 
24815   input_path="$new_path"
24816   # Check if we need to convert this using DOS-style short mode. If the path
24817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24818   # take no chances and rewrite it.
24819   # Note: m4 eats our [], so we need to use [ and ] instead.
24820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24821   if test "x$has_forbidden_chars" != x; then
24822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24823     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24824   fi
24825 
24826 
24827   windows_path="$new_path"
24828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24829     unix_path=`$CYGPATH -u "$windows_path"`
24830     new_path="$unix_path"
24831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24833     new_path="$unix_path"
24834   fi
24835 
24836   if test "x$path" != "x$new_path"; then
24837     BOOT_JDK="$new_path"
24838     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24839 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24840   fi
24841 
24842   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24843   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24844 
24845     else
24846       # We're on a unix platform. Hooray! :)
24847       path="$BOOT_JDK"
24848       has_space=`$ECHO "$path" | $GREP " "`
24849       if test "x$has_space" != x; then
24850         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24851 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24852         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24853       fi
24854 
24855       # Use eval to expand a potential ~
24856       eval path="$path"
24857       if test ! -f "$path" && test ! -d "$path"; then
24858         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24859       fi
24860 
24861       if test -d "$path"; then
24862         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24863       else
24864         dir="`$DIRNAME "$path"`"
24865         base="`$BASENAME "$path"`"
24866         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24867       fi
24868     fi
24869   fi
24870 
24871             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24872 $as_echo_n "checking for Boot JDK... " >&6; }
24873             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24874 $as_echo "$BOOT_JDK" >&6; }
24875             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24876 $as_echo_n "checking Boot JDK version... " >&6; }
24877             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24878             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24879 $as_echo "$BOOT_JDK_VERSION" >&6; }
24880           fi # end check jdk version
24881         fi # end check javac
24882       fi # end check java
24883     fi # end check boot jdk found
24884   fi
24885 
24886 
24887   if test "x$BOOT_JDK_FOUND" = xno; then
24888     # Now execute the test
24889 
24890   if test -x /usr/libexec/java_home; then
24891     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24892     BOOT_JDK_FOUND=maybe
24893     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24894 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24895   fi
24896 
24897 
24898     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24899     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24900       # Do we have a bin/java?
24901       if test ! -x "$BOOT_JDK/bin/java"; then
24902         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24903 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24904         BOOT_JDK_FOUND=no
24905       else
24906         # Do we have a bin/javac?
24907         if test ! -x "$BOOT_JDK/bin/javac"; then
24908           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24909 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24910           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24911 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24912           BOOT_JDK_FOUND=no
24913         else
24914           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24915           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24916 
24917           # Extra M4 quote needed to protect [] in grep expression.
24918           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24919           if test "x$FOUND_CORRECT_VERSION" = x; then
24920             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24921 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24922             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24923 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24924             BOOT_JDK_FOUND=no
24925           else
24926             # We're done! :-)
24927             BOOT_JDK_FOUND=yes
24928 
24929   # Only process if variable expands to non-empty
24930 
24931   if test "x$BOOT_JDK" != x; then
24932     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24933 
24934   # Input might be given as Windows format, start by converting to
24935   # unix format.
24936   path="$BOOT_JDK"
24937   new_path=`$CYGPATH -u "$path"`
24938 
24939   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24940   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24941   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24942   # "foo.exe" is OK but "foo" is an error.
24943   #
24944   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24945   # It is also a way to make sure we got the proper file name for the real test later on.
24946   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24947   if test "x$test_shortpath" = x; then
24948     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24949 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24950     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24951   fi
24952 
24953   # Call helper function which possibly converts this using DOS-style short mode.
24954   # If so, the updated path is stored in $new_path.
24955 
24956   input_path="$new_path"
24957   # Check if we need to convert this using DOS-style short mode. If the path
24958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24959   # take no chances and rewrite it.
24960   # Note: m4 eats our [], so we need to use [ and ] instead.
24961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24962   if test "x$has_forbidden_chars" != x; then
24963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24964     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24965     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24966     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24967       # Going to short mode and back again did indeed matter. Since short mode is
24968       # case insensitive, let's make it lowercase to improve readability.
24969       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24970       # Now convert it back to Unix-style (cygpath)
24971       input_path=`$CYGPATH -u "$shortmode_path"`
24972       new_path="$input_path"
24973     fi
24974   fi
24975 
24976   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24977   if test "x$test_cygdrive_prefix" = x; then
24978     # As a simple fix, exclude /usr/bin since it's not a real path.
24979     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24980       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24981       # a path prefixed by /cygdrive for fixpath to work.
24982       new_path="$CYGWIN_ROOT_PATH$input_path"
24983     fi
24984   fi
24985 
24986 
24987   if test "x$path" != "x$new_path"; then
24988     BOOT_JDK="$new_path"
24989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24990 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24991   fi
24992 
24993     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24994 
24995   path="$BOOT_JDK"
24996   has_colon=`$ECHO $path | $GREP ^.:`
24997   new_path="$path"
24998   if test "x$has_colon" = x; then
24999     # Not in mixed or Windows style, start by that.
25000     new_path=`cmd //c echo $path`
25001   fi
25002 
25003 
25004   input_path="$new_path"
25005   # Check if we need to convert this using DOS-style short mode. If the path
25006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25007   # take no chances and rewrite it.
25008   # Note: m4 eats our [], so we need to use [ and ] instead.
25009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25010   if test "x$has_forbidden_chars" != x; then
25011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25013   fi
25014 
25015 
25016   windows_path="$new_path"
25017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25018     unix_path=`$CYGPATH -u "$windows_path"`
25019     new_path="$unix_path"
25020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25022     new_path="$unix_path"
25023   fi
25024 
25025   if test "x$path" != "x$new_path"; then
25026     BOOT_JDK="$new_path"
25027     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25028 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25029   fi
25030 
25031   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25032   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25033 
25034     else
25035       # We're on a unix platform. Hooray! :)
25036       path="$BOOT_JDK"
25037       has_space=`$ECHO "$path" | $GREP " "`
25038       if test "x$has_space" != x; then
25039         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25040 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25041         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25042       fi
25043 
25044       # Use eval to expand a potential ~
25045       eval path="$path"
25046       if test ! -f "$path" && test ! -d "$path"; then
25047         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25048       fi
25049 
25050       if test -d "$path"; then
25051         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25052       else
25053         dir="`$DIRNAME "$path"`"
25054         base="`$BASENAME "$path"`"
25055         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25056       fi
25057     fi
25058   fi
25059 
25060             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25061 $as_echo_n "checking for Boot JDK... " >&6; }
25062             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25063 $as_echo "$BOOT_JDK" >&6; }
25064             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25065 $as_echo_n "checking Boot JDK version... " >&6; }
25066             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25067             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25068 $as_echo "$BOOT_JDK_VERSION" >&6; }
25069           fi # end check jdk version
25070         fi # end check javac
25071       fi # end check java
25072     fi # end check boot jdk found
25073   fi
25074 
25075 
25076   if test "x$BOOT_JDK_FOUND" = xno; then
25077     # Now execute the test
25078 
25079   if test -x /usr/libexec/java_home; then
25080     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25081     BOOT_JDK_FOUND=maybe
25082     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25083 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25084   fi
25085 
25086 
25087     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25088     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25089       # Do we have a bin/java?
25090       if test ! -x "$BOOT_JDK/bin/java"; then
25091         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25093         BOOT_JDK_FOUND=no
25094       else
25095         # Do we have a bin/javac?
25096         if test ! -x "$BOOT_JDK/bin/javac"; then
25097           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25098 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25099           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25100 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25101           BOOT_JDK_FOUND=no
25102         else
25103           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25104           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25105 
25106           # Extra M4 quote needed to protect [] in grep expression.
25107           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25108           if test "x$FOUND_CORRECT_VERSION" = x; then
25109             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25110 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25111             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25112 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25113             BOOT_JDK_FOUND=no
25114           else
25115             # We're done! :-)
25116             BOOT_JDK_FOUND=yes
25117 
25118   # Only process if variable expands to non-empty
25119 
25120   if test "x$BOOT_JDK" != x; then
25121     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25122 
25123   # Input might be given as Windows format, start by converting to
25124   # unix format.
25125   path="$BOOT_JDK"
25126   new_path=`$CYGPATH -u "$path"`
25127 
25128   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25129   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25130   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25131   # "foo.exe" is OK but "foo" is an error.
25132   #
25133   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25134   # It is also a way to make sure we got the proper file name for the real test later on.
25135   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25136   if test "x$test_shortpath" = x; then
25137     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25138 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25139     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25140   fi
25141 
25142   # Call helper function which possibly converts this using DOS-style short mode.
25143   # If so, the updated path is stored in $new_path.
25144 
25145   input_path="$new_path"
25146   # Check if we need to convert this using DOS-style short mode. If the path
25147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25148   # take no chances and rewrite it.
25149   # Note: m4 eats our [], so we need to use [ and ] instead.
25150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25151   if test "x$has_forbidden_chars" != x; then
25152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25153     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25154     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25155     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25156       # Going to short mode and back again did indeed matter. Since short mode is
25157       # case insensitive, let's make it lowercase to improve readability.
25158       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25159       # Now convert it back to Unix-style (cygpath)
25160       input_path=`$CYGPATH -u "$shortmode_path"`
25161       new_path="$input_path"
25162     fi
25163   fi
25164 
25165   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25166   if test "x$test_cygdrive_prefix" = x; then
25167     # As a simple fix, exclude /usr/bin since it's not a real path.
25168     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25169       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25170       # a path prefixed by /cygdrive for fixpath to work.
25171       new_path="$CYGWIN_ROOT_PATH$input_path"
25172     fi
25173   fi
25174 
25175 
25176   if test "x$path" != "x$new_path"; then
25177     BOOT_JDK="$new_path"
25178     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25179 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25180   fi
25181 
25182     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25183 
25184   path="$BOOT_JDK"
25185   has_colon=`$ECHO $path | $GREP ^.:`
25186   new_path="$path"
25187   if test "x$has_colon" = x; then
25188     # Not in mixed or Windows style, start by that.
25189     new_path=`cmd //c echo $path`
25190   fi
25191 
25192 
25193   input_path="$new_path"
25194   # Check if we need to convert this using DOS-style short mode. If the path
25195   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25196   # take no chances and rewrite it.
25197   # Note: m4 eats our [], so we need to use [ and ] instead.
25198   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25199   if test "x$has_forbidden_chars" != x; then
25200     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25201     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25202   fi
25203 
25204 
25205   windows_path="$new_path"
25206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25207     unix_path=`$CYGPATH -u "$windows_path"`
25208     new_path="$unix_path"
25209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25210     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25211     new_path="$unix_path"
25212   fi
25213 
25214   if test "x$path" != "x$new_path"; then
25215     BOOT_JDK="$new_path"
25216     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25217 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25218   fi
25219 
25220   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25221   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25222 
25223     else
25224       # We're on a unix platform. Hooray! :)
25225       path="$BOOT_JDK"
25226       has_space=`$ECHO "$path" | $GREP " "`
25227       if test "x$has_space" != x; then
25228         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25229 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25230         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25231       fi
25232 
25233       # Use eval to expand a potential ~
25234       eval path="$path"
25235       if test ! -f "$path" && test ! -d "$path"; then
25236         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25237       fi
25238 
25239       if test -d "$path"; then
25240         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25241       else
25242         dir="`$DIRNAME "$path"`"
25243         base="`$BASENAME "$path"`"
25244         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25245       fi
25246     fi
25247   fi
25248 
25249             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25250 $as_echo_n "checking for Boot JDK... " >&6; }
25251             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25252 $as_echo "$BOOT_JDK" >&6; }
25253             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25254 $as_echo_n "checking Boot JDK version... " >&6; }
25255             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25256             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25257 $as_echo "$BOOT_JDK_VERSION" >&6; }
25258           fi # end check jdk version
25259         fi # end check javac
25260       fi # end check java
25261     fi # end check boot jdk found
25262   fi
25263 
25264   fi
25265 
25266 
25267     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25268     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25269       # Do we have a bin/java?
25270       if test ! -x "$BOOT_JDK/bin/java"; then
25271         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25272 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25273         BOOT_JDK_FOUND=no
25274       else
25275         # Do we have a bin/javac?
25276         if test ! -x "$BOOT_JDK/bin/javac"; then
25277           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25278 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25279           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25280 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25281           BOOT_JDK_FOUND=no
25282         else
25283           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25284           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25285 
25286           # Extra M4 quote needed to protect [] in grep expression.
25287           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25288           if test "x$FOUND_CORRECT_VERSION" = x; then
25289             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25290 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25291             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25292 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25293             BOOT_JDK_FOUND=no
25294           else
25295             # We're done! :-)
25296             BOOT_JDK_FOUND=yes
25297 
25298   # Only process if variable expands to non-empty
25299 
25300   if test "x$BOOT_JDK" != x; then
25301     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25302 
25303   # Input might be given as Windows format, start by converting to
25304   # unix format.
25305   path="$BOOT_JDK"
25306   new_path=`$CYGPATH -u "$path"`
25307 
25308   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25309   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25310   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25311   # "foo.exe" is OK but "foo" is an error.
25312   #
25313   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25314   # It is also a way to make sure we got the proper file name for the real test later on.
25315   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25316   if test "x$test_shortpath" = x; then
25317     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25318 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25319     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25320   fi
25321 
25322   # Call helper function which possibly converts this using DOS-style short mode.
25323   # If so, the updated path is stored in $new_path.
25324 
25325   input_path="$new_path"
25326   # Check if we need to convert this using DOS-style short mode. If the path
25327   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25328   # take no chances and rewrite it.
25329   # Note: m4 eats our [], so we need to use [ and ] instead.
25330   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25331   if test "x$has_forbidden_chars" != x; then
25332     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25333     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25334     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25335     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25336       # Going to short mode and back again did indeed matter. Since short mode is
25337       # case insensitive, let's make it lowercase to improve readability.
25338       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25339       # Now convert it back to Unix-style (cygpath)
25340       input_path=`$CYGPATH -u "$shortmode_path"`
25341       new_path="$input_path"
25342     fi
25343   fi
25344 
25345   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25346   if test "x$test_cygdrive_prefix" = x; then
25347     # As a simple fix, exclude /usr/bin since it's not a real path.
25348     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25349       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25350       # a path prefixed by /cygdrive for fixpath to work.
25351       new_path="$CYGWIN_ROOT_PATH$input_path"
25352     fi
25353   fi
25354 
25355 
25356   if test "x$path" != "x$new_path"; then
25357     BOOT_JDK="$new_path"
25358     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25359 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25360   fi
25361 
25362     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25363 
25364   path="$BOOT_JDK"
25365   has_colon=`$ECHO $path | $GREP ^.:`
25366   new_path="$path"
25367   if test "x$has_colon" = x; then
25368     # Not in mixed or Windows style, start by that.
25369     new_path=`cmd //c echo $path`
25370   fi
25371 
25372 
25373   input_path="$new_path"
25374   # Check if we need to convert this using DOS-style short mode. If the path
25375   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25376   # take no chances and rewrite it.
25377   # Note: m4 eats our [], so we need to use [ and ] instead.
25378   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25379   if test "x$has_forbidden_chars" != x; then
25380     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25381     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25382   fi
25383 
25384 
25385   windows_path="$new_path"
25386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25387     unix_path=`$CYGPATH -u "$windows_path"`
25388     new_path="$unix_path"
25389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25391     new_path="$unix_path"
25392   fi
25393 
25394   if test "x$path" != "x$new_path"; then
25395     BOOT_JDK="$new_path"
25396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25397 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25398   fi
25399 
25400   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25401   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25402 
25403     else
25404       # We're on a unix platform. Hooray! :)
25405       path="$BOOT_JDK"
25406       has_space=`$ECHO "$path" | $GREP " "`
25407       if test "x$has_space" != x; then
25408         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25409 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25410         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25411       fi
25412 
25413       # Use eval to expand a potential ~
25414       eval path="$path"
25415       if test ! -f "$path" && test ! -d "$path"; then
25416         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25417       fi
25418 
25419       if test -d "$path"; then
25420         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25421       else
25422         dir="`$DIRNAME "$path"`"
25423         base="`$BASENAME "$path"`"
25424         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25425       fi
25426     fi
25427   fi
25428 
25429             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25430 $as_echo_n "checking for Boot JDK... " >&6; }
25431             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25432 $as_echo "$BOOT_JDK" >&6; }
25433             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25434 $as_echo_n "checking Boot JDK version... " >&6; }
25435             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25436             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25437 $as_echo "$BOOT_JDK_VERSION" >&6; }
25438           fi # end check jdk version
25439         fi # end check javac
25440       fi # end check java
25441     fi # end check boot jdk found
25442   fi
25443 
25444 
25445   # Test: Is $JAVA_HOME set?
25446 
25447   if test "x$BOOT_JDK_FOUND" = xno; then
25448     # Now execute the test
25449 
25450   if test "x$JAVA_HOME" != x; then
25451     JAVA_HOME_PROCESSED="$JAVA_HOME"
25452 
25453   # Only process if variable expands to non-empty
25454 
25455   if test "x$JAVA_HOME_PROCESSED" != x; then
25456     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25457 
25458   # Input might be given as Windows format, start by converting to
25459   # unix format.
25460   path="$JAVA_HOME_PROCESSED"
25461   new_path=`$CYGPATH -u "$path"`
25462 
25463   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25464   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25465   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25466   # "foo.exe" is OK but "foo" is an error.
25467   #
25468   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25469   # It is also a way to make sure we got the proper file name for the real test later on.
25470   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25471   if test "x$test_shortpath" = x; then
25472     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25473 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25474     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25475   fi
25476 
25477   # Call helper function which possibly converts this using DOS-style short mode.
25478   # If so, the updated path is stored in $new_path.
25479 
25480   input_path="$new_path"
25481   # Check if we need to convert this using DOS-style short mode. If the path
25482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25483   # take no chances and rewrite it.
25484   # Note: m4 eats our [], so we need to use [ and ] instead.
25485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25486   if test "x$has_forbidden_chars" != x; then
25487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25488     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25489     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25490     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25491       # Going to short mode and back again did indeed matter. Since short mode is
25492       # case insensitive, let's make it lowercase to improve readability.
25493       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25494       # Now convert it back to Unix-style (cygpath)
25495       input_path=`$CYGPATH -u "$shortmode_path"`
25496       new_path="$input_path"
25497     fi
25498   fi
25499 
25500   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25501   if test "x$test_cygdrive_prefix" = x; then
25502     # As a simple fix, exclude /usr/bin since it's not a real path.
25503     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25504       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25505       # a path prefixed by /cygdrive for fixpath to work.
25506       new_path="$CYGWIN_ROOT_PATH$input_path"
25507     fi
25508   fi
25509 
25510 
25511   if test "x$path" != "x$new_path"; then
25512     JAVA_HOME_PROCESSED="$new_path"
25513     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25514 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25515   fi
25516 
25517     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25518 
25519   path="$JAVA_HOME_PROCESSED"
25520   has_colon=`$ECHO $path | $GREP ^.:`
25521   new_path="$path"
25522   if test "x$has_colon" = x; then
25523     # Not in mixed or Windows style, start by that.
25524     new_path=`cmd //c echo $path`
25525   fi
25526 
25527 
25528   input_path="$new_path"
25529   # Check if we need to convert this using DOS-style short mode. If the path
25530   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25531   # take no chances and rewrite it.
25532   # Note: m4 eats our [], so we need to use [ and ] instead.
25533   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25534   if test "x$has_forbidden_chars" != x; then
25535     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25536     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25537   fi
25538 
25539 
25540   windows_path="$new_path"
25541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25542     unix_path=`$CYGPATH -u "$windows_path"`
25543     new_path="$unix_path"
25544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25546     new_path="$unix_path"
25547   fi
25548 
25549   if test "x$path" != "x$new_path"; then
25550     JAVA_HOME_PROCESSED="$new_path"
25551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25552 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25553   fi
25554 
25555   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25556   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25557 
25558     else
25559       # We're on a unix platform. Hooray! :)
25560       path="$JAVA_HOME_PROCESSED"
25561       has_space=`$ECHO "$path" | $GREP " "`
25562       if test "x$has_space" != x; then
25563         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25564 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25565         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25566       fi
25567 
25568       # Use eval to expand a potential ~
25569       eval path="$path"
25570       if test ! -f "$path" && test ! -d "$path"; then
25571         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25572       fi
25573 
25574       if test -d "$path"; then
25575         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25576       else
25577         dir="`$DIRNAME "$path"`"
25578         base="`$BASENAME "$path"`"
25579         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25580       fi
25581     fi
25582   fi
25583 
25584     if test ! -d "$JAVA_HOME_PROCESSED"; then
25585       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25586 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25587     else
25588       # Aha, the user has set a JAVA_HOME
25589       # let us use that as the Boot JDK.
25590       BOOT_JDK="$JAVA_HOME_PROCESSED"
25591       BOOT_JDK_FOUND=maybe
25592       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25593 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25594     fi
25595   fi
25596 
25597 
25598     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25599     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25600       # Do we have a bin/java?
25601       if test ! -x "$BOOT_JDK/bin/java"; then
25602         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25603 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25604         BOOT_JDK_FOUND=no
25605       else
25606         # Do we have a bin/javac?
25607         if test ! -x "$BOOT_JDK/bin/javac"; then
25608           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25609 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25610           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25611 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25612           BOOT_JDK_FOUND=no
25613         else
25614           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25615           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25616 
25617           # Extra M4 quote needed to protect [] in grep expression.
25618           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25619           if test "x$FOUND_CORRECT_VERSION" = x; then
25620             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25621 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25622             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25623 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25624             BOOT_JDK_FOUND=no
25625           else
25626             # We're done! :-)
25627             BOOT_JDK_FOUND=yes
25628 
25629   # Only process if variable expands to non-empty
25630 
25631   if test "x$BOOT_JDK" != x; then
25632     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25633 
25634   # Input might be given as Windows format, start by converting to
25635   # unix format.
25636   path="$BOOT_JDK"
25637   new_path=`$CYGPATH -u "$path"`
25638 
25639   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25640   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25641   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25642   # "foo.exe" is OK but "foo" is an error.
25643   #
25644   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25645   # It is also a way to make sure we got the proper file name for the real test later on.
25646   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25647   if test "x$test_shortpath" = x; then
25648     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25649 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25650     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25651   fi
25652 
25653   # Call helper function which possibly converts this using DOS-style short mode.
25654   # If so, the updated path is stored in $new_path.
25655 
25656   input_path="$new_path"
25657   # Check if we need to convert this using DOS-style short mode. If the path
25658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25659   # take no chances and rewrite it.
25660   # Note: m4 eats our [], so we need to use [ and ] instead.
25661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25662   if test "x$has_forbidden_chars" != x; then
25663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25664     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25665     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25666     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25667       # Going to short mode and back again did indeed matter. Since short mode is
25668       # case insensitive, let's make it lowercase to improve readability.
25669       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25670       # Now convert it back to Unix-style (cygpath)
25671       input_path=`$CYGPATH -u "$shortmode_path"`
25672       new_path="$input_path"
25673     fi
25674   fi
25675 
25676   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25677   if test "x$test_cygdrive_prefix" = x; then
25678     # As a simple fix, exclude /usr/bin since it's not a real path.
25679     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25680       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25681       # a path prefixed by /cygdrive for fixpath to work.
25682       new_path="$CYGWIN_ROOT_PATH$input_path"
25683     fi
25684   fi
25685 
25686 
25687   if test "x$path" != "x$new_path"; then
25688     BOOT_JDK="$new_path"
25689     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25690 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25691   fi
25692 
25693     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25694 
25695   path="$BOOT_JDK"
25696   has_colon=`$ECHO $path | $GREP ^.:`
25697   new_path="$path"
25698   if test "x$has_colon" = x; then
25699     # Not in mixed or Windows style, start by that.
25700     new_path=`cmd //c echo $path`
25701   fi
25702 
25703 
25704   input_path="$new_path"
25705   # Check if we need to convert this using DOS-style short mode. If the path
25706   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25707   # take no chances and rewrite it.
25708   # Note: m4 eats our [], so we need to use [ and ] instead.
25709   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25710   if test "x$has_forbidden_chars" != x; then
25711     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25712     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25713   fi
25714 
25715 
25716   windows_path="$new_path"
25717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25718     unix_path=`$CYGPATH -u "$windows_path"`
25719     new_path="$unix_path"
25720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25722     new_path="$unix_path"
25723   fi
25724 
25725   if test "x$path" != "x$new_path"; then
25726     BOOT_JDK="$new_path"
25727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25728 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25729   fi
25730 
25731   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25732   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25733 
25734     else
25735       # We're on a unix platform. Hooray! :)
25736       path="$BOOT_JDK"
25737       has_space=`$ECHO "$path" | $GREP " "`
25738       if test "x$has_space" != x; then
25739         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25740 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25741         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25742       fi
25743 
25744       # Use eval to expand a potential ~
25745       eval path="$path"
25746       if test ! -f "$path" && test ! -d "$path"; then
25747         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25748       fi
25749 
25750       if test -d "$path"; then
25751         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25752       else
25753         dir="`$DIRNAME "$path"`"
25754         base="`$BASENAME "$path"`"
25755         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25756       fi
25757     fi
25758   fi
25759 
25760             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25761 $as_echo_n "checking for Boot JDK... " >&6; }
25762             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25763 $as_echo "$BOOT_JDK" >&6; }
25764             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25765 $as_echo_n "checking Boot JDK version... " >&6; }
25766             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25767             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25768 $as_echo "$BOOT_JDK_VERSION" >&6; }
25769           fi # end check jdk version
25770         fi # end check javac
25771       fi # end check java
25772     fi # end check boot jdk found
25773   fi
25774 
25775 
25776   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25777 
25778   if test "x$BOOT_JDK_FOUND" = xno; then
25779     # Now execute the test
25780 
25781   # Extract the first word of "javac", so it can be a program name with args.
25782 set dummy javac; ac_word=$2
25783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25784 $as_echo_n "checking for $ac_word... " >&6; }
25785 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25786   $as_echo_n "(cached) " >&6
25787 else
25788   case $JAVAC_CHECK in
25789   [\\/]* | ?:[\\/]*)
25790   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25791   ;;
25792   *)
25793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25794 for as_dir in $PATH
25795 do
25796   IFS=$as_save_IFS
25797   test -z "$as_dir" && as_dir=.
25798     for ac_exec_ext in '' $ac_executable_extensions; do
25799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25800     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25802     break 2
25803   fi
25804 done
25805   done
25806 IFS=$as_save_IFS
25807 
25808   ;;
25809 esac
25810 fi
25811 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25812 if test -n "$JAVAC_CHECK"; then
25813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25814 $as_echo "$JAVAC_CHECK" >&6; }
25815 else
25816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25817 $as_echo "no" >&6; }
25818 fi
25819 
25820 
25821   # Extract the first word of "java", so it can be a program name with args.
25822 set dummy java; ac_word=$2
25823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25824 $as_echo_n "checking for $ac_word... " >&6; }
25825 if ${ac_cv_path_JAVA_CHECK+:} false; then :
25826   $as_echo_n "(cached) " >&6
25827 else
25828   case $JAVA_CHECK in
25829   [\\/]* | ?:[\\/]*)
25830   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25831   ;;
25832   *)
25833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25834 for as_dir in $PATH
25835 do
25836   IFS=$as_save_IFS
25837   test -z "$as_dir" && as_dir=.
25838     for ac_exec_ext in '' $ac_executable_extensions; do
25839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25840     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25842     break 2
25843   fi
25844 done
25845   done
25846 IFS=$as_save_IFS
25847 
25848   ;;
25849 esac
25850 fi
25851 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25852 if test -n "$JAVA_CHECK"; then
25853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25854 $as_echo "$JAVA_CHECK" >&6; }
25855 else
25856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25857 $as_echo "no" >&6; }
25858 fi
25859 
25860 
25861   BINARY="$JAVAC_CHECK"
25862   if test "x$JAVAC_CHECK" = x; then
25863     BINARY="$JAVA_CHECK"
25864   fi
25865   if test "x$BINARY" != x; then
25866     # So there is a java(c) binary, it might be part of a JDK.
25867     # Lets find the JDK/JRE directory by following symbolic links.
25868     # Linux/GNU systems often have links from /usr/bin/java to
25869     # /etc/alternatives/java to the real JDK binary.
25870 
25871   if test "x$OPENJDK_BUILD_OS" != xwindows; then
25872     # Follow a chain of symbolic links. Use readlink
25873     # where it exists, else fall back to horribly
25874     # complicated shell code.
25875     if test "x$READLINK_TESTED" != yes; then
25876       # On MacOSX there is a readlink tool with a different
25877       # purpose than the GNU readlink tool. Check the found readlink.
25878       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25879       if test "x$ISGNU" = x; then
25880         # A readlink that we do not know how to use.
25881         # Are there other non-GNU readlinks out there?
25882         READLINK_TESTED=yes
25883         READLINK=
25884       fi
25885     fi
25886 
25887     if test "x$READLINK" != x; then
25888       BINARY=`$READLINK -f $BINARY`
25889     else
25890       # Save the current directory for restoring afterwards
25891       STARTDIR=$PWD
25892       COUNTER=0
25893       sym_link_dir=`$DIRNAME $BINARY`
25894       sym_link_file=`$BASENAME $BINARY`
25895       cd $sym_link_dir
25896       # Use -P flag to resolve symlinks in directories.
25897       cd `$THEPWDCMD -P`
25898       sym_link_dir=`$THEPWDCMD -P`
25899       # Resolve file symlinks
25900       while test $COUNTER -lt 20; do
25901         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25902         if test "x$ISLINK" == x; then
25903           # This is not a symbolic link! We are done!
25904           break
25905         fi
25906         # Again resolve directory symlinks since the target of the just found
25907         # link could be in a different directory
25908         cd `$DIRNAME $ISLINK`
25909         sym_link_dir=`$THEPWDCMD -P`
25910         sym_link_file=`$BASENAME $ISLINK`
25911         let COUNTER=COUNTER+1
25912       done
25913       cd $STARTDIR
25914       BINARY=$sym_link_dir/$sym_link_file
25915     fi
25916   fi
25917 
25918     BOOT_JDK=`dirname "$BINARY"`
25919     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25920     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25921       # Looks like we found ourselves an JDK
25922       BOOT_JDK_FOUND=maybe
25923       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25924 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25925     fi
25926   fi
25927 
25928 
25929     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25930     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25931       # Do we have a bin/java?
25932       if test ! -x "$BOOT_JDK/bin/java"; then
25933         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25934 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25935         BOOT_JDK_FOUND=no
25936       else
25937         # Do we have a bin/javac?
25938         if test ! -x "$BOOT_JDK/bin/javac"; then
25939           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25940 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25941           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25942 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25943           BOOT_JDK_FOUND=no
25944         else
25945           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25946           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25947 
25948           # Extra M4 quote needed to protect [] in grep expression.
25949           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25950           if test "x$FOUND_CORRECT_VERSION" = x; then
25951             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25952 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25953             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25954 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25955             BOOT_JDK_FOUND=no
25956           else
25957             # We're done! :-)
25958             BOOT_JDK_FOUND=yes
25959 
25960   # Only process if variable expands to non-empty
25961 
25962   if test "x$BOOT_JDK" != x; then
25963     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25964 
25965   # Input might be given as Windows format, start by converting to
25966   # unix format.
25967   path="$BOOT_JDK"
25968   new_path=`$CYGPATH -u "$path"`
25969 
25970   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25971   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25972   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25973   # "foo.exe" is OK but "foo" is an error.
25974   #
25975   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25976   # It is also a way to make sure we got the proper file name for the real test later on.
25977   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25978   if test "x$test_shortpath" = x; then
25979     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25980 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25981     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25982   fi
25983 
25984   # Call helper function which possibly converts this using DOS-style short mode.
25985   # If so, the updated path is stored in $new_path.
25986 
25987   input_path="$new_path"
25988   # Check if we need to convert this using DOS-style short mode. If the path
25989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25990   # take no chances and rewrite it.
25991   # Note: m4 eats our [], so we need to use [ and ] instead.
25992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25993   if test "x$has_forbidden_chars" != x; then
25994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25995     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25996     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25997     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25998       # Going to short mode and back again did indeed matter. Since short mode is
25999       # case insensitive, let's make it lowercase to improve readability.
26000       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26001       # Now convert it back to Unix-style (cygpath)
26002       input_path=`$CYGPATH -u "$shortmode_path"`
26003       new_path="$input_path"
26004     fi
26005   fi
26006 
26007   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26008   if test "x$test_cygdrive_prefix" = x; then
26009     # As a simple fix, exclude /usr/bin since it's not a real path.
26010     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26011       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26012       # a path prefixed by /cygdrive for fixpath to work.
26013       new_path="$CYGWIN_ROOT_PATH$input_path"
26014     fi
26015   fi
26016 
26017 
26018   if test "x$path" != "x$new_path"; then
26019     BOOT_JDK="$new_path"
26020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26021 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26022   fi
26023 
26024     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26025 
26026   path="$BOOT_JDK"
26027   has_colon=`$ECHO $path | $GREP ^.:`
26028   new_path="$path"
26029   if test "x$has_colon" = x; then
26030     # Not in mixed or Windows style, start by that.
26031     new_path=`cmd //c echo $path`
26032   fi
26033 
26034 
26035   input_path="$new_path"
26036   # Check if we need to convert this using DOS-style short mode. If the path
26037   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26038   # take no chances and rewrite it.
26039   # Note: m4 eats our [], so we need to use [ and ] instead.
26040   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26041   if test "x$has_forbidden_chars" != x; then
26042     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26043     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26044   fi
26045 
26046 
26047   windows_path="$new_path"
26048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26049     unix_path=`$CYGPATH -u "$windows_path"`
26050     new_path="$unix_path"
26051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26053     new_path="$unix_path"
26054   fi
26055 
26056   if test "x$path" != "x$new_path"; then
26057     BOOT_JDK="$new_path"
26058     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26059 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26060   fi
26061 
26062   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26063   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26064 
26065     else
26066       # We're on a unix platform. Hooray! :)
26067       path="$BOOT_JDK"
26068       has_space=`$ECHO "$path" | $GREP " "`
26069       if test "x$has_space" != x; then
26070         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26071 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26072         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26073       fi
26074 
26075       # Use eval to expand a potential ~
26076       eval path="$path"
26077       if test ! -f "$path" && test ! -d "$path"; then
26078         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26079       fi
26080 
26081       if test -d "$path"; then
26082         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26083       else
26084         dir="`$DIRNAME "$path"`"
26085         base="`$BASENAME "$path"`"
26086         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26087       fi
26088     fi
26089   fi
26090 
26091             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26092 $as_echo_n "checking for Boot JDK... " >&6; }
26093             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26094 $as_echo "$BOOT_JDK" >&6; }
26095             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26096 $as_echo_n "checking Boot JDK version... " >&6; }
26097             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26098             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26099 $as_echo "$BOOT_JDK_VERSION" >&6; }
26100           fi # end check jdk version
26101         fi # end check javac
26102       fi # end check java
26103     fi # end check boot jdk found
26104   fi
26105 
26106 
26107   # Test: Is there a JDK installed in default, well-known locations?
26108 
26109   if test "x$BOOT_JDK_FOUND" = xno; then
26110     # Now execute the test
26111 
26112   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26113 
26114   if test "x$BOOT_JDK_FOUND" = xno; then
26115     # Now execute the test
26116 
26117   if test "x$ProgramW6432" != x; then
26118     VIRTUAL_DIR="$ProgramW6432/Java"
26119 
26120   windows_path="$VIRTUAL_DIR"
26121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26122     unix_path=`$CYGPATH -u "$windows_path"`
26123     VIRTUAL_DIR="$unix_path"
26124   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26125     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26126     VIRTUAL_DIR="$unix_path"
26127   fi
26128 
26129 
26130   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26131   BOOT_JDK_SUFFIX=""
26132   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26133   if test "x$ALL_JDKS_FOUND" != x; then
26134     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26135 
26136   if test "x$BOOT_JDK_FOUND" = xno; then
26137     # Now execute the test
26138 
26139         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26140         if test -d "$BOOT_JDK"; then
26141           BOOT_JDK_FOUND=maybe
26142           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26143 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26144         fi
26145 
26146 
26147     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26148     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26149       # Do we have a bin/java?
26150       if test ! -x "$BOOT_JDK/bin/java"; then
26151         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26152 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26153         BOOT_JDK_FOUND=no
26154       else
26155         # Do we have a bin/javac?
26156         if test ! -x "$BOOT_JDK/bin/javac"; then
26157           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26158 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26159           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26160 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26161           BOOT_JDK_FOUND=no
26162         else
26163           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26164           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26165 
26166           # Extra M4 quote needed to protect [] in grep expression.
26167           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26168           if test "x$FOUND_CORRECT_VERSION" = x; then
26169             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26170 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26171             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26172 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26173             BOOT_JDK_FOUND=no
26174           else
26175             # We're done! :-)
26176             BOOT_JDK_FOUND=yes
26177 
26178   # Only process if variable expands to non-empty
26179 
26180   if test "x$BOOT_JDK" != x; then
26181     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26182 
26183   # Input might be given as Windows format, start by converting to
26184   # unix format.
26185   path="$BOOT_JDK"
26186   new_path=`$CYGPATH -u "$path"`
26187 
26188   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26189   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26190   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26191   # "foo.exe" is OK but "foo" is an error.
26192   #
26193   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26194   # It is also a way to make sure we got the proper file name for the real test later on.
26195   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26196   if test "x$test_shortpath" = x; then
26197     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26198 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26199     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26200   fi
26201 
26202   # Call helper function which possibly converts this using DOS-style short mode.
26203   # If so, the updated path is stored in $new_path.
26204 
26205   input_path="$new_path"
26206   # Check if we need to convert this using DOS-style short mode. If the path
26207   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26208   # take no chances and rewrite it.
26209   # Note: m4 eats our [], so we need to use [ and ] instead.
26210   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26211   if test "x$has_forbidden_chars" != x; then
26212     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26213     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26214     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26215     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26216       # Going to short mode and back again did indeed matter. Since short mode is
26217       # case insensitive, let's make it lowercase to improve readability.
26218       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26219       # Now convert it back to Unix-style (cygpath)
26220       input_path=`$CYGPATH -u "$shortmode_path"`
26221       new_path="$input_path"
26222     fi
26223   fi
26224 
26225   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26226   if test "x$test_cygdrive_prefix" = x; then
26227     # As a simple fix, exclude /usr/bin since it's not a real path.
26228     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26229       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26230       # a path prefixed by /cygdrive for fixpath to work.
26231       new_path="$CYGWIN_ROOT_PATH$input_path"
26232     fi
26233   fi
26234 
26235 
26236   if test "x$path" != "x$new_path"; then
26237     BOOT_JDK="$new_path"
26238     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26239 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26240   fi
26241 
26242     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26243 
26244   path="$BOOT_JDK"
26245   has_colon=`$ECHO $path | $GREP ^.:`
26246   new_path="$path"
26247   if test "x$has_colon" = x; then
26248     # Not in mixed or Windows style, start by that.
26249     new_path=`cmd //c echo $path`
26250   fi
26251 
26252 
26253   input_path="$new_path"
26254   # Check if we need to convert this using DOS-style short mode. If the path
26255   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26256   # take no chances and rewrite it.
26257   # Note: m4 eats our [], so we need to use [ and ] instead.
26258   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26259   if test "x$has_forbidden_chars" != x; then
26260     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26261     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26262   fi
26263 
26264 
26265   windows_path="$new_path"
26266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26267     unix_path=`$CYGPATH -u "$windows_path"`
26268     new_path="$unix_path"
26269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26271     new_path="$unix_path"
26272   fi
26273 
26274   if test "x$path" != "x$new_path"; then
26275     BOOT_JDK="$new_path"
26276     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26277 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26278   fi
26279 
26280   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26281   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26282 
26283     else
26284       # We're on a unix platform. Hooray! :)
26285       path="$BOOT_JDK"
26286       has_space=`$ECHO "$path" | $GREP " "`
26287       if test "x$has_space" != x; then
26288         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26289 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26290         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26291       fi
26292 
26293       # Use eval to expand a potential ~
26294       eval path="$path"
26295       if test ! -f "$path" && test ! -d "$path"; then
26296         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26297       fi
26298 
26299       if test -d "$path"; then
26300         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26301       else
26302         dir="`$DIRNAME "$path"`"
26303         base="`$BASENAME "$path"`"
26304         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26305       fi
26306     fi
26307   fi
26308 
26309             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26310 $as_echo_n "checking for Boot JDK... " >&6; }
26311             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26312 $as_echo "$BOOT_JDK" >&6; }
26313             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26314 $as_echo_n "checking Boot JDK version... " >&6; }
26315             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26316             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26317 $as_echo "$BOOT_JDK_VERSION" >&6; }
26318           fi # end check jdk version
26319         fi # end check javac
26320       fi # end check java
26321     fi # end check boot jdk found
26322   fi
26323 
26324     done
26325   fi
26326 
26327   fi
26328 
26329 
26330     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26331     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26332       # Do we have a bin/java?
26333       if test ! -x "$BOOT_JDK/bin/java"; then
26334         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26335 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26336         BOOT_JDK_FOUND=no
26337       else
26338         # Do we have a bin/javac?
26339         if test ! -x "$BOOT_JDK/bin/javac"; then
26340           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26341 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26342           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26343 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26344           BOOT_JDK_FOUND=no
26345         else
26346           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26347           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26348 
26349           # Extra M4 quote needed to protect [] in grep expression.
26350           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26351           if test "x$FOUND_CORRECT_VERSION" = x; then
26352             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26354             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26355 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26356             BOOT_JDK_FOUND=no
26357           else
26358             # We're done! :-)
26359             BOOT_JDK_FOUND=yes
26360 
26361   # Only process if variable expands to non-empty
26362 
26363   if test "x$BOOT_JDK" != x; then
26364     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26365 
26366   # Input might be given as Windows format, start by converting to
26367   # unix format.
26368   path="$BOOT_JDK"
26369   new_path=`$CYGPATH -u "$path"`
26370 
26371   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26372   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26373   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26374   # "foo.exe" is OK but "foo" is an error.
26375   #
26376   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26377   # It is also a way to make sure we got the proper file name for the real test later on.
26378   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26379   if test "x$test_shortpath" = x; then
26380     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26381 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26382     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26383   fi
26384 
26385   # Call helper function which possibly converts this using DOS-style short mode.
26386   # If so, the updated path is stored in $new_path.
26387 
26388   input_path="$new_path"
26389   # Check if we need to convert this using DOS-style short mode. If the path
26390   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26391   # take no chances and rewrite it.
26392   # Note: m4 eats our [], so we need to use [ and ] instead.
26393   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26394   if test "x$has_forbidden_chars" != x; then
26395     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26396     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26397     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26398     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26399       # Going to short mode and back again did indeed matter. Since short mode is
26400       # case insensitive, let's make it lowercase to improve readability.
26401       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26402       # Now convert it back to Unix-style (cygpath)
26403       input_path=`$CYGPATH -u "$shortmode_path"`
26404       new_path="$input_path"
26405     fi
26406   fi
26407 
26408   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26409   if test "x$test_cygdrive_prefix" = x; then
26410     # As a simple fix, exclude /usr/bin since it's not a real path.
26411     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26412       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26413       # a path prefixed by /cygdrive for fixpath to work.
26414       new_path="$CYGWIN_ROOT_PATH$input_path"
26415     fi
26416   fi
26417 
26418 
26419   if test "x$path" != "x$new_path"; then
26420     BOOT_JDK="$new_path"
26421     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26422 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26423   fi
26424 
26425     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26426 
26427   path="$BOOT_JDK"
26428   has_colon=`$ECHO $path | $GREP ^.:`
26429   new_path="$path"
26430   if test "x$has_colon" = x; then
26431     # Not in mixed or Windows style, start by that.
26432     new_path=`cmd //c echo $path`
26433   fi
26434 
26435 
26436   input_path="$new_path"
26437   # Check if we need to convert this using DOS-style short mode. If the path
26438   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26439   # take no chances and rewrite it.
26440   # Note: m4 eats our [], so we need to use [ and ] instead.
26441   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26442   if test "x$has_forbidden_chars" != x; then
26443     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26444     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26445   fi
26446 
26447 
26448   windows_path="$new_path"
26449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26450     unix_path=`$CYGPATH -u "$windows_path"`
26451     new_path="$unix_path"
26452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26454     new_path="$unix_path"
26455   fi
26456 
26457   if test "x$path" != "x$new_path"; then
26458     BOOT_JDK="$new_path"
26459     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26460 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26461   fi
26462 
26463   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26464   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26465 
26466     else
26467       # We're on a unix platform. Hooray! :)
26468       path="$BOOT_JDK"
26469       has_space=`$ECHO "$path" | $GREP " "`
26470       if test "x$has_space" != x; then
26471         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26472 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26473         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26474       fi
26475 
26476       # Use eval to expand a potential ~
26477       eval path="$path"
26478       if test ! -f "$path" && test ! -d "$path"; then
26479         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26480       fi
26481 
26482       if test -d "$path"; then
26483         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26484       else
26485         dir="`$DIRNAME "$path"`"
26486         base="`$BASENAME "$path"`"
26487         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26488       fi
26489     fi
26490   fi
26491 
26492             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26493 $as_echo_n "checking for Boot JDK... " >&6; }
26494             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26495 $as_echo "$BOOT_JDK" >&6; }
26496             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26497 $as_echo_n "checking Boot JDK version... " >&6; }
26498             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26499             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26500 $as_echo "$BOOT_JDK_VERSION" >&6; }
26501           fi # end check jdk version
26502         fi # end check javac
26503       fi # end check java
26504     fi # end check boot jdk found
26505   fi
26506 
26507 
26508   if test "x$BOOT_JDK_FOUND" = xno; then
26509     # Now execute the test
26510 
26511   if test "x$PROGRAMW6432" != x; then
26512     VIRTUAL_DIR="$PROGRAMW6432/Java"
26513 
26514   windows_path="$VIRTUAL_DIR"
26515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26516     unix_path=`$CYGPATH -u "$windows_path"`
26517     VIRTUAL_DIR="$unix_path"
26518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26519     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26520     VIRTUAL_DIR="$unix_path"
26521   fi
26522 
26523 
26524   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26525   BOOT_JDK_SUFFIX=""
26526   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26527   if test "x$ALL_JDKS_FOUND" != x; then
26528     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26529 
26530   if test "x$BOOT_JDK_FOUND" = xno; then
26531     # Now execute the test
26532 
26533         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26534         if test -d "$BOOT_JDK"; then
26535           BOOT_JDK_FOUND=maybe
26536           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26537 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26538         fi
26539 
26540 
26541     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26542     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26543       # Do we have a bin/java?
26544       if test ! -x "$BOOT_JDK/bin/java"; then
26545         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26546 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26547         BOOT_JDK_FOUND=no
26548       else
26549         # Do we have a bin/javac?
26550         if test ! -x "$BOOT_JDK/bin/javac"; then
26551           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26552 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26553           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26554 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26555           BOOT_JDK_FOUND=no
26556         else
26557           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26558           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26559 
26560           # Extra M4 quote needed to protect [] in grep expression.
26561           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26562           if test "x$FOUND_CORRECT_VERSION" = x; then
26563             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26564 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26565             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26566 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26567             BOOT_JDK_FOUND=no
26568           else
26569             # We're done! :-)
26570             BOOT_JDK_FOUND=yes
26571 
26572   # Only process if variable expands to non-empty
26573 
26574   if test "x$BOOT_JDK" != x; then
26575     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26576 
26577   # Input might be given as Windows format, start by converting to
26578   # unix format.
26579   path="$BOOT_JDK"
26580   new_path=`$CYGPATH -u "$path"`
26581 
26582   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26583   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26584   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26585   # "foo.exe" is OK but "foo" is an error.
26586   #
26587   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26588   # It is also a way to make sure we got the proper file name for the real test later on.
26589   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26590   if test "x$test_shortpath" = x; then
26591     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26592 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26593     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26594   fi
26595 
26596   # Call helper function which possibly converts this using DOS-style short mode.
26597   # If so, the updated path is stored in $new_path.
26598 
26599   input_path="$new_path"
26600   # Check if we need to convert this using DOS-style short mode. If the path
26601   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26602   # take no chances and rewrite it.
26603   # Note: m4 eats our [], so we need to use [ and ] instead.
26604   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26605   if test "x$has_forbidden_chars" != x; then
26606     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26607     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26608     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26609     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26610       # Going to short mode and back again did indeed matter. Since short mode is
26611       # case insensitive, let's make it lowercase to improve readability.
26612       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26613       # Now convert it back to Unix-style (cygpath)
26614       input_path=`$CYGPATH -u "$shortmode_path"`
26615       new_path="$input_path"
26616     fi
26617   fi
26618 
26619   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26620   if test "x$test_cygdrive_prefix" = x; then
26621     # As a simple fix, exclude /usr/bin since it's not a real path.
26622     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26623       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26624       # a path prefixed by /cygdrive for fixpath to work.
26625       new_path="$CYGWIN_ROOT_PATH$input_path"
26626     fi
26627   fi
26628 
26629 
26630   if test "x$path" != "x$new_path"; then
26631     BOOT_JDK="$new_path"
26632     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26633 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26634   fi
26635 
26636     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26637 
26638   path="$BOOT_JDK"
26639   has_colon=`$ECHO $path | $GREP ^.:`
26640   new_path="$path"
26641   if test "x$has_colon" = x; then
26642     # Not in mixed or Windows style, start by that.
26643     new_path=`cmd //c echo $path`
26644   fi
26645 
26646 
26647   input_path="$new_path"
26648   # Check if we need to convert this using DOS-style short mode. If the path
26649   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26650   # take no chances and rewrite it.
26651   # Note: m4 eats our [], so we need to use [ and ] instead.
26652   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26653   if test "x$has_forbidden_chars" != x; then
26654     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26655     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26656   fi
26657 
26658 
26659   windows_path="$new_path"
26660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26661     unix_path=`$CYGPATH -u "$windows_path"`
26662     new_path="$unix_path"
26663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26665     new_path="$unix_path"
26666   fi
26667 
26668   if test "x$path" != "x$new_path"; then
26669     BOOT_JDK="$new_path"
26670     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26671 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26672   fi
26673 
26674   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26675   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26676 
26677     else
26678       # We're on a unix platform. Hooray! :)
26679       path="$BOOT_JDK"
26680       has_space=`$ECHO "$path" | $GREP " "`
26681       if test "x$has_space" != x; then
26682         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26683 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26684         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26685       fi
26686 
26687       # Use eval to expand a potential ~
26688       eval path="$path"
26689       if test ! -f "$path" && test ! -d "$path"; then
26690         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26691       fi
26692 
26693       if test -d "$path"; then
26694         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26695       else
26696         dir="`$DIRNAME "$path"`"
26697         base="`$BASENAME "$path"`"
26698         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26699       fi
26700     fi
26701   fi
26702 
26703             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26704 $as_echo_n "checking for Boot JDK... " >&6; }
26705             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26706 $as_echo "$BOOT_JDK" >&6; }
26707             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26708 $as_echo_n "checking Boot JDK version... " >&6; }
26709             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26710             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26711 $as_echo "$BOOT_JDK_VERSION" >&6; }
26712           fi # end check jdk version
26713         fi # end check javac
26714       fi # end check java
26715     fi # end check boot jdk found
26716   fi
26717 
26718     done
26719   fi
26720 
26721   fi
26722 
26723 
26724     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26725     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26726       # Do we have a bin/java?
26727       if test ! -x "$BOOT_JDK/bin/java"; then
26728         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26729 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26730         BOOT_JDK_FOUND=no
26731       else
26732         # Do we have a bin/javac?
26733         if test ! -x "$BOOT_JDK/bin/javac"; then
26734           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26735 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26736           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26737 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26738           BOOT_JDK_FOUND=no
26739         else
26740           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26741           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26742 
26743           # Extra M4 quote needed to protect [] in grep expression.
26744           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26745           if test "x$FOUND_CORRECT_VERSION" = x; then
26746             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26747 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26748             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26749 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26750             BOOT_JDK_FOUND=no
26751           else
26752             # We're done! :-)
26753             BOOT_JDK_FOUND=yes
26754 
26755   # Only process if variable expands to non-empty
26756 
26757   if test "x$BOOT_JDK" != x; then
26758     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26759 
26760   # Input might be given as Windows format, start by converting to
26761   # unix format.
26762   path="$BOOT_JDK"
26763   new_path=`$CYGPATH -u "$path"`
26764 
26765   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26766   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26767   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26768   # "foo.exe" is OK but "foo" is an error.
26769   #
26770   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26771   # It is also a way to make sure we got the proper file name for the real test later on.
26772   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26773   if test "x$test_shortpath" = x; then
26774     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26775 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26776     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26777   fi
26778 
26779   # Call helper function which possibly converts this using DOS-style short mode.
26780   # If so, the updated path is stored in $new_path.
26781 
26782   input_path="$new_path"
26783   # Check if we need to convert this using DOS-style short mode. If the path
26784   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26785   # take no chances and rewrite it.
26786   # Note: m4 eats our [], so we need to use [ and ] instead.
26787   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26788   if test "x$has_forbidden_chars" != x; then
26789     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26790     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26791     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26792     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26793       # Going to short mode and back again did indeed matter. Since short mode is
26794       # case insensitive, let's make it lowercase to improve readability.
26795       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26796       # Now convert it back to Unix-style (cygpath)
26797       input_path=`$CYGPATH -u "$shortmode_path"`
26798       new_path="$input_path"
26799     fi
26800   fi
26801 
26802   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26803   if test "x$test_cygdrive_prefix" = x; then
26804     # As a simple fix, exclude /usr/bin since it's not a real path.
26805     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26806       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26807       # a path prefixed by /cygdrive for fixpath to work.
26808       new_path="$CYGWIN_ROOT_PATH$input_path"
26809     fi
26810   fi
26811 
26812 
26813   if test "x$path" != "x$new_path"; then
26814     BOOT_JDK="$new_path"
26815     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26816 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26817   fi
26818 
26819     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26820 
26821   path="$BOOT_JDK"
26822   has_colon=`$ECHO $path | $GREP ^.:`
26823   new_path="$path"
26824   if test "x$has_colon" = x; then
26825     # Not in mixed or Windows style, start by that.
26826     new_path=`cmd //c echo $path`
26827   fi
26828 
26829 
26830   input_path="$new_path"
26831   # Check if we need to convert this using DOS-style short mode. If the path
26832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26833   # take no chances and rewrite it.
26834   # Note: m4 eats our [], so we need to use [ and ] instead.
26835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26836   if test "x$has_forbidden_chars" != x; then
26837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26838     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26839   fi
26840 
26841 
26842   windows_path="$new_path"
26843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26844     unix_path=`$CYGPATH -u "$windows_path"`
26845     new_path="$unix_path"
26846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26848     new_path="$unix_path"
26849   fi
26850 
26851   if test "x$path" != "x$new_path"; then
26852     BOOT_JDK="$new_path"
26853     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26854 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26855   fi
26856 
26857   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26858   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26859 
26860     else
26861       # We're on a unix platform. Hooray! :)
26862       path="$BOOT_JDK"
26863       has_space=`$ECHO "$path" | $GREP " "`
26864       if test "x$has_space" != x; then
26865         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26866 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26867         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26868       fi
26869 
26870       # Use eval to expand a potential ~
26871       eval path="$path"
26872       if test ! -f "$path" && test ! -d "$path"; then
26873         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26874       fi
26875 
26876       if test -d "$path"; then
26877         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26878       else
26879         dir="`$DIRNAME "$path"`"
26880         base="`$BASENAME "$path"`"
26881         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26882       fi
26883     fi
26884   fi
26885 
26886             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26887 $as_echo_n "checking for Boot JDK... " >&6; }
26888             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26889 $as_echo "$BOOT_JDK" >&6; }
26890             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26891 $as_echo_n "checking Boot JDK version... " >&6; }
26892             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26893             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26894 $as_echo "$BOOT_JDK_VERSION" >&6; }
26895           fi # end check jdk version
26896         fi # end check javac
26897       fi # end check java
26898     fi # end check boot jdk found
26899   fi
26900 
26901 
26902   if test "x$BOOT_JDK_FOUND" = xno; then
26903     # Now execute the test
26904 
26905   if test "x$PROGRAMFILES" != x; then
26906     VIRTUAL_DIR="$PROGRAMFILES/Java"
26907 
26908   windows_path="$VIRTUAL_DIR"
26909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26910     unix_path=`$CYGPATH -u "$windows_path"`
26911     VIRTUAL_DIR="$unix_path"
26912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26914     VIRTUAL_DIR="$unix_path"
26915   fi
26916 
26917 
26918   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26919   BOOT_JDK_SUFFIX=""
26920   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26921   if test "x$ALL_JDKS_FOUND" != x; then
26922     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26923 
26924   if test "x$BOOT_JDK_FOUND" = xno; then
26925     # Now execute the test
26926 
26927         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26928         if test -d "$BOOT_JDK"; then
26929           BOOT_JDK_FOUND=maybe
26930           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26931 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26932         fi
26933 
26934 
26935     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26936     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26937       # Do we have a bin/java?
26938       if test ! -x "$BOOT_JDK/bin/java"; then
26939         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26940 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26941         BOOT_JDK_FOUND=no
26942       else
26943         # Do we have a bin/javac?
26944         if test ! -x "$BOOT_JDK/bin/javac"; then
26945           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26946 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26947           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26948 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26949           BOOT_JDK_FOUND=no
26950         else
26951           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26952           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26953 
26954           # Extra M4 quote needed to protect [] in grep expression.
26955           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26956           if test "x$FOUND_CORRECT_VERSION" = x; then
26957             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26958 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26959             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26960 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26961             BOOT_JDK_FOUND=no
26962           else
26963             # We're done! :-)
26964             BOOT_JDK_FOUND=yes
26965 
26966   # Only process if variable expands to non-empty
26967 
26968   if test "x$BOOT_JDK" != x; then
26969     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26970 
26971   # Input might be given as Windows format, start by converting to
26972   # unix format.
26973   path="$BOOT_JDK"
26974   new_path=`$CYGPATH -u "$path"`
26975 
26976   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26977   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26978   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26979   # "foo.exe" is OK but "foo" is an error.
26980   #
26981   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26982   # It is also a way to make sure we got the proper file name for the real test later on.
26983   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26984   if test "x$test_shortpath" = x; then
26985     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26986 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26987     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26988   fi
26989 
26990   # Call helper function which possibly converts this using DOS-style short mode.
26991   # If so, the updated path is stored in $new_path.
26992 
26993   input_path="$new_path"
26994   # Check if we need to convert this using DOS-style short mode. If the path
26995   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26996   # take no chances and rewrite it.
26997   # Note: m4 eats our [], so we need to use [ and ] instead.
26998   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26999   if test "x$has_forbidden_chars" != x; then
27000     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27001     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27002     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27003     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27004       # Going to short mode and back again did indeed matter. Since short mode is
27005       # case insensitive, let's make it lowercase to improve readability.
27006       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27007       # Now convert it back to Unix-style (cygpath)
27008       input_path=`$CYGPATH -u "$shortmode_path"`
27009       new_path="$input_path"
27010     fi
27011   fi
27012 
27013   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27014   if test "x$test_cygdrive_prefix" = x; then
27015     # As a simple fix, exclude /usr/bin since it's not a real path.
27016     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27017       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27018       # a path prefixed by /cygdrive for fixpath to work.
27019       new_path="$CYGWIN_ROOT_PATH$input_path"
27020     fi
27021   fi
27022 
27023 
27024   if test "x$path" != "x$new_path"; then
27025     BOOT_JDK="$new_path"
27026     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27027 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27028   fi
27029 
27030     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27031 
27032   path="$BOOT_JDK"
27033   has_colon=`$ECHO $path | $GREP ^.:`
27034   new_path="$path"
27035   if test "x$has_colon" = x; then
27036     # Not in mixed or Windows style, start by that.
27037     new_path=`cmd //c echo $path`
27038   fi
27039 
27040 
27041   input_path="$new_path"
27042   # Check if we need to convert this using DOS-style short mode. If the path
27043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27044   # take no chances and rewrite it.
27045   # Note: m4 eats our [], so we need to use [ and ] instead.
27046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27047   if test "x$has_forbidden_chars" != x; then
27048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27049     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27050   fi
27051 
27052 
27053   windows_path="$new_path"
27054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27055     unix_path=`$CYGPATH -u "$windows_path"`
27056     new_path="$unix_path"
27057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27059     new_path="$unix_path"
27060   fi
27061 
27062   if test "x$path" != "x$new_path"; then
27063     BOOT_JDK="$new_path"
27064     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27065 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27066   fi
27067 
27068   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27069   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27070 
27071     else
27072       # We're on a unix platform. Hooray! :)
27073       path="$BOOT_JDK"
27074       has_space=`$ECHO "$path" | $GREP " "`
27075       if test "x$has_space" != x; then
27076         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27077 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27078         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27079       fi
27080 
27081       # Use eval to expand a potential ~
27082       eval path="$path"
27083       if test ! -f "$path" && test ! -d "$path"; then
27084         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27085       fi
27086 
27087       if test -d "$path"; then
27088         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27089       else
27090         dir="`$DIRNAME "$path"`"
27091         base="`$BASENAME "$path"`"
27092         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27093       fi
27094     fi
27095   fi
27096 
27097             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27098 $as_echo_n "checking for Boot JDK... " >&6; }
27099             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27100 $as_echo "$BOOT_JDK" >&6; }
27101             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27102 $as_echo_n "checking Boot JDK version... " >&6; }
27103             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27104             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27105 $as_echo "$BOOT_JDK_VERSION" >&6; }
27106           fi # end check jdk version
27107         fi # end check javac
27108       fi # end check java
27109     fi # end check boot jdk found
27110   fi
27111 
27112     done
27113   fi
27114 
27115   fi
27116 
27117 
27118     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27119     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27120       # Do we have a bin/java?
27121       if test ! -x "$BOOT_JDK/bin/java"; then
27122         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27123 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27124         BOOT_JDK_FOUND=no
27125       else
27126         # Do we have a bin/javac?
27127         if test ! -x "$BOOT_JDK/bin/javac"; then
27128           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27129 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27130           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27131 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27132           BOOT_JDK_FOUND=no
27133         else
27134           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27135           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27136 
27137           # Extra M4 quote needed to protect [] in grep expression.
27138           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27139           if test "x$FOUND_CORRECT_VERSION" = x; then
27140             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27141 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27142             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27143 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27144             BOOT_JDK_FOUND=no
27145           else
27146             # We're done! :-)
27147             BOOT_JDK_FOUND=yes
27148 
27149   # Only process if variable expands to non-empty
27150 
27151   if test "x$BOOT_JDK" != x; then
27152     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27153 
27154   # Input might be given as Windows format, start by converting to
27155   # unix format.
27156   path="$BOOT_JDK"
27157   new_path=`$CYGPATH -u "$path"`
27158 
27159   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27160   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27161   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27162   # "foo.exe" is OK but "foo" is an error.
27163   #
27164   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27165   # It is also a way to make sure we got the proper file name for the real test later on.
27166   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27167   if test "x$test_shortpath" = x; then
27168     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27169 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27170     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27171   fi
27172 
27173   # Call helper function which possibly converts this using DOS-style short mode.
27174   # If so, the updated path is stored in $new_path.
27175 
27176   input_path="$new_path"
27177   # Check if we need to convert this using DOS-style short mode. If the path
27178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27179   # take no chances and rewrite it.
27180   # Note: m4 eats our [], so we need to use [ and ] instead.
27181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27182   if test "x$has_forbidden_chars" != x; then
27183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27184     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27185     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27186     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27187       # Going to short mode and back again did indeed matter. Since short mode is
27188       # case insensitive, let's make it lowercase to improve readability.
27189       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27190       # Now convert it back to Unix-style (cygpath)
27191       input_path=`$CYGPATH -u "$shortmode_path"`
27192       new_path="$input_path"
27193     fi
27194   fi
27195 
27196   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27197   if test "x$test_cygdrive_prefix" = x; then
27198     # As a simple fix, exclude /usr/bin since it's not a real path.
27199     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27200       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27201       # a path prefixed by /cygdrive for fixpath to work.
27202       new_path="$CYGWIN_ROOT_PATH$input_path"
27203     fi
27204   fi
27205 
27206 
27207   if test "x$path" != "x$new_path"; then
27208     BOOT_JDK="$new_path"
27209     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27210 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27211   fi
27212 
27213     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27214 
27215   path="$BOOT_JDK"
27216   has_colon=`$ECHO $path | $GREP ^.:`
27217   new_path="$path"
27218   if test "x$has_colon" = x; then
27219     # Not in mixed or Windows style, start by that.
27220     new_path=`cmd //c echo $path`
27221   fi
27222 
27223 
27224   input_path="$new_path"
27225   # Check if we need to convert this using DOS-style short mode. If the path
27226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27227   # take no chances and rewrite it.
27228   # Note: m4 eats our [], so we need to use [ and ] instead.
27229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27230   if test "x$has_forbidden_chars" != x; then
27231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27232     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27233   fi
27234 
27235 
27236   windows_path="$new_path"
27237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27238     unix_path=`$CYGPATH -u "$windows_path"`
27239     new_path="$unix_path"
27240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27241     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27242     new_path="$unix_path"
27243   fi
27244 
27245   if test "x$path" != "x$new_path"; then
27246     BOOT_JDK="$new_path"
27247     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27248 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27249   fi
27250 
27251   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27252   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27253 
27254     else
27255       # We're on a unix platform. Hooray! :)
27256       path="$BOOT_JDK"
27257       has_space=`$ECHO "$path" | $GREP " "`
27258       if test "x$has_space" != x; then
27259         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27260 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27261         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27262       fi
27263 
27264       # Use eval to expand a potential ~
27265       eval path="$path"
27266       if test ! -f "$path" && test ! -d "$path"; then
27267         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27268       fi
27269 
27270       if test -d "$path"; then
27271         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27272       else
27273         dir="`$DIRNAME "$path"`"
27274         base="`$BASENAME "$path"`"
27275         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27276       fi
27277     fi
27278   fi
27279 
27280             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27281 $as_echo_n "checking for Boot JDK... " >&6; }
27282             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27283 $as_echo "$BOOT_JDK" >&6; }
27284             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27285 $as_echo_n "checking Boot JDK version... " >&6; }
27286             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27287             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27288 $as_echo "$BOOT_JDK_VERSION" >&6; }
27289           fi # end check jdk version
27290         fi # end check javac
27291       fi # end check java
27292     fi # end check boot jdk found
27293   fi
27294 
27295 
27296   if test "x$BOOT_JDK_FOUND" = xno; then
27297     # Now execute the test
27298 
27299   if test "x$ProgramFiles" != x; then
27300     VIRTUAL_DIR="$ProgramFiles/Java"
27301 
27302   windows_path="$VIRTUAL_DIR"
27303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27304     unix_path=`$CYGPATH -u "$windows_path"`
27305     VIRTUAL_DIR="$unix_path"
27306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27308     VIRTUAL_DIR="$unix_path"
27309   fi
27310 
27311 
27312   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27313   BOOT_JDK_SUFFIX=""
27314   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27315   if test "x$ALL_JDKS_FOUND" != x; then
27316     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27317 
27318   if test "x$BOOT_JDK_FOUND" = xno; then
27319     # Now execute the test
27320 
27321         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27322         if test -d "$BOOT_JDK"; then
27323           BOOT_JDK_FOUND=maybe
27324           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27325 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27326         fi
27327 
27328 
27329     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27330     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27331       # Do we have a bin/java?
27332       if test ! -x "$BOOT_JDK/bin/java"; then
27333         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27334 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27335         BOOT_JDK_FOUND=no
27336       else
27337         # Do we have a bin/javac?
27338         if test ! -x "$BOOT_JDK/bin/javac"; then
27339           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27340 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27341           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27342 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27343           BOOT_JDK_FOUND=no
27344         else
27345           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27346           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27347 
27348           # Extra M4 quote needed to protect [] in grep expression.
27349           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27350           if test "x$FOUND_CORRECT_VERSION" = x; then
27351             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27352 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27353             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27354 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27355             BOOT_JDK_FOUND=no
27356           else
27357             # We're done! :-)
27358             BOOT_JDK_FOUND=yes
27359 
27360   # Only process if variable expands to non-empty
27361 
27362   if test "x$BOOT_JDK" != x; then
27363     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27364 
27365   # Input might be given as Windows format, start by converting to
27366   # unix format.
27367   path="$BOOT_JDK"
27368   new_path=`$CYGPATH -u "$path"`
27369 
27370   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27371   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27372   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27373   # "foo.exe" is OK but "foo" is an error.
27374   #
27375   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27376   # It is also a way to make sure we got the proper file name for the real test later on.
27377   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27378   if test "x$test_shortpath" = x; then
27379     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27380 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27381     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27382   fi
27383 
27384   # Call helper function which possibly converts this using DOS-style short mode.
27385   # If so, the updated path is stored in $new_path.
27386 
27387   input_path="$new_path"
27388   # Check if we need to convert this using DOS-style short mode. If the path
27389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27390   # take no chances and rewrite it.
27391   # Note: m4 eats our [], so we need to use [ and ] instead.
27392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27393   if test "x$has_forbidden_chars" != x; then
27394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27395     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27396     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27397     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27398       # Going to short mode and back again did indeed matter. Since short mode is
27399       # case insensitive, let's make it lowercase to improve readability.
27400       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27401       # Now convert it back to Unix-style (cygpath)
27402       input_path=`$CYGPATH -u "$shortmode_path"`
27403       new_path="$input_path"
27404     fi
27405   fi
27406 
27407   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27408   if test "x$test_cygdrive_prefix" = x; then
27409     # As a simple fix, exclude /usr/bin since it's not a real path.
27410     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27411       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27412       # a path prefixed by /cygdrive for fixpath to work.
27413       new_path="$CYGWIN_ROOT_PATH$input_path"
27414     fi
27415   fi
27416 
27417 
27418   if test "x$path" != "x$new_path"; then
27419     BOOT_JDK="$new_path"
27420     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27421 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27422   fi
27423 
27424     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27425 
27426   path="$BOOT_JDK"
27427   has_colon=`$ECHO $path | $GREP ^.:`
27428   new_path="$path"
27429   if test "x$has_colon" = x; then
27430     # Not in mixed or Windows style, start by that.
27431     new_path=`cmd //c echo $path`
27432   fi
27433 
27434 
27435   input_path="$new_path"
27436   # Check if we need to convert this using DOS-style short mode. If the path
27437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27438   # take no chances and rewrite it.
27439   # Note: m4 eats our [], so we need to use [ and ] instead.
27440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27441   if test "x$has_forbidden_chars" != x; then
27442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27443     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27444   fi
27445 
27446 
27447   windows_path="$new_path"
27448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27449     unix_path=`$CYGPATH -u "$windows_path"`
27450     new_path="$unix_path"
27451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27453     new_path="$unix_path"
27454   fi
27455 
27456   if test "x$path" != "x$new_path"; then
27457     BOOT_JDK="$new_path"
27458     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27459 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27460   fi
27461 
27462   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27463   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27464 
27465     else
27466       # We're on a unix platform. Hooray! :)
27467       path="$BOOT_JDK"
27468       has_space=`$ECHO "$path" | $GREP " "`
27469       if test "x$has_space" != x; then
27470         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27471 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27472         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27473       fi
27474 
27475       # Use eval to expand a potential ~
27476       eval path="$path"
27477       if test ! -f "$path" && test ! -d "$path"; then
27478         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27479       fi
27480 
27481       if test -d "$path"; then
27482         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27483       else
27484         dir="`$DIRNAME "$path"`"
27485         base="`$BASENAME "$path"`"
27486         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27487       fi
27488     fi
27489   fi
27490 
27491             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27492 $as_echo_n "checking for Boot JDK... " >&6; }
27493             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27494 $as_echo "$BOOT_JDK" >&6; }
27495             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27496 $as_echo_n "checking Boot JDK version... " >&6; }
27497             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27498             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27499 $as_echo "$BOOT_JDK_VERSION" >&6; }
27500           fi # end check jdk version
27501         fi # end check javac
27502       fi # end check java
27503     fi # end check boot jdk found
27504   fi
27505 
27506     done
27507   fi
27508 
27509   fi
27510 
27511 
27512     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27513     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27514       # Do we have a bin/java?
27515       if test ! -x "$BOOT_JDK/bin/java"; then
27516         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27517 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27518         BOOT_JDK_FOUND=no
27519       else
27520         # Do we have a bin/javac?
27521         if test ! -x "$BOOT_JDK/bin/javac"; then
27522           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27523 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27524           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27525 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27526           BOOT_JDK_FOUND=no
27527         else
27528           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27529           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27530 
27531           # Extra M4 quote needed to protect [] in grep expression.
27532           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27533           if test "x$FOUND_CORRECT_VERSION" = x; then
27534             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27535 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27536             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27537 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27538             BOOT_JDK_FOUND=no
27539           else
27540             # We're done! :-)
27541             BOOT_JDK_FOUND=yes
27542 
27543   # Only process if variable expands to non-empty
27544 
27545   if test "x$BOOT_JDK" != x; then
27546     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27547 
27548   # Input might be given as Windows format, start by converting to
27549   # unix format.
27550   path="$BOOT_JDK"
27551   new_path=`$CYGPATH -u "$path"`
27552 
27553   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27554   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27555   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27556   # "foo.exe" is OK but "foo" is an error.
27557   #
27558   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27559   # It is also a way to make sure we got the proper file name for the real test later on.
27560   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27561   if test "x$test_shortpath" = x; then
27562     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27563 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27564     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27565   fi
27566 
27567   # Call helper function which possibly converts this using DOS-style short mode.
27568   # If so, the updated path is stored in $new_path.
27569 
27570   input_path="$new_path"
27571   # Check if we need to convert this using DOS-style short mode. If the path
27572   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27573   # take no chances and rewrite it.
27574   # Note: m4 eats our [], so we need to use [ and ] instead.
27575   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27576   if test "x$has_forbidden_chars" != x; then
27577     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27578     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27579     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27580     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27581       # Going to short mode and back again did indeed matter. Since short mode is
27582       # case insensitive, let's make it lowercase to improve readability.
27583       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27584       # Now convert it back to Unix-style (cygpath)
27585       input_path=`$CYGPATH -u "$shortmode_path"`
27586       new_path="$input_path"
27587     fi
27588   fi
27589 
27590   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27591   if test "x$test_cygdrive_prefix" = x; then
27592     # As a simple fix, exclude /usr/bin since it's not a real path.
27593     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27594       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27595       # a path prefixed by /cygdrive for fixpath to work.
27596       new_path="$CYGWIN_ROOT_PATH$input_path"
27597     fi
27598   fi
27599 
27600 
27601   if test "x$path" != "x$new_path"; then
27602     BOOT_JDK="$new_path"
27603     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27604 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27605   fi
27606 
27607     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27608 
27609   path="$BOOT_JDK"
27610   has_colon=`$ECHO $path | $GREP ^.:`
27611   new_path="$path"
27612   if test "x$has_colon" = x; then
27613     # Not in mixed or Windows style, start by that.
27614     new_path=`cmd //c echo $path`
27615   fi
27616 
27617 
27618   input_path="$new_path"
27619   # Check if we need to convert this using DOS-style short mode. If the path
27620   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27621   # take no chances and rewrite it.
27622   # Note: m4 eats our [], so we need to use [ and ] instead.
27623   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27624   if test "x$has_forbidden_chars" != x; then
27625     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27626     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27627   fi
27628 
27629 
27630   windows_path="$new_path"
27631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27632     unix_path=`$CYGPATH -u "$windows_path"`
27633     new_path="$unix_path"
27634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27635     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27636     new_path="$unix_path"
27637   fi
27638 
27639   if test "x$path" != "x$new_path"; then
27640     BOOT_JDK="$new_path"
27641     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27642 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27643   fi
27644 
27645   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27646   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27647 
27648     else
27649       # We're on a unix platform. Hooray! :)
27650       path="$BOOT_JDK"
27651       has_space=`$ECHO "$path" | $GREP " "`
27652       if test "x$has_space" != x; then
27653         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27654 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27655         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27656       fi
27657 
27658       # Use eval to expand a potential ~
27659       eval path="$path"
27660       if test ! -f "$path" && test ! -d "$path"; then
27661         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27662       fi
27663 
27664       if test -d "$path"; then
27665         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27666       else
27667         dir="`$DIRNAME "$path"`"
27668         base="`$BASENAME "$path"`"
27669         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27670       fi
27671     fi
27672   fi
27673 
27674             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27675 $as_echo_n "checking for Boot JDK... " >&6; }
27676             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27677 $as_echo "$BOOT_JDK" >&6; }
27678             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27679 $as_echo_n "checking Boot JDK version... " >&6; }
27680             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27681             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27682 $as_echo "$BOOT_JDK_VERSION" >&6; }
27683           fi # end check jdk version
27684         fi # end check javac
27685       fi # end check java
27686     fi # end check boot jdk found
27687   fi
27688 
27689 
27690   if test "x$BOOT_JDK_FOUND" = xno; then
27691     # Now execute the test
27692 
27693   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27694   BOOT_JDK_SUFFIX=""
27695   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27696   if test "x$ALL_JDKS_FOUND" != x; then
27697     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27698 
27699   if test "x$BOOT_JDK_FOUND" = xno; then
27700     # Now execute the test
27701 
27702         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27703         if test -d "$BOOT_JDK"; then
27704           BOOT_JDK_FOUND=maybe
27705           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27706 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27707         fi
27708 
27709 
27710     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27711     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27712       # Do we have a bin/java?
27713       if test ! -x "$BOOT_JDK/bin/java"; then
27714         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27715 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27716         BOOT_JDK_FOUND=no
27717       else
27718         # Do we have a bin/javac?
27719         if test ! -x "$BOOT_JDK/bin/javac"; then
27720           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27721 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27722           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27723 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27724           BOOT_JDK_FOUND=no
27725         else
27726           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27727           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27728 
27729           # Extra M4 quote needed to protect [] in grep expression.
27730           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27731           if test "x$FOUND_CORRECT_VERSION" = x; then
27732             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27733 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27734             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27735 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27736             BOOT_JDK_FOUND=no
27737           else
27738             # We're done! :-)
27739             BOOT_JDK_FOUND=yes
27740 
27741   # Only process if variable expands to non-empty
27742 
27743   if test "x$BOOT_JDK" != x; then
27744     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27745 
27746   # Input might be given as Windows format, start by converting to
27747   # unix format.
27748   path="$BOOT_JDK"
27749   new_path=`$CYGPATH -u "$path"`
27750 
27751   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27752   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27753   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27754   # "foo.exe" is OK but "foo" is an error.
27755   #
27756   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27757   # It is also a way to make sure we got the proper file name for the real test later on.
27758   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27759   if test "x$test_shortpath" = x; then
27760     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27761 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27762     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27763   fi
27764 
27765   # Call helper function which possibly converts this using DOS-style short mode.
27766   # If so, the updated path is stored in $new_path.
27767 
27768   input_path="$new_path"
27769   # Check if we need to convert this using DOS-style short mode. If the path
27770   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27771   # take no chances and rewrite it.
27772   # Note: m4 eats our [], so we need to use [ and ] instead.
27773   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27774   if test "x$has_forbidden_chars" != x; then
27775     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27776     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27777     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27778     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27779       # Going to short mode and back again did indeed matter. Since short mode is
27780       # case insensitive, let's make it lowercase to improve readability.
27781       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27782       # Now convert it back to Unix-style (cygpath)
27783       input_path=`$CYGPATH -u "$shortmode_path"`
27784       new_path="$input_path"
27785     fi
27786   fi
27787 
27788   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27789   if test "x$test_cygdrive_prefix" = x; then
27790     # As a simple fix, exclude /usr/bin since it's not a real path.
27791     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27792       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27793       # a path prefixed by /cygdrive for fixpath to work.
27794       new_path="$CYGWIN_ROOT_PATH$input_path"
27795     fi
27796   fi
27797 
27798 
27799   if test "x$path" != "x$new_path"; then
27800     BOOT_JDK="$new_path"
27801     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27802 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27803   fi
27804 
27805     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27806 
27807   path="$BOOT_JDK"
27808   has_colon=`$ECHO $path | $GREP ^.:`
27809   new_path="$path"
27810   if test "x$has_colon" = x; then
27811     # Not in mixed or Windows style, start by that.
27812     new_path=`cmd //c echo $path`
27813   fi
27814 
27815 
27816   input_path="$new_path"
27817   # Check if we need to convert this using DOS-style short mode. If the path
27818   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27819   # take no chances and rewrite it.
27820   # Note: m4 eats our [], so we need to use [ and ] instead.
27821   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27822   if test "x$has_forbidden_chars" != x; then
27823     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27824     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27825   fi
27826 
27827 
27828   windows_path="$new_path"
27829   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27830     unix_path=`$CYGPATH -u "$windows_path"`
27831     new_path="$unix_path"
27832   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27833     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27834     new_path="$unix_path"
27835   fi
27836 
27837   if test "x$path" != "x$new_path"; then
27838     BOOT_JDK="$new_path"
27839     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27840 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27841   fi
27842 
27843   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27844   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27845 
27846     else
27847       # We're on a unix platform. Hooray! :)
27848       path="$BOOT_JDK"
27849       has_space=`$ECHO "$path" | $GREP " "`
27850       if test "x$has_space" != x; then
27851         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27852 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27853         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27854       fi
27855 
27856       # Use eval to expand a potential ~
27857       eval path="$path"
27858       if test ! -f "$path" && test ! -d "$path"; then
27859         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27860       fi
27861 
27862       if test -d "$path"; then
27863         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27864       else
27865         dir="`$DIRNAME "$path"`"
27866         base="`$BASENAME "$path"`"
27867         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27868       fi
27869     fi
27870   fi
27871 
27872             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27873 $as_echo_n "checking for Boot JDK... " >&6; }
27874             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27875 $as_echo "$BOOT_JDK" >&6; }
27876             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27877 $as_echo_n "checking Boot JDK version... " >&6; }
27878             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27879             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27880 $as_echo "$BOOT_JDK_VERSION" >&6; }
27881           fi # end check jdk version
27882         fi # end check javac
27883       fi # end check java
27884     fi # end check boot jdk found
27885   fi
27886 
27887     done
27888   fi
27889 
27890 
27891     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27892     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27893       # Do we have a bin/java?
27894       if test ! -x "$BOOT_JDK/bin/java"; then
27895         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27896 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27897         BOOT_JDK_FOUND=no
27898       else
27899         # Do we have a bin/javac?
27900         if test ! -x "$BOOT_JDK/bin/javac"; then
27901           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27902 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27903           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27904 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27905           BOOT_JDK_FOUND=no
27906         else
27907           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27908           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27909 
27910           # Extra M4 quote needed to protect [] in grep expression.
27911           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27912           if test "x$FOUND_CORRECT_VERSION" = x; then
27913             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27914 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27915             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27916 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27917             BOOT_JDK_FOUND=no
27918           else
27919             # We're done! :-)
27920             BOOT_JDK_FOUND=yes
27921 
27922   # Only process if variable expands to non-empty
27923 
27924   if test "x$BOOT_JDK" != x; then
27925     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27926 
27927   # Input might be given as Windows format, start by converting to
27928   # unix format.
27929   path="$BOOT_JDK"
27930   new_path=`$CYGPATH -u "$path"`
27931 
27932   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27933   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27934   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27935   # "foo.exe" is OK but "foo" is an error.
27936   #
27937   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27938   # It is also a way to make sure we got the proper file name for the real test later on.
27939   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27940   if test "x$test_shortpath" = x; then
27941     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27942 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27943     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27944   fi
27945 
27946   # Call helper function which possibly converts this using DOS-style short mode.
27947   # If so, the updated path is stored in $new_path.
27948 
27949   input_path="$new_path"
27950   # Check if we need to convert this using DOS-style short mode. If the path
27951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27952   # take no chances and rewrite it.
27953   # Note: m4 eats our [], so we need to use [ and ] instead.
27954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27955   if test "x$has_forbidden_chars" != x; then
27956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27957     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27958     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27959     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27960       # Going to short mode and back again did indeed matter. Since short mode is
27961       # case insensitive, let's make it lowercase to improve readability.
27962       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27963       # Now convert it back to Unix-style (cygpath)
27964       input_path=`$CYGPATH -u "$shortmode_path"`
27965       new_path="$input_path"
27966     fi
27967   fi
27968 
27969   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27970   if test "x$test_cygdrive_prefix" = x; then
27971     # As a simple fix, exclude /usr/bin since it's not a real path.
27972     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27973       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27974       # a path prefixed by /cygdrive for fixpath to work.
27975       new_path="$CYGWIN_ROOT_PATH$input_path"
27976     fi
27977   fi
27978 
27979 
27980   if test "x$path" != "x$new_path"; then
27981     BOOT_JDK="$new_path"
27982     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27983 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27984   fi
27985 
27986     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27987 
27988   path="$BOOT_JDK"
27989   has_colon=`$ECHO $path | $GREP ^.:`
27990   new_path="$path"
27991   if test "x$has_colon" = x; then
27992     # Not in mixed or Windows style, start by that.
27993     new_path=`cmd //c echo $path`
27994   fi
27995 
27996 
27997   input_path="$new_path"
27998   # Check if we need to convert this using DOS-style short mode. If the path
27999   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28000   # take no chances and rewrite it.
28001   # Note: m4 eats our [], so we need to use [ and ] instead.
28002   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28003   if test "x$has_forbidden_chars" != x; then
28004     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28005     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28006   fi
28007 
28008 
28009   windows_path="$new_path"
28010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28011     unix_path=`$CYGPATH -u "$windows_path"`
28012     new_path="$unix_path"
28013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28015     new_path="$unix_path"
28016   fi
28017 
28018   if test "x$path" != "x$new_path"; then
28019     BOOT_JDK="$new_path"
28020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28021 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28022   fi
28023 
28024   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28025   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28026 
28027     else
28028       # We're on a unix platform. Hooray! :)
28029       path="$BOOT_JDK"
28030       has_space=`$ECHO "$path" | $GREP " "`
28031       if test "x$has_space" != x; then
28032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28033 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28034         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28035       fi
28036 
28037       # Use eval to expand a potential ~
28038       eval path="$path"
28039       if test ! -f "$path" && test ! -d "$path"; then
28040         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28041       fi
28042 
28043       if test -d "$path"; then
28044         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28045       else
28046         dir="`$DIRNAME "$path"`"
28047         base="`$BASENAME "$path"`"
28048         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28049       fi
28050     fi
28051   fi
28052 
28053             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28054 $as_echo_n "checking for Boot JDK... " >&6; }
28055             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28056 $as_echo "$BOOT_JDK" >&6; }
28057             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28058 $as_echo_n "checking Boot JDK version... " >&6; }
28059             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28060             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28061 $as_echo "$BOOT_JDK_VERSION" >&6; }
28062           fi # end check jdk version
28063         fi # end check javac
28064       fi # end check java
28065     fi # end check boot jdk found
28066   fi
28067 
28068   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28069 
28070   if test "x$BOOT_JDK_FOUND" = xno; then
28071     # Now execute the test
28072 
28073   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28074   BOOT_JDK_SUFFIX="/Contents/Home"
28075   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28076   if test "x$ALL_JDKS_FOUND" != x; then
28077     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28078 
28079   if test "x$BOOT_JDK_FOUND" = xno; then
28080     # Now execute the test
28081 
28082         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28083         if test -d "$BOOT_JDK"; then
28084           BOOT_JDK_FOUND=maybe
28085           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28086 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28087         fi
28088 
28089 
28090     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28091     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28092       # Do we have a bin/java?
28093       if test ! -x "$BOOT_JDK/bin/java"; then
28094         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28095 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28096         BOOT_JDK_FOUND=no
28097       else
28098         # Do we have a bin/javac?
28099         if test ! -x "$BOOT_JDK/bin/javac"; then
28100           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28101 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28102           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28103 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28104           BOOT_JDK_FOUND=no
28105         else
28106           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28107           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28108 
28109           # Extra M4 quote needed to protect [] in grep expression.
28110           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28111           if test "x$FOUND_CORRECT_VERSION" = x; then
28112             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28113 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28114             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28115 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28116             BOOT_JDK_FOUND=no
28117           else
28118             # We're done! :-)
28119             BOOT_JDK_FOUND=yes
28120 
28121   # Only process if variable expands to non-empty
28122 
28123   if test "x$BOOT_JDK" != x; then
28124     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28125 
28126   # Input might be given as Windows format, start by converting to
28127   # unix format.
28128   path="$BOOT_JDK"
28129   new_path=`$CYGPATH -u "$path"`
28130 
28131   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28132   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28133   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28134   # "foo.exe" is OK but "foo" is an error.
28135   #
28136   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28137   # It is also a way to make sure we got the proper file name for the real test later on.
28138   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28139   if test "x$test_shortpath" = x; then
28140     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28141 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28142     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28143   fi
28144 
28145   # Call helper function which possibly converts this using DOS-style short mode.
28146   # If so, the updated path is stored in $new_path.
28147 
28148   input_path="$new_path"
28149   # Check if we need to convert this using DOS-style short mode. If the path
28150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28151   # take no chances and rewrite it.
28152   # Note: m4 eats our [], so we need to use [ and ] instead.
28153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28154   if test "x$has_forbidden_chars" != x; then
28155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28156     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28157     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28158     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28159       # Going to short mode and back again did indeed matter. Since short mode is
28160       # case insensitive, let's make it lowercase to improve readability.
28161       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28162       # Now convert it back to Unix-style (cygpath)
28163       input_path=`$CYGPATH -u "$shortmode_path"`
28164       new_path="$input_path"
28165     fi
28166   fi
28167 
28168   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28169   if test "x$test_cygdrive_prefix" = x; then
28170     # As a simple fix, exclude /usr/bin since it's not a real path.
28171     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28172       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28173       # a path prefixed by /cygdrive for fixpath to work.
28174       new_path="$CYGWIN_ROOT_PATH$input_path"
28175     fi
28176   fi
28177 
28178 
28179   if test "x$path" != "x$new_path"; then
28180     BOOT_JDK="$new_path"
28181     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28182 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28183   fi
28184 
28185     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28186 
28187   path="$BOOT_JDK"
28188   has_colon=`$ECHO $path | $GREP ^.:`
28189   new_path="$path"
28190   if test "x$has_colon" = x; then
28191     # Not in mixed or Windows style, start by that.
28192     new_path=`cmd //c echo $path`
28193   fi
28194 
28195 
28196   input_path="$new_path"
28197   # Check if we need to convert this using DOS-style short mode. If the path
28198   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28199   # take no chances and rewrite it.
28200   # Note: m4 eats our [], so we need to use [ and ] instead.
28201   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28202   if test "x$has_forbidden_chars" != x; then
28203     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28204     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28205   fi
28206 
28207 
28208   windows_path="$new_path"
28209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28210     unix_path=`$CYGPATH -u "$windows_path"`
28211     new_path="$unix_path"
28212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28214     new_path="$unix_path"
28215   fi
28216 
28217   if test "x$path" != "x$new_path"; then
28218     BOOT_JDK="$new_path"
28219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28220 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28221   fi
28222 
28223   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28224   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28225 
28226     else
28227       # We're on a unix platform. Hooray! :)
28228       path="$BOOT_JDK"
28229       has_space=`$ECHO "$path" | $GREP " "`
28230       if test "x$has_space" != x; then
28231         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28232 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28233         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28234       fi
28235 
28236       # Use eval to expand a potential ~
28237       eval path="$path"
28238       if test ! -f "$path" && test ! -d "$path"; then
28239         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28240       fi
28241 
28242       if test -d "$path"; then
28243         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28244       else
28245         dir="`$DIRNAME "$path"`"
28246         base="`$BASENAME "$path"`"
28247         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28248       fi
28249     fi
28250   fi
28251 
28252             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28253 $as_echo_n "checking for Boot JDK... " >&6; }
28254             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28255 $as_echo "$BOOT_JDK" >&6; }
28256             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28257 $as_echo_n "checking Boot JDK version... " >&6; }
28258             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28259             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28260 $as_echo "$BOOT_JDK_VERSION" >&6; }
28261           fi # end check jdk version
28262         fi # end check javac
28263       fi # end check java
28264     fi # end check boot jdk found
28265   fi
28266 
28267     done
28268   fi
28269 
28270 
28271     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28272     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28273       # Do we have a bin/java?
28274       if test ! -x "$BOOT_JDK/bin/java"; then
28275         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28276 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28277         BOOT_JDK_FOUND=no
28278       else
28279         # Do we have a bin/javac?
28280         if test ! -x "$BOOT_JDK/bin/javac"; then
28281           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28282 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28283           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28284 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28285           BOOT_JDK_FOUND=no
28286         else
28287           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28288           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28289 
28290           # Extra M4 quote needed to protect [] in grep expression.
28291           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28292           if test "x$FOUND_CORRECT_VERSION" = x; then
28293             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28294 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28295             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28296 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28297             BOOT_JDK_FOUND=no
28298           else
28299             # We're done! :-)
28300             BOOT_JDK_FOUND=yes
28301 
28302   # Only process if variable expands to non-empty
28303 
28304   if test "x$BOOT_JDK" != x; then
28305     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28306 
28307   # Input might be given as Windows format, start by converting to
28308   # unix format.
28309   path="$BOOT_JDK"
28310   new_path=`$CYGPATH -u "$path"`
28311 
28312   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28313   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28314   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28315   # "foo.exe" is OK but "foo" is an error.
28316   #
28317   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28318   # It is also a way to make sure we got the proper file name for the real test later on.
28319   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28320   if test "x$test_shortpath" = x; then
28321     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28322 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28323     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28324   fi
28325 
28326   # Call helper function which possibly converts this using DOS-style short mode.
28327   # If so, the updated path is stored in $new_path.
28328 
28329   input_path="$new_path"
28330   # Check if we need to convert this using DOS-style short mode. If the path
28331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28332   # take no chances and rewrite it.
28333   # Note: m4 eats our [], so we need to use [ and ] instead.
28334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28335   if test "x$has_forbidden_chars" != x; then
28336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28337     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28338     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28339     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28340       # Going to short mode and back again did indeed matter. Since short mode is
28341       # case insensitive, let's make it lowercase to improve readability.
28342       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28343       # Now convert it back to Unix-style (cygpath)
28344       input_path=`$CYGPATH -u "$shortmode_path"`
28345       new_path="$input_path"
28346     fi
28347   fi
28348 
28349   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28350   if test "x$test_cygdrive_prefix" = x; then
28351     # As a simple fix, exclude /usr/bin since it's not a real path.
28352     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28353       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28354       # a path prefixed by /cygdrive for fixpath to work.
28355       new_path="$CYGWIN_ROOT_PATH$input_path"
28356     fi
28357   fi
28358 
28359 
28360   if test "x$path" != "x$new_path"; then
28361     BOOT_JDK="$new_path"
28362     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28363 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28364   fi
28365 
28366     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28367 
28368   path="$BOOT_JDK"
28369   has_colon=`$ECHO $path | $GREP ^.:`
28370   new_path="$path"
28371   if test "x$has_colon" = x; then
28372     # Not in mixed or Windows style, start by that.
28373     new_path=`cmd //c echo $path`
28374   fi
28375 
28376 
28377   input_path="$new_path"
28378   # Check if we need to convert this using DOS-style short mode. If the path
28379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28380   # take no chances and rewrite it.
28381   # Note: m4 eats our [], so we need to use [ and ] instead.
28382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28383   if test "x$has_forbidden_chars" != x; then
28384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28385     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28386   fi
28387 
28388 
28389   windows_path="$new_path"
28390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28391     unix_path=`$CYGPATH -u "$windows_path"`
28392     new_path="$unix_path"
28393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28395     new_path="$unix_path"
28396   fi
28397 
28398   if test "x$path" != "x$new_path"; then
28399     BOOT_JDK="$new_path"
28400     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28401 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28402   fi
28403 
28404   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28405   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28406 
28407     else
28408       # We're on a unix platform. Hooray! :)
28409       path="$BOOT_JDK"
28410       has_space=`$ECHO "$path" | $GREP " "`
28411       if test "x$has_space" != x; then
28412         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28413 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28414         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28415       fi
28416 
28417       # Use eval to expand a potential ~
28418       eval path="$path"
28419       if test ! -f "$path" && test ! -d "$path"; then
28420         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28421       fi
28422 
28423       if test -d "$path"; then
28424         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28425       else
28426         dir="`$DIRNAME "$path"`"
28427         base="`$BASENAME "$path"`"
28428         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28429       fi
28430     fi
28431   fi
28432 
28433             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28434 $as_echo_n "checking for Boot JDK... " >&6; }
28435             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28436 $as_echo "$BOOT_JDK" >&6; }
28437             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28438 $as_echo_n "checking Boot JDK version... " >&6; }
28439             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28440             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28441 $as_echo "$BOOT_JDK_VERSION" >&6; }
28442           fi # end check jdk version
28443         fi # end check javac
28444       fi # end check java
28445     fi # end check boot jdk found
28446   fi
28447 
28448 
28449   if test "x$BOOT_JDK_FOUND" = xno; then
28450     # Now execute the test
28451 
28452   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28453   BOOT_JDK_SUFFIX="/Contents/Home"
28454   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28455   if test "x$ALL_JDKS_FOUND" != x; then
28456     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28457 
28458   if test "x$BOOT_JDK_FOUND" = xno; then
28459     # Now execute the test
28460 
28461         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28462         if test -d "$BOOT_JDK"; then
28463           BOOT_JDK_FOUND=maybe
28464           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28465 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28466         fi
28467 
28468 
28469     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28470     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28471       # Do we have a bin/java?
28472       if test ! -x "$BOOT_JDK/bin/java"; then
28473         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28474 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28475         BOOT_JDK_FOUND=no
28476       else
28477         # Do we have a bin/javac?
28478         if test ! -x "$BOOT_JDK/bin/javac"; then
28479           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28480 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28481           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28482 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28483           BOOT_JDK_FOUND=no
28484         else
28485           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28486           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28487 
28488           # Extra M4 quote needed to protect [] in grep expression.
28489           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28490           if test "x$FOUND_CORRECT_VERSION" = x; then
28491             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28492 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28493             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28494 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28495             BOOT_JDK_FOUND=no
28496           else
28497             # We're done! :-)
28498             BOOT_JDK_FOUND=yes
28499 
28500   # Only process if variable expands to non-empty
28501 
28502   if test "x$BOOT_JDK" != x; then
28503     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28504 
28505   # Input might be given as Windows format, start by converting to
28506   # unix format.
28507   path="$BOOT_JDK"
28508   new_path=`$CYGPATH -u "$path"`
28509 
28510   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28511   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28512   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28513   # "foo.exe" is OK but "foo" is an error.
28514   #
28515   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28516   # It is also a way to make sure we got the proper file name for the real test later on.
28517   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28518   if test "x$test_shortpath" = x; then
28519     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28520 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28521     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28522   fi
28523 
28524   # Call helper function which possibly converts this using DOS-style short mode.
28525   # If so, the updated path is stored in $new_path.
28526 
28527   input_path="$new_path"
28528   # Check if we need to convert this using DOS-style short mode. If the path
28529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28530   # take no chances and rewrite it.
28531   # Note: m4 eats our [], so we need to use [ and ] instead.
28532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28533   if test "x$has_forbidden_chars" != x; then
28534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28535     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28536     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28537     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28538       # Going to short mode and back again did indeed matter. Since short mode is
28539       # case insensitive, let's make it lowercase to improve readability.
28540       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28541       # Now convert it back to Unix-style (cygpath)
28542       input_path=`$CYGPATH -u "$shortmode_path"`
28543       new_path="$input_path"
28544     fi
28545   fi
28546 
28547   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28548   if test "x$test_cygdrive_prefix" = x; then
28549     # As a simple fix, exclude /usr/bin since it's not a real path.
28550     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28551       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28552       # a path prefixed by /cygdrive for fixpath to work.
28553       new_path="$CYGWIN_ROOT_PATH$input_path"
28554     fi
28555   fi
28556 
28557 
28558   if test "x$path" != "x$new_path"; then
28559     BOOT_JDK="$new_path"
28560     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28561 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28562   fi
28563 
28564     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28565 
28566   path="$BOOT_JDK"
28567   has_colon=`$ECHO $path | $GREP ^.:`
28568   new_path="$path"
28569   if test "x$has_colon" = x; then
28570     # Not in mixed or Windows style, start by that.
28571     new_path=`cmd //c echo $path`
28572   fi
28573 
28574 
28575   input_path="$new_path"
28576   # Check if we need to convert this using DOS-style short mode. If the path
28577   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28578   # take no chances and rewrite it.
28579   # Note: m4 eats our [], so we need to use [ and ] instead.
28580   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28581   if test "x$has_forbidden_chars" != x; then
28582     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28583     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28584   fi
28585 
28586 
28587   windows_path="$new_path"
28588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28589     unix_path=`$CYGPATH -u "$windows_path"`
28590     new_path="$unix_path"
28591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28592     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28593     new_path="$unix_path"
28594   fi
28595 
28596   if test "x$path" != "x$new_path"; then
28597     BOOT_JDK="$new_path"
28598     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28599 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28600   fi
28601 
28602   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28603   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28604 
28605     else
28606       # We're on a unix platform. Hooray! :)
28607       path="$BOOT_JDK"
28608       has_space=`$ECHO "$path" | $GREP " "`
28609       if test "x$has_space" != x; then
28610         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28611 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28612         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28613       fi
28614 
28615       # Use eval to expand a potential ~
28616       eval path="$path"
28617       if test ! -f "$path" && test ! -d "$path"; then
28618         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28619       fi
28620 
28621       if test -d "$path"; then
28622         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28623       else
28624         dir="`$DIRNAME "$path"`"
28625         base="`$BASENAME "$path"`"
28626         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28627       fi
28628     fi
28629   fi
28630 
28631             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28632 $as_echo_n "checking for Boot JDK... " >&6; }
28633             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28634 $as_echo "$BOOT_JDK" >&6; }
28635             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28636 $as_echo_n "checking Boot JDK version... " >&6; }
28637             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28638             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28639 $as_echo "$BOOT_JDK_VERSION" >&6; }
28640           fi # end check jdk version
28641         fi # end check javac
28642       fi # end check java
28643     fi # end check boot jdk found
28644   fi
28645 
28646     done
28647   fi
28648 
28649 
28650     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28651     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28652       # Do we have a bin/java?
28653       if test ! -x "$BOOT_JDK/bin/java"; then
28654         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28655 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28656         BOOT_JDK_FOUND=no
28657       else
28658         # Do we have a bin/javac?
28659         if test ! -x "$BOOT_JDK/bin/javac"; then
28660           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28661 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28662           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28663 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28664           BOOT_JDK_FOUND=no
28665         else
28666           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28667           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28668 
28669           # Extra M4 quote needed to protect [] in grep expression.
28670           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28671           if test "x$FOUND_CORRECT_VERSION" = x; then
28672             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28673 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28674             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28675 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28676             BOOT_JDK_FOUND=no
28677           else
28678             # We're done! :-)
28679             BOOT_JDK_FOUND=yes
28680 
28681   # Only process if variable expands to non-empty
28682 
28683   if test "x$BOOT_JDK" != x; then
28684     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28685 
28686   # Input might be given as Windows format, start by converting to
28687   # unix format.
28688   path="$BOOT_JDK"
28689   new_path=`$CYGPATH -u "$path"`
28690 
28691   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28692   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28693   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28694   # "foo.exe" is OK but "foo" is an error.
28695   #
28696   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28697   # It is also a way to make sure we got the proper file name for the real test later on.
28698   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28699   if test "x$test_shortpath" = x; then
28700     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28701 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28702     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28703   fi
28704 
28705   # Call helper function which possibly converts this using DOS-style short mode.
28706   # If so, the updated path is stored in $new_path.
28707 
28708   input_path="$new_path"
28709   # Check if we need to convert this using DOS-style short mode. If the path
28710   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28711   # take no chances and rewrite it.
28712   # Note: m4 eats our [], so we need to use [ and ] instead.
28713   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28714   if test "x$has_forbidden_chars" != x; then
28715     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28716     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28717     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28718     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28719       # Going to short mode and back again did indeed matter. Since short mode is
28720       # case insensitive, let's make it lowercase to improve readability.
28721       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28722       # Now convert it back to Unix-style (cygpath)
28723       input_path=`$CYGPATH -u "$shortmode_path"`
28724       new_path="$input_path"
28725     fi
28726   fi
28727 
28728   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28729   if test "x$test_cygdrive_prefix" = x; then
28730     # As a simple fix, exclude /usr/bin since it's not a real path.
28731     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28732       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28733       # a path prefixed by /cygdrive for fixpath to work.
28734       new_path="$CYGWIN_ROOT_PATH$input_path"
28735     fi
28736   fi
28737 
28738 
28739   if test "x$path" != "x$new_path"; then
28740     BOOT_JDK="$new_path"
28741     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28742 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28743   fi
28744 
28745     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28746 
28747   path="$BOOT_JDK"
28748   has_colon=`$ECHO $path | $GREP ^.:`
28749   new_path="$path"
28750   if test "x$has_colon" = x; then
28751     # Not in mixed or Windows style, start by that.
28752     new_path=`cmd //c echo $path`
28753   fi
28754 
28755 
28756   input_path="$new_path"
28757   # Check if we need to convert this using DOS-style short mode. If the path
28758   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28759   # take no chances and rewrite it.
28760   # Note: m4 eats our [], so we need to use [ and ] instead.
28761   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28762   if test "x$has_forbidden_chars" != x; then
28763     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28764     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28765   fi
28766 
28767 
28768   windows_path="$new_path"
28769   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28770     unix_path=`$CYGPATH -u "$windows_path"`
28771     new_path="$unix_path"
28772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28773     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28774     new_path="$unix_path"
28775   fi
28776 
28777   if test "x$path" != "x$new_path"; then
28778     BOOT_JDK="$new_path"
28779     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28780 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28781   fi
28782 
28783   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28784   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28785 
28786     else
28787       # We're on a unix platform. Hooray! :)
28788       path="$BOOT_JDK"
28789       has_space=`$ECHO "$path" | $GREP " "`
28790       if test "x$has_space" != x; then
28791         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28792 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28793         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28794       fi
28795 
28796       # Use eval to expand a potential ~
28797       eval path="$path"
28798       if test ! -f "$path" && test ! -d "$path"; then
28799         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28800       fi
28801 
28802       if test -d "$path"; then
28803         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28804       else
28805         dir="`$DIRNAME "$path"`"
28806         base="`$BASENAME "$path"`"
28807         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28808       fi
28809     fi
28810   fi
28811 
28812             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28813 $as_echo_n "checking for Boot JDK... " >&6; }
28814             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28815 $as_echo "$BOOT_JDK" >&6; }
28816             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28817 $as_echo_n "checking Boot JDK version... " >&6; }
28818             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28819             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28820 $as_echo "$BOOT_JDK_VERSION" >&6; }
28821           fi # end check jdk version
28822         fi # end check javac
28823       fi # end check java
28824     fi # end check boot jdk found
28825   fi
28826 
28827   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28828 
28829   if test "x$BOOT_JDK_FOUND" = xno; then
28830     # Now execute the test
28831 
28832   BOOT_JDK_PREFIX="/usr/lib/jvm"
28833   BOOT_JDK_SUFFIX=""
28834   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28835   if test "x$ALL_JDKS_FOUND" != x; then
28836     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28837 
28838   if test "x$BOOT_JDK_FOUND" = xno; then
28839     # Now execute the test
28840 
28841         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28842         if test -d "$BOOT_JDK"; then
28843           BOOT_JDK_FOUND=maybe
28844           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28845 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28846         fi
28847 
28848 
28849     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28850     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28851       # Do we have a bin/java?
28852       if test ! -x "$BOOT_JDK/bin/java"; then
28853         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28854 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28855         BOOT_JDK_FOUND=no
28856       else
28857         # Do we have a bin/javac?
28858         if test ! -x "$BOOT_JDK/bin/javac"; then
28859           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28860 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28861           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28862 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28863           BOOT_JDK_FOUND=no
28864         else
28865           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28866           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28867 
28868           # Extra M4 quote needed to protect [] in grep expression.
28869           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28870           if test "x$FOUND_CORRECT_VERSION" = x; then
28871             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28872 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28873             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28874 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28875             BOOT_JDK_FOUND=no
28876           else
28877             # We're done! :-)
28878             BOOT_JDK_FOUND=yes
28879 
28880   # Only process if variable expands to non-empty
28881 
28882   if test "x$BOOT_JDK" != x; then
28883     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28884 
28885   # Input might be given as Windows format, start by converting to
28886   # unix format.
28887   path="$BOOT_JDK"
28888   new_path=`$CYGPATH -u "$path"`
28889 
28890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28893   # "foo.exe" is OK but "foo" is an error.
28894   #
28895   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28896   # It is also a way to make sure we got the proper file name for the real test later on.
28897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28898   if test "x$test_shortpath" = x; then
28899     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28900 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28901     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28902   fi
28903 
28904   # Call helper function which possibly converts this using DOS-style short mode.
28905   # If so, the updated path is stored in $new_path.
28906 
28907   input_path="$new_path"
28908   # Check if we need to convert this using DOS-style short mode. If the path
28909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28910   # take no chances and rewrite it.
28911   # Note: m4 eats our [], so we need to use [ and ] instead.
28912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28913   if test "x$has_forbidden_chars" != x; then
28914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28915     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28916     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28917     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28918       # Going to short mode and back again did indeed matter. Since short mode is
28919       # case insensitive, let's make it lowercase to improve readability.
28920       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28921       # Now convert it back to Unix-style (cygpath)
28922       input_path=`$CYGPATH -u "$shortmode_path"`
28923       new_path="$input_path"
28924     fi
28925   fi
28926 
28927   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28928   if test "x$test_cygdrive_prefix" = x; then
28929     # As a simple fix, exclude /usr/bin since it's not a real path.
28930     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28931       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28932       # a path prefixed by /cygdrive for fixpath to work.
28933       new_path="$CYGWIN_ROOT_PATH$input_path"
28934     fi
28935   fi
28936 
28937 
28938   if test "x$path" != "x$new_path"; then
28939     BOOT_JDK="$new_path"
28940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28942   fi
28943 
28944     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28945 
28946   path="$BOOT_JDK"
28947   has_colon=`$ECHO $path | $GREP ^.:`
28948   new_path="$path"
28949   if test "x$has_colon" = x; then
28950     # Not in mixed or Windows style, start by that.
28951     new_path=`cmd //c echo $path`
28952   fi
28953 
28954 
28955   input_path="$new_path"
28956   # Check if we need to convert this using DOS-style short mode. If the path
28957   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28958   # take no chances and rewrite it.
28959   # Note: m4 eats our [], so we need to use [ and ] instead.
28960   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28961   if test "x$has_forbidden_chars" != x; then
28962     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28963     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28964   fi
28965 
28966 
28967   windows_path="$new_path"
28968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28969     unix_path=`$CYGPATH -u "$windows_path"`
28970     new_path="$unix_path"
28971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28973     new_path="$unix_path"
28974   fi
28975 
28976   if test "x$path" != "x$new_path"; then
28977     BOOT_JDK="$new_path"
28978     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28979 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28980   fi
28981 
28982   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28983   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28984 
28985     else
28986       # We're on a unix platform. Hooray! :)
28987       path="$BOOT_JDK"
28988       has_space=`$ECHO "$path" | $GREP " "`
28989       if test "x$has_space" != x; then
28990         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28991 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28992         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28993       fi
28994 
28995       # Use eval to expand a potential ~
28996       eval path="$path"
28997       if test ! -f "$path" && test ! -d "$path"; then
28998         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28999       fi
29000 
29001       if test -d "$path"; then
29002         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29003       else
29004         dir="`$DIRNAME "$path"`"
29005         base="`$BASENAME "$path"`"
29006         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29007       fi
29008     fi
29009   fi
29010 
29011             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29012 $as_echo_n "checking for Boot JDK... " >&6; }
29013             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29014 $as_echo "$BOOT_JDK" >&6; }
29015             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29016 $as_echo_n "checking Boot JDK version... " >&6; }
29017             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29018             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29019 $as_echo "$BOOT_JDK_VERSION" >&6; }
29020           fi # end check jdk version
29021         fi # end check javac
29022       fi # end check java
29023     fi # end check boot jdk found
29024   fi
29025 
29026     done
29027   fi
29028 
29029 
29030     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29031     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29032       # Do we have a bin/java?
29033       if test ! -x "$BOOT_JDK/bin/java"; then
29034         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29035 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29036         BOOT_JDK_FOUND=no
29037       else
29038         # Do we have a bin/javac?
29039         if test ! -x "$BOOT_JDK/bin/javac"; then
29040           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29041 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29042           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29043 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29044           BOOT_JDK_FOUND=no
29045         else
29046           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29047           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29048 
29049           # Extra M4 quote needed to protect [] in grep expression.
29050           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29051           if test "x$FOUND_CORRECT_VERSION" = x; then
29052             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29053 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29054             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29055 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29056             BOOT_JDK_FOUND=no
29057           else
29058             # We're done! :-)
29059             BOOT_JDK_FOUND=yes
29060 
29061   # Only process if variable expands to non-empty
29062 
29063   if test "x$BOOT_JDK" != x; then
29064     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29065 
29066   # Input might be given as Windows format, start by converting to
29067   # unix format.
29068   path="$BOOT_JDK"
29069   new_path=`$CYGPATH -u "$path"`
29070 
29071   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29072   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29073   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29074   # "foo.exe" is OK but "foo" is an error.
29075   #
29076   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29077   # It is also a way to make sure we got the proper file name for the real test later on.
29078   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29079   if test "x$test_shortpath" = x; then
29080     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29081 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29082     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29083   fi
29084 
29085   # Call helper function which possibly converts this using DOS-style short mode.
29086   # If so, the updated path is stored in $new_path.
29087 
29088   input_path="$new_path"
29089   # Check if we need to convert this using DOS-style short mode. If the path
29090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29091   # take no chances and rewrite it.
29092   # Note: m4 eats our [], so we need to use [ and ] instead.
29093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29094   if test "x$has_forbidden_chars" != x; then
29095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29096     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29097     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29098     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29099       # Going to short mode and back again did indeed matter. Since short mode is
29100       # case insensitive, let's make it lowercase to improve readability.
29101       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29102       # Now convert it back to Unix-style (cygpath)
29103       input_path=`$CYGPATH -u "$shortmode_path"`
29104       new_path="$input_path"
29105     fi
29106   fi
29107 
29108   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29109   if test "x$test_cygdrive_prefix" = x; then
29110     # As a simple fix, exclude /usr/bin since it's not a real path.
29111     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29112       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29113       # a path prefixed by /cygdrive for fixpath to work.
29114       new_path="$CYGWIN_ROOT_PATH$input_path"
29115     fi
29116   fi
29117 
29118 
29119   if test "x$path" != "x$new_path"; then
29120     BOOT_JDK="$new_path"
29121     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29122 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29123   fi
29124 
29125     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29126 
29127   path="$BOOT_JDK"
29128   has_colon=`$ECHO $path | $GREP ^.:`
29129   new_path="$path"
29130   if test "x$has_colon" = x; then
29131     # Not in mixed or Windows style, start by that.
29132     new_path=`cmd //c echo $path`
29133   fi
29134 
29135 
29136   input_path="$new_path"
29137   # Check if we need to convert this using DOS-style short mode. If the path
29138   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29139   # take no chances and rewrite it.
29140   # Note: m4 eats our [], so we need to use [ and ] instead.
29141   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29142   if test "x$has_forbidden_chars" != x; then
29143     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29144     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29145   fi
29146 
29147 
29148   windows_path="$new_path"
29149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29150     unix_path=`$CYGPATH -u "$windows_path"`
29151     new_path="$unix_path"
29152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29154     new_path="$unix_path"
29155   fi
29156 
29157   if test "x$path" != "x$new_path"; then
29158     BOOT_JDK="$new_path"
29159     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29160 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29161   fi
29162 
29163   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29164   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29165 
29166     else
29167       # We're on a unix platform. Hooray! :)
29168       path="$BOOT_JDK"
29169       has_space=`$ECHO "$path" | $GREP " "`
29170       if test "x$has_space" != x; then
29171         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29172 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29173         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29174       fi
29175 
29176       # Use eval to expand a potential ~
29177       eval path="$path"
29178       if test ! -f "$path" && test ! -d "$path"; then
29179         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29180       fi
29181 
29182       if test -d "$path"; then
29183         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29184       else
29185         dir="`$DIRNAME "$path"`"
29186         base="`$BASENAME "$path"`"
29187         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29188       fi
29189     fi
29190   fi
29191 
29192             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29193 $as_echo_n "checking for Boot JDK... " >&6; }
29194             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29195 $as_echo "$BOOT_JDK" >&6; }
29196             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29197 $as_echo_n "checking Boot JDK version... " >&6; }
29198             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29199             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29200 $as_echo "$BOOT_JDK_VERSION" >&6; }
29201           fi # end check jdk version
29202         fi # end check javac
29203       fi # end check java
29204     fi # end check boot jdk found
29205   fi
29206 
29207   fi
29208 
29209 
29210     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29211     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29212       # Do we have a bin/java?
29213       if test ! -x "$BOOT_JDK/bin/java"; then
29214         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29215 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29216         BOOT_JDK_FOUND=no
29217       else
29218         # Do we have a bin/javac?
29219         if test ! -x "$BOOT_JDK/bin/javac"; then
29220           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29221 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29222           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29223 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29224           BOOT_JDK_FOUND=no
29225         else
29226           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29227           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29228 
29229           # Extra M4 quote needed to protect [] in grep expression.
29230           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29231           if test "x$FOUND_CORRECT_VERSION" = x; then
29232             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29233 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29234             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29235 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29236             BOOT_JDK_FOUND=no
29237           else
29238             # We're done! :-)
29239             BOOT_JDK_FOUND=yes
29240 
29241   # Only process if variable expands to non-empty
29242 
29243   if test "x$BOOT_JDK" != x; then
29244     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29245 
29246   # Input might be given as Windows format, start by converting to
29247   # unix format.
29248   path="$BOOT_JDK"
29249   new_path=`$CYGPATH -u "$path"`
29250 
29251   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29252   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29253   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29254   # "foo.exe" is OK but "foo" is an error.
29255   #
29256   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29257   # It is also a way to make sure we got the proper file name for the real test later on.
29258   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29259   if test "x$test_shortpath" = x; then
29260     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29261 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29262     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29263   fi
29264 
29265   # Call helper function which possibly converts this using DOS-style short mode.
29266   # If so, the updated path is stored in $new_path.
29267 
29268   input_path="$new_path"
29269   # Check if we need to convert this using DOS-style short mode. If the path
29270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29271   # take no chances and rewrite it.
29272   # Note: m4 eats our [], so we need to use [ and ] instead.
29273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29274   if test "x$has_forbidden_chars" != x; then
29275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29276     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29277     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29278     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29279       # Going to short mode and back again did indeed matter. Since short mode is
29280       # case insensitive, let's make it lowercase to improve readability.
29281       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29282       # Now convert it back to Unix-style (cygpath)
29283       input_path=`$CYGPATH -u "$shortmode_path"`
29284       new_path="$input_path"
29285     fi
29286   fi
29287 
29288   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29289   if test "x$test_cygdrive_prefix" = x; then
29290     # As a simple fix, exclude /usr/bin since it's not a real path.
29291     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29292       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29293       # a path prefixed by /cygdrive for fixpath to work.
29294       new_path="$CYGWIN_ROOT_PATH$input_path"
29295     fi
29296   fi
29297 
29298 
29299   if test "x$path" != "x$new_path"; then
29300     BOOT_JDK="$new_path"
29301     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29302 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29303   fi
29304 
29305     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29306 
29307   path="$BOOT_JDK"
29308   has_colon=`$ECHO $path | $GREP ^.:`
29309   new_path="$path"
29310   if test "x$has_colon" = x; then
29311     # Not in mixed or Windows style, start by that.
29312     new_path=`cmd //c echo $path`
29313   fi
29314 
29315 
29316   input_path="$new_path"
29317   # Check if we need to convert this using DOS-style short mode. If the path
29318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29319   # take no chances and rewrite it.
29320   # Note: m4 eats our [], so we need to use [ and ] instead.
29321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29322   if test "x$has_forbidden_chars" != x; then
29323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29324     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29325   fi
29326 
29327 
29328   windows_path="$new_path"
29329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29330     unix_path=`$CYGPATH -u "$windows_path"`
29331     new_path="$unix_path"
29332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29334     new_path="$unix_path"
29335   fi
29336 
29337   if test "x$path" != "x$new_path"; then
29338     BOOT_JDK="$new_path"
29339     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29340 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29341   fi
29342 
29343   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29344   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29345 
29346     else
29347       # We're on a unix platform. Hooray! :)
29348       path="$BOOT_JDK"
29349       has_space=`$ECHO "$path" | $GREP " "`
29350       if test "x$has_space" != x; then
29351         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29352 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29353         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29354       fi
29355 
29356       # Use eval to expand a potential ~
29357       eval path="$path"
29358       if test ! -f "$path" && test ! -d "$path"; then
29359         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29360       fi
29361 
29362       if test -d "$path"; then
29363         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29364       else
29365         dir="`$DIRNAME "$path"`"
29366         base="`$BASENAME "$path"`"
29367         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29368       fi
29369     fi
29370   fi
29371 
29372             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29373 $as_echo_n "checking for Boot JDK... " >&6; }
29374             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29375 $as_echo "$BOOT_JDK" >&6; }
29376             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29377 $as_echo_n "checking Boot JDK version... " >&6; }
29378             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29379             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29380 $as_echo "$BOOT_JDK_VERSION" >&6; }
29381           fi # end check jdk version
29382         fi # end check javac
29383       fi # end check java
29384     fi # end check boot jdk found
29385   fi
29386 
29387 
29388   # If we haven't found anything yet, we've truly lost. Give up.
29389   if test "x$BOOT_JDK_FOUND" = xno; then
29390 
29391   # Print a helpful message on how to acquire the necessary build dependency.
29392   # openjdk is the help tag: freetype, cups, alsa etc
29393   MISSING_DEPENDENCY=openjdk
29394 
29395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29396     cygwin_help $MISSING_DEPENDENCY
29397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29398     msys_help $MISSING_DEPENDENCY
29399   else
29400     PKGHANDLER_COMMAND=
29401 
29402     case $PKGHANDLER in
29403       apt-get)
29404         apt_help     $MISSING_DEPENDENCY ;;
29405       yum)
29406         yum_help     $MISSING_DEPENDENCY ;;
29407       port)
29408         port_help    $MISSING_DEPENDENCY ;;
29409       pkgutil)
29410         pkgutil_help $MISSING_DEPENDENCY ;;
29411       pkgadd)
29412         pkgadd_help  $MISSING_DEPENDENCY ;;
29413     esac
29414 
29415     if test "x$PKGHANDLER_COMMAND" != x; then
29416       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29417     fi
29418   fi
29419 
29420     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29421 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29422     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29423 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29424     as_fn_error $? "Cannot continue" "$LINENO" 5
29425   fi
29426 
29427 
29428 
29429   # Setup tools from the Boot JDK.
29430 
29431   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29432 
29433   # Publish this variable in the help.
29434 
29435 
29436   if [ -z "${JAVA+x}" ]; then
29437     # The variable is not set by user, try to locate tool using the code snippet
29438 
29439       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29440 $as_echo_n "checking for java in Boot JDK... " >&6; }
29441       JAVA=$BOOT_JDK/bin/java
29442       if test ! -x $JAVA; then
29443         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29444 $as_echo "not found" >&6; }
29445         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29446 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29447         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29448       fi
29449       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29450 $as_echo "ok" >&6; }
29451 
29452 
29453   else
29454     # The variable is set, but is it from the command line or the environment?
29455 
29456     # Try to remove the string !JAVA! from our list.
29457     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29458     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29459       # If it failed, the variable was not from the command line. Ignore it,
29460       # but warn the user (except for BASH, which is always set by the calling BASH).
29461       if test "xJAVA" != xBASH; then
29462         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29463 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29464       fi
29465       # Try to locate tool using the code snippet
29466 
29467       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29468 $as_echo_n "checking for java in Boot JDK... " >&6; }
29469       JAVA=$BOOT_JDK/bin/java
29470       if test ! -x $JAVA; then
29471         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29472 $as_echo "not found" >&6; }
29473         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29474 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29475         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29476       fi
29477       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29478 $as_echo "ok" >&6; }
29479 
29480 
29481     else
29482       # If it succeeded, then it was overridden by the user. We will use it
29483       # for the tool.
29484 
29485       # First remove it from the list of overridden variables, so we can test
29486       # for unknown variables in the end.
29487       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29488 
29489       # Check if we try to supply an empty value
29490       if test "x$JAVA" = x; then
29491         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29492 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29493         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29494 $as_echo_n "checking for JAVA... " >&6; }
29495         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29496 $as_echo "disabled" >&6; }
29497       else
29498         # Check if the provided tool contains a complete path.
29499         tool_specified="$JAVA"
29500         tool_basename="${tool_specified##*/}"
29501         if test "x$tool_basename" = "x$tool_specified"; then
29502           # A command without a complete path is provided, search $PATH.
29503           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29504 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29505           # Extract the first word of "$tool_basename", so it can be a program name with args.
29506 set dummy $tool_basename; ac_word=$2
29507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29508 $as_echo_n "checking for $ac_word... " >&6; }
29509 if ${ac_cv_path_JAVA+:} false; then :
29510   $as_echo_n "(cached) " >&6
29511 else
29512   case $JAVA in
29513   [\\/]* | ?:[\\/]*)
29514   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29515   ;;
29516   *)
29517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29518 for as_dir in $PATH
29519 do
29520   IFS=$as_save_IFS
29521   test -z "$as_dir" && as_dir=.
29522     for ac_exec_ext in '' $ac_executable_extensions; do
29523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29524     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29526     break 2
29527   fi
29528 done
29529   done
29530 IFS=$as_save_IFS
29531 
29532   ;;
29533 esac
29534 fi
29535 JAVA=$ac_cv_path_JAVA
29536 if test -n "$JAVA"; then
29537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29538 $as_echo "$JAVA" >&6; }
29539 else
29540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29541 $as_echo "no" >&6; }
29542 fi
29543 
29544 
29545           if test "x$JAVA" = x; then
29546             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29547           fi
29548         else
29549           # Otherwise we believe it is a complete path. Use it as it is.
29550           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29551 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29552           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29553 $as_echo_n "checking for JAVA... " >&6; }
29554           if test ! -x "$tool_specified"; then
29555             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29556 $as_echo "not found" >&6; }
29557             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29558           fi
29559           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29560 $as_echo "$tool_specified" >&6; }
29561         fi
29562       fi
29563     fi
29564 
29565   fi
29566 
29567 
29568 
29569   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29570 
29571   # Publish this variable in the help.
29572 
29573 
29574   if [ -z "${JAVAC+x}" ]; then
29575     # The variable is not set by user, try to locate tool using the code snippet
29576 
29577       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29578 $as_echo_n "checking for javac in Boot JDK... " >&6; }
29579       JAVAC=$BOOT_JDK/bin/javac
29580       if test ! -x $JAVAC; then
29581         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29582 $as_echo "not found" >&6; }
29583         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29584 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29585         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29586       fi
29587       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29588 $as_echo "ok" >&6; }
29589 
29590 
29591   else
29592     # The variable is set, but is it from the command line or the environment?
29593 
29594     # Try to remove the string !JAVAC! from our list.
29595     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29596     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29597       # If it failed, the variable was not from the command line. Ignore it,
29598       # but warn the user (except for BASH, which is always set by the calling BASH).
29599       if test "xJAVAC" != xBASH; then
29600         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29601 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29602       fi
29603       # Try to locate tool using the code snippet
29604 
29605       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29606 $as_echo_n "checking for javac in Boot JDK... " >&6; }
29607       JAVAC=$BOOT_JDK/bin/javac
29608       if test ! -x $JAVAC; then
29609         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29610 $as_echo "not found" >&6; }
29611         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29612 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29613         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29614       fi
29615       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29616 $as_echo "ok" >&6; }
29617 
29618 
29619     else
29620       # If it succeeded, then it was overridden by the user. We will use it
29621       # for the tool.
29622 
29623       # First remove it from the list of overridden variables, so we can test
29624       # for unknown variables in the end.
29625       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29626 
29627       # Check if we try to supply an empty value
29628       if test "x$JAVAC" = x; then
29629         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29630 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29631         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29632 $as_echo_n "checking for JAVAC... " >&6; }
29633         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29634 $as_echo "disabled" >&6; }
29635       else
29636         # Check if the provided tool contains a complete path.
29637         tool_specified="$JAVAC"
29638         tool_basename="${tool_specified##*/}"
29639         if test "x$tool_basename" = "x$tool_specified"; then
29640           # A command without a complete path is provided, search $PATH.
29641           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29642 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29643           # Extract the first word of "$tool_basename", so it can be a program name with args.
29644 set dummy $tool_basename; ac_word=$2
29645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29646 $as_echo_n "checking for $ac_word... " >&6; }
29647 if ${ac_cv_path_JAVAC+:} false; then :
29648   $as_echo_n "(cached) " >&6
29649 else
29650   case $JAVAC in
29651   [\\/]* | ?:[\\/]*)
29652   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29653   ;;
29654   *)
29655   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29656 for as_dir in $PATH
29657 do
29658   IFS=$as_save_IFS
29659   test -z "$as_dir" && as_dir=.
29660     for ac_exec_ext in '' $ac_executable_extensions; do
29661   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29662     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29664     break 2
29665   fi
29666 done
29667   done
29668 IFS=$as_save_IFS
29669 
29670   ;;
29671 esac
29672 fi
29673 JAVAC=$ac_cv_path_JAVAC
29674 if test -n "$JAVAC"; then
29675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29676 $as_echo "$JAVAC" >&6; }
29677 else
29678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29679 $as_echo "no" >&6; }
29680 fi
29681 
29682 
29683           if test "x$JAVAC" = x; then
29684             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29685           fi
29686         else
29687           # Otherwise we believe it is a complete path. Use it as it is.
29688           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29689 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29690           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29691 $as_echo_n "checking for JAVAC... " >&6; }
29692           if test ! -x "$tool_specified"; then
29693             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29694 $as_echo "not found" >&6; }
29695             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29696           fi
29697           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29698 $as_echo "$tool_specified" >&6; }
29699         fi
29700       fi
29701     fi
29702 
29703   fi
29704 
29705 
29706 
29707   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29708 
29709   # Publish this variable in the help.
29710 
29711 
29712   if [ -z "${JAVAH+x}" ]; then
29713     # The variable is not set by user, try to locate tool using the code snippet
29714 
29715       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29716 $as_echo_n "checking for javah in Boot JDK... " >&6; }
29717       JAVAH=$BOOT_JDK/bin/javah
29718       if test ! -x $JAVAH; then
29719         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29720 $as_echo "not found" >&6; }
29721         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29722 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29723         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29724       fi
29725       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29726 $as_echo "ok" >&6; }
29727 
29728 
29729   else
29730     # The variable is set, but is it from the command line or the environment?
29731 
29732     # Try to remove the string !JAVAH! from our list.
29733     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29734     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29735       # If it failed, the variable was not from the command line. Ignore it,
29736       # but warn the user (except for BASH, which is always set by the calling BASH).
29737       if test "xJAVAH" != xBASH; then
29738         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29739 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29740       fi
29741       # Try to locate tool using the code snippet
29742 
29743       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29744 $as_echo_n "checking for javah in Boot JDK... " >&6; }
29745       JAVAH=$BOOT_JDK/bin/javah
29746       if test ! -x $JAVAH; then
29747         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29748 $as_echo "not found" >&6; }
29749         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29750 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29751         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29752       fi
29753       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29754 $as_echo "ok" >&6; }
29755 
29756 
29757     else
29758       # If it succeeded, then it was overridden by the user. We will use it
29759       # for the tool.
29760 
29761       # First remove it from the list of overridden variables, so we can test
29762       # for unknown variables in the end.
29763       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29764 
29765       # Check if we try to supply an empty value
29766       if test "x$JAVAH" = x; then
29767         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29768 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29769         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29770 $as_echo_n "checking for JAVAH... " >&6; }
29771         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29772 $as_echo "disabled" >&6; }
29773       else
29774         # Check if the provided tool contains a complete path.
29775         tool_specified="$JAVAH"
29776         tool_basename="${tool_specified##*/}"
29777         if test "x$tool_basename" = "x$tool_specified"; then
29778           # A command without a complete path is provided, search $PATH.
29779           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29780 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29781           # Extract the first word of "$tool_basename", so it can be a program name with args.
29782 set dummy $tool_basename; ac_word=$2
29783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29784 $as_echo_n "checking for $ac_word... " >&6; }
29785 if ${ac_cv_path_JAVAH+:} false; then :
29786   $as_echo_n "(cached) " >&6
29787 else
29788   case $JAVAH in
29789   [\\/]* | ?:[\\/]*)
29790   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29791   ;;
29792   *)
29793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29794 for as_dir in $PATH
29795 do
29796   IFS=$as_save_IFS
29797   test -z "$as_dir" && as_dir=.
29798     for ac_exec_ext in '' $ac_executable_extensions; do
29799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29800     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29802     break 2
29803   fi
29804 done
29805   done
29806 IFS=$as_save_IFS
29807 
29808   ;;
29809 esac
29810 fi
29811 JAVAH=$ac_cv_path_JAVAH
29812 if test -n "$JAVAH"; then
29813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29814 $as_echo "$JAVAH" >&6; }
29815 else
29816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29817 $as_echo "no" >&6; }
29818 fi
29819 
29820 
29821           if test "x$JAVAH" = x; then
29822             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29823           fi
29824         else
29825           # Otherwise we believe it is a complete path. Use it as it is.
29826           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29827 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29828           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29829 $as_echo_n "checking for JAVAH... " >&6; }
29830           if test ! -x "$tool_specified"; then
29831             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29832 $as_echo "not found" >&6; }
29833             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29834           fi
29835           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29836 $as_echo "$tool_specified" >&6; }
29837         fi
29838       fi
29839     fi
29840 
29841   fi
29842 
29843 
29844 
29845   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29846 
29847   # Publish this variable in the help.
29848 
29849 
29850   if [ -z "${JAR+x}" ]; then
29851     # The variable is not set by user, try to locate tool using the code snippet
29852 
29853       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29854 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29855       JAR=$BOOT_JDK/bin/jar
29856       if test ! -x $JAR; then
29857         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29858 $as_echo "not found" >&6; }
29859         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29860 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29861         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29862       fi
29863       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29864 $as_echo "ok" >&6; }
29865 
29866 
29867   else
29868     # The variable is set, but is it from the command line or the environment?
29869 
29870     # Try to remove the string !JAR! from our list.
29871     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29872     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29873       # If it failed, the variable was not from the command line. Ignore it,
29874       # but warn the user (except for BASH, which is always set by the calling BASH).
29875       if test "xJAR" != xBASH; then
29876         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29877 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29878       fi
29879       # Try to locate tool using the code snippet
29880 
29881       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29882 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29883       JAR=$BOOT_JDK/bin/jar
29884       if test ! -x $JAR; then
29885         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29886 $as_echo "not found" >&6; }
29887         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29888 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29889         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29890       fi
29891       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29892 $as_echo "ok" >&6; }
29893 
29894 
29895     else
29896       # If it succeeded, then it was overridden by the user. We will use it
29897       # for the tool.
29898 
29899       # First remove it from the list of overridden variables, so we can test
29900       # for unknown variables in the end.
29901       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29902 
29903       # Check if we try to supply an empty value
29904       if test "x$JAR" = x; then
29905         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29906 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29907         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29908 $as_echo_n "checking for JAR... " >&6; }
29909         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29910 $as_echo "disabled" >&6; }
29911       else
29912         # Check if the provided tool contains a complete path.
29913         tool_specified="$JAR"
29914         tool_basename="${tool_specified##*/}"
29915         if test "x$tool_basename" = "x$tool_specified"; then
29916           # A command without a complete path is provided, search $PATH.
29917           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29918 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29919           # Extract the first word of "$tool_basename", so it can be a program name with args.
29920 set dummy $tool_basename; ac_word=$2
29921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29922 $as_echo_n "checking for $ac_word... " >&6; }
29923 if ${ac_cv_path_JAR+:} false; then :
29924   $as_echo_n "(cached) " >&6
29925 else
29926   case $JAR in
29927   [\\/]* | ?:[\\/]*)
29928   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29929   ;;
29930   *)
29931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29932 for as_dir in $PATH
29933 do
29934   IFS=$as_save_IFS
29935   test -z "$as_dir" && as_dir=.
29936     for ac_exec_ext in '' $ac_executable_extensions; do
29937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29938     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29940     break 2
29941   fi
29942 done
29943   done
29944 IFS=$as_save_IFS
29945 
29946   ;;
29947 esac
29948 fi
29949 JAR=$ac_cv_path_JAR
29950 if test -n "$JAR"; then
29951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29952 $as_echo "$JAR" >&6; }
29953 else
29954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29955 $as_echo "no" >&6; }
29956 fi
29957 
29958 
29959           if test "x$JAR" = x; then
29960             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29961           fi
29962         else
29963           # Otherwise we believe it is a complete path. Use it as it is.
29964           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29965 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29966           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29967 $as_echo_n "checking for JAR... " >&6; }
29968           if test ! -x "$tool_specified"; then
29969             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29970 $as_echo "not found" >&6; }
29971             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29972           fi
29973           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29974 $as_echo "$tool_specified" >&6; }
29975         fi
29976       fi
29977     fi
29978 
29979   fi
29980 
29981 
29982 
29983   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29984 
29985   # Publish this variable in the help.
29986 
29987 
29988   if [ -z "${JARSIGNER+x}" ]; then
29989     # The variable is not set by user, try to locate tool using the code snippet
29990 
29991       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29992 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29993       JARSIGNER=$BOOT_JDK/bin/jarsigner
29994       if test ! -x $JARSIGNER; then
29995         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29996 $as_echo "not found" >&6; }
29997         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29998 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29999         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30000       fi
30001       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30002 $as_echo "ok" >&6; }
30003 
30004 
30005   else
30006     # The variable is set, but is it from the command line or the environment?
30007 
30008     # Try to remove the string !JARSIGNER! from our list.
30009     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30010     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30011       # If it failed, the variable was not from the command line. Ignore it,
30012       # but warn the user (except for BASH, which is always set by the calling BASH).
30013       if test "xJARSIGNER" != xBASH; then
30014         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30015 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30016       fi
30017       # Try to locate tool using the code snippet
30018 
30019       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30020 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30021       JARSIGNER=$BOOT_JDK/bin/jarsigner
30022       if test ! -x $JARSIGNER; then
30023         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30024 $as_echo "not found" >&6; }
30025         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30026 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30027         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30028       fi
30029       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30030 $as_echo "ok" >&6; }
30031 
30032 
30033     else
30034       # If it succeeded, then it was overridden by the user. We will use it
30035       # for the tool.
30036 
30037       # First remove it from the list of overridden variables, so we can test
30038       # for unknown variables in the end.
30039       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30040 
30041       # Check if we try to supply an empty value
30042       if test "x$JARSIGNER" = x; then
30043         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30044 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30045         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30046 $as_echo_n "checking for JARSIGNER... " >&6; }
30047         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30048 $as_echo "disabled" >&6; }
30049       else
30050         # Check if the provided tool contains a complete path.
30051         tool_specified="$JARSIGNER"
30052         tool_basename="${tool_specified##*/}"
30053         if test "x$tool_basename" = "x$tool_specified"; then
30054           # A command without a complete path is provided, search $PATH.
30055           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30056 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30057           # Extract the first word of "$tool_basename", so it can be a program name with args.
30058 set dummy $tool_basename; ac_word=$2
30059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30060 $as_echo_n "checking for $ac_word... " >&6; }
30061 if ${ac_cv_path_JARSIGNER+:} false; then :
30062   $as_echo_n "(cached) " >&6
30063 else
30064   case $JARSIGNER in
30065   [\\/]* | ?:[\\/]*)
30066   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30067   ;;
30068   *)
30069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30070 for as_dir in $PATH
30071 do
30072   IFS=$as_save_IFS
30073   test -z "$as_dir" && as_dir=.
30074     for ac_exec_ext in '' $ac_executable_extensions; do
30075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30076     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30078     break 2
30079   fi
30080 done
30081   done
30082 IFS=$as_save_IFS
30083 
30084   ;;
30085 esac
30086 fi
30087 JARSIGNER=$ac_cv_path_JARSIGNER
30088 if test -n "$JARSIGNER"; then
30089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30090 $as_echo "$JARSIGNER" >&6; }
30091 else
30092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30093 $as_echo "no" >&6; }
30094 fi
30095 
30096 
30097           if test "x$JARSIGNER" = x; then
30098             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30099           fi
30100         else
30101           # Otherwise we believe it is a complete path. Use it as it is.
30102           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30103 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30104           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30105 $as_echo_n "checking for JARSIGNER... " >&6; }
30106           if test ! -x "$tool_specified"; then
30107             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30108 $as_echo "not found" >&6; }
30109             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30110           fi
30111           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30112 $as_echo "$tool_specified" >&6; }
30113         fi
30114       fi
30115     fi
30116 
30117   fi
30118 
30119 
30120 
30121   # Finally, set some other options...
30122 
30123   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30124   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30125 
30126 
30127 
30128   $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30129   $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30130   OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30131   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30132   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30133   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30134     dummy="$dummy -Xpatch:foo=bar"
30135     JVM_ARG_OK=true
30136   else
30137     $ECHO "Arg failed:" >&5
30138     $ECHO "$OUTPUT" >&5
30139     JVM_ARG_OK=false
30140   fi
30141 
30142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30143 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
30144   if test "x$JVM_ARG_OK" = "xtrue"; then
30145     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30146 $as_echo "yes" >&6; }
30147     BOOT_JDK_MODULAR="true"
30148   else
30149     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30150 $as_echo "no" >&6; }
30151     BOOT_JDK_MODULAR="false"
30152   fi
30153 
30154 
30155 
30156 
30157   # Check if the boot jdk is 32 or 64 bit
30158   if "$JAVA" -d64 -version > /dev/null 2>&1; then
30159     BOOT_JDK_BITS="64"
30160   else
30161     BOOT_JDK_BITS="32"
30162   fi
30163   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30164 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30166 $as_echo "$BOOT_JDK_BITS" >&6; }
30167 
30168 
30169 
30170 
30171 # Check whether --with-build-jdk was given.
30172 if test "${with_build_jdk+set}" = set; then :
30173   withval=$with_build_jdk;
30174 fi
30175 
30176 
30177   CREATE_BUILDJDK=false
30178   EXTERNAL_BUILDJDK=false
30179   BUILD_JDK_FOUND="no"
30180   if test "x$with_build_jdk" != "x"; then
30181 
30182   if test "x$BUILD_JDK_FOUND" = xno; then
30183     # Execute the test
30184 
30185        if test "x$with_build_jdk" != x; then
30186          BUILD_JDK=$with_build_jdk
30187          BUILD_JDK_FOUND=maybe
30188          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30189 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30190        fi
30191 
30192     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30193     if test "x$BUILD_JDK_FOUND" = xmaybe; then
30194       # Do we have a bin/java?
30195       if test ! -x "$BUILD_JDK/bin/java"; then
30196         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30197 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30198         BUILD_JDK_FOUND=no
30199       elif test ! -x "$BUILD_JDK/bin/jlink"; then
30200         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30201 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30202         BUILD_JDK_FOUND=no
30203       elif test ! -x "$BUILD_JDK/bin/jmod"; then
30204         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30205 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30206         BUILD_JDK_FOUND=no
30207       elif test ! -x "$BUILD_JDK/bin/javac"; then
30208         # Do we have a bin/javac?
30209         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30210 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30211         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30212 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30213         BUILD_JDK_FOUND=no
30214       else
30215         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30216         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30217 
30218         # Extra M4 quote needed to protect [] in grep expression.
30219         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30220         if test "x$FOUND_CORRECT_VERSION" = x; then
30221           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30222 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30223           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30224 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30225           BUILD_JDK_FOUND=no
30226         else
30227           # We're done!
30228           BUILD_JDK_FOUND=yes
30229 
30230   # Only process if variable expands to non-empty
30231 
30232   if test "x$BUILD_JDK" != x; then
30233     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30234 
30235   # Input might be given as Windows format, start by converting to
30236   # unix format.
30237   path="$BUILD_JDK"
30238   new_path=`$CYGPATH -u "$path"`
30239 
30240   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30241   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30242   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30243   # "foo.exe" is OK but "foo" is an error.
30244   #
30245   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30246   # It is also a way to make sure we got the proper file name for the real test later on.
30247   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30248   if test "x$test_shortpath" = x; then
30249     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30250 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30251     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30252   fi
30253 
30254   # Call helper function which possibly converts this using DOS-style short mode.
30255   # If so, the updated path is stored in $new_path.
30256 
30257   input_path="$new_path"
30258   # Check if we need to convert this using DOS-style short mode. If the path
30259   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30260   # take no chances and rewrite it.
30261   # Note: m4 eats our [], so we need to use [ and ] instead.
30262   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30263   if test "x$has_forbidden_chars" != x; then
30264     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30265     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30266     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30267     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30268       # Going to short mode and back again did indeed matter. Since short mode is
30269       # case insensitive, let's make it lowercase to improve readability.
30270       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30271       # Now convert it back to Unix-style (cygpath)
30272       input_path=`$CYGPATH -u "$shortmode_path"`
30273       new_path="$input_path"
30274     fi
30275   fi
30276 
30277   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30278   if test "x$test_cygdrive_prefix" = x; then
30279     # As a simple fix, exclude /usr/bin since it's not a real path.
30280     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30281       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30282       # a path prefixed by /cygdrive for fixpath to work.
30283       new_path="$CYGWIN_ROOT_PATH$input_path"
30284     fi
30285   fi
30286 
30287 
30288   if test "x$path" != "x$new_path"; then
30289     BUILD_JDK="$new_path"
30290     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30291 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30292   fi
30293 
30294     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30295 
30296   path="$BUILD_JDK"
30297   has_colon=`$ECHO $path | $GREP ^.:`
30298   new_path="$path"
30299   if test "x$has_colon" = x; then
30300     # Not in mixed or Windows style, start by that.
30301     new_path=`cmd //c echo $path`
30302   fi
30303 
30304 
30305   input_path="$new_path"
30306   # Check if we need to convert this using DOS-style short mode. If the path
30307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30308   # take no chances and rewrite it.
30309   # Note: m4 eats our [], so we need to use [ and ] instead.
30310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30311   if test "x$has_forbidden_chars" != x; then
30312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30313     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30314   fi
30315 
30316 
30317   windows_path="$new_path"
30318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30319     unix_path=`$CYGPATH -u "$windows_path"`
30320     new_path="$unix_path"
30321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30323     new_path="$unix_path"
30324   fi
30325 
30326   if test "x$path" != "x$new_path"; then
30327     BUILD_JDK="$new_path"
30328     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30329 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30330   fi
30331 
30332   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30333   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30334 
30335     else
30336       # We're on a unix platform. Hooray! :)
30337       path="$BUILD_JDK"
30338       has_space=`$ECHO "$path" | $GREP " "`
30339       if test "x$has_space" != x; then
30340         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30341 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30342         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30343       fi
30344 
30345       # Use eval to expand a potential ~
30346       eval path="$path"
30347       if test ! -f "$path" && test ! -d "$path"; then
30348         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30349       fi
30350 
30351       if test -d "$path"; then
30352         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30353       else
30354         dir="`$DIRNAME "$path"`"
30355         base="`$BASENAME "$path"`"
30356         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30357       fi
30358     fi
30359   fi
30360 
30361           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30362 $as_echo_n "checking for Build JDK... " >&6; }
30363           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30364 $as_echo "$BUILD_JDK" >&6; }
30365           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30366 $as_echo_n "checking Build JDK version... " >&6; }
30367           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30368           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30369 $as_echo "$BUILD_JDK_VERSION" >&6; }
30370         fi # end check jdk version
30371       fi # end check java
30372     fi # end check build jdk found
30373   fi
30374 
30375     EXTERNAL_BUILDJDK=true
30376   else
30377     if test "x$COMPILE_TYPE" = "xcross"; then
30378       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30379       BUILD_JDK_FOUND=yes
30380       CREATE_BUILDJDK=true
30381       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30382 $as_echo_n "checking for Build JDK... " >&6; }
30383       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30384 $as_echo "yes, will build it for the host platform" >&6; }
30385     else
30386       BUILD_JDK="\$(JDK_OUTPUTDIR)"
30387       BUILD_JDK_FOUND=yes
30388       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30389 $as_echo_n "checking for Build JDK... " >&6; }
30390       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30391 $as_echo "yes, will use output dir" >&6; }
30392     fi
30393   fi
30394 
30395   JMOD="$BUILD_JDK/bin/jmod"
30396   JLINK="$BUILD_JDK/bin/jlink"
30397 
30398 
30399 
30400   if test "x$BUILD_JDK_FOUND" != "xyes"; then
30401     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30402 $as_echo_n "checking for Build JDK... " >&6; }
30403     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30404 $as_echo "no" >&6; }
30405     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30406   fi
30407 
30408 
30409 
30410 
30411 
30412 
30413 ###############################################################################
30414 #
30415 # Configure the sources to use. We can add or override individual directories.
30416 #
30417 ###############################################################################
30418 
30419 
30420   # Where are the sources.
30421   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30422   CORBA_TOPDIR="$SRC_ROOT/corba"
30423   JAXP_TOPDIR="$SRC_ROOT/jaxp"
30424   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30425   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30426   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30427   JDK_TOPDIR="$SRC_ROOT/jdk"
30428 
30429 
30430 
30431 
30432 
30433 
30434 
30435 
30436 
30437   # This feature is no longer supported.
30438 
30439 
30440 
30441 # Check whether --with-add-source-root was given.
30442 if test "${with_add_source_root+set}" = set; then :
30443   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
30444 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30445 fi
30446 
30447 
30448 
30449 
30450 # Check whether --with-override-source-root was given.
30451 if test "${with_override_source_root+set}" = set; then :
30452   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
30453 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30454 fi
30455 
30456 
30457 
30458 
30459 # Check whether --with-adds-and-overrides was given.
30460 if test "${with_adds_and_overrides+set}" = set; then :
30461   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
30462 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30463 fi
30464 
30465 
30466 
30467 
30468 # Check whether --with-override-langtools was given.
30469 if test "${with_override_langtools+set}" = set; then :
30470   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30471 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30472 fi
30473 
30474 
30475 
30476 
30477 # Check whether --with-override-corba was given.
30478 if test "${with_override_corba+set}" = set; then :
30479   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30480 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30481 fi
30482 
30483 
30484 
30485 
30486 # Check whether --with-override-jaxp was given.
30487 if test "${with_override_jaxp+set}" = set; then :
30488   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30489 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30490 fi
30491 
30492 
30493 
30494 
30495 # Check whether --with-override-jaxws was given.
30496 if test "${with_override_jaxws+set}" = set; then :
30497   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30498 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30499 fi
30500 
30501 
30502 
30503 
30504 # Check whether --with-override-hotspot was given.
30505 if test "${with_override_hotspot+set}" = set; then :
30506   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30507 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30508 fi
30509 
30510 
30511 
30512 
30513 # Check whether --with-override-nashorn was given.
30514 if test "${with_override_nashorn+set}" = set; then :
30515   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30516 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30517 fi
30518 
30519 
30520 
30521 
30522 # Check whether --with-override-jdk was given.
30523 if test "${with_override_jdk+set}" = set; then :
30524   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30525 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30526 fi
30527 
30528 
30529 
30530 
30531   BUILD_OUTPUT="$OUTPUT_ROOT"
30532 
30533 
30534   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30535   BUILD_HOTSPOT=true
30536 
30537 
30538 
30539 # Check whether --with-import-hotspot was given.
30540 if test "${with_import_hotspot+set}" = set; then :
30541   withval=$with_import_hotspot;
30542 fi
30543 
30544   if test "x$with_import_hotspot" != x; then
30545     CURDIR="$PWD"
30546     cd "$with_import_hotspot"
30547     HOTSPOT_DIST="`pwd`"
30548     cd "$CURDIR"
30549     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30550       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30551     fi
30552     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30553 $as_echo_n "checking if hotspot should be imported... " >&6; }
30554     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30555 $as_echo "yes from $HOTSPOT_DIST" >&6; }
30556     BUILD_HOTSPOT=false
30557   fi
30558 
30559   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30560 
30561 
30562 
30563 
30564 # Check whether --with-import-modules was given.
30565 if test "${with_import_modules+set}" = set; then :
30566   withval=$with_import_modules;
30567 fi
30568 
30569 
30570   if test "x$with_import_modules" != x \
30571       && test "x$with_import_modules" != "xno"; then
30572     if test -d "$with_import_modules"; then
30573       IMPORT_MODULES_TOPDIR="$with_import_modules"
30574 
30575   # Only process if variable expands to non-empty
30576 
30577   if test "x$IMPORT_MODULES_TOPDIR" != x; then
30578     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30579 
30580   # Input might be given as Windows format, start by converting to
30581   # unix format.
30582   path="$IMPORT_MODULES_TOPDIR"
30583   new_path=`$CYGPATH -u "$path"`
30584 
30585   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30586   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30587   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30588   # "foo.exe" is OK but "foo" is an error.
30589   #
30590   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30591   # It is also a way to make sure we got the proper file name for the real test later on.
30592   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30593   if test "x$test_shortpath" = x; then
30594     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30595 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30596     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30597   fi
30598 
30599   # Call helper function which possibly converts this using DOS-style short mode.
30600   # If so, the updated path is stored in $new_path.
30601 
30602   input_path="$new_path"
30603   # Check if we need to convert this using DOS-style short mode. If the path
30604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30605   # take no chances and rewrite it.
30606   # Note: m4 eats our [], so we need to use [ and ] instead.
30607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30608   if test "x$has_forbidden_chars" != x; then
30609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30610     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30611     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30612     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30613       # Going to short mode and back again did indeed matter. Since short mode is
30614       # case insensitive, let's make it lowercase to improve readability.
30615       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30616       # Now convert it back to Unix-style (cygpath)
30617       input_path=`$CYGPATH -u "$shortmode_path"`
30618       new_path="$input_path"
30619     fi
30620   fi
30621 
30622   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30623   if test "x$test_cygdrive_prefix" = x; then
30624     # As a simple fix, exclude /usr/bin since it's not a real path.
30625     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30626       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30627       # a path prefixed by /cygdrive for fixpath to work.
30628       new_path="$CYGWIN_ROOT_PATH$input_path"
30629     fi
30630   fi
30631 
30632 
30633   if test "x$path" != "x$new_path"; then
30634     IMPORT_MODULES_TOPDIR="$new_path"
30635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30636 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30637   fi
30638 
30639     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30640 
30641   path="$IMPORT_MODULES_TOPDIR"
30642   has_colon=`$ECHO $path | $GREP ^.:`
30643   new_path="$path"
30644   if test "x$has_colon" = x; then
30645     # Not in mixed or Windows style, start by that.
30646     new_path=`cmd //c echo $path`
30647   fi
30648 
30649 
30650   input_path="$new_path"
30651   # Check if we need to convert this using DOS-style short mode. If the path
30652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30653   # take no chances and rewrite it.
30654   # Note: m4 eats our [], so we need to use [ and ] instead.
30655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30656   if test "x$has_forbidden_chars" != x; then
30657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30659   fi
30660 
30661 
30662   windows_path="$new_path"
30663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30664     unix_path=`$CYGPATH -u "$windows_path"`
30665     new_path="$unix_path"
30666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30668     new_path="$unix_path"
30669   fi
30670 
30671   if test "x$path" != "x$new_path"; then
30672     IMPORT_MODULES_TOPDIR="$new_path"
30673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30674 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30675   fi
30676 
30677   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30678   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30679 
30680     else
30681       # We're on a unix platform. Hooray! :)
30682       path="$IMPORT_MODULES_TOPDIR"
30683       has_space=`$ECHO "$path" | $GREP " "`
30684       if test "x$has_space" != x; then
30685         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30686 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30687         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30688       fi
30689 
30690       # Use eval to expand a potential ~
30691       eval path="$path"
30692       if test ! -f "$path" && test ! -d "$path"; then
30693         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30694       fi
30695 
30696       if test -d "$path"; then
30697         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30698       else
30699         dir="`$DIRNAME "$path"`"
30700         base="`$BASENAME "$path"`"
30701         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30702       fi
30703     fi
30704   fi
30705 
30706     elif test -e "$with_import_modules"; then
30707       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30708       $RM -rf "$IMPORT_MODULES_TOPDIR"
30709       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30710       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30711         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30712       fi
30713     else
30714       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30715     fi
30716   fi
30717 
30718   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30719     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30720   fi
30721   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30722     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30723   fi
30724   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30725     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30726   fi
30727   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30728     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30729   fi
30730   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30731     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30732   fi
30733   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30734     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30735   fi
30736 
30737 
30738 
30739 
30740 
30741 
30742 
30743 
30744 
30745 ###############################################################################
30746 #
30747 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
30748 # native code.
30749 #
30750 ###############################################################################
30751 
30752 # See if we are doing a complete static build or not
30753 
30754   # Check whether --enable-static-build was given.
30755 if test "${enable_static_build+set}" = set; then :
30756   enableval=$enable_static_build;
30757 fi
30758 
30759   STATIC_BUILD=false
30760   if test "x$enable_static_build" = "xyes"; then
30761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30762 $as_echo_n "checking if static build is enabled... " >&6; }
30763     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30764 $as_echo "yes" >&6; }
30765     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30766       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30767     fi
30768     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30769     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30770     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30771     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30772     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30773     STATIC_BUILD=true
30774   elif test "x$enable_static_build" = "xno"; then
30775     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30776 $as_echo_n "checking if static build is enabled... " >&6; }
30777     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30778 $as_echo "no" >&6; }
30779   elif test "x$enable_static_build" != "x"; then
30780     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30781   fi
30782 
30783 
30784 
30785 
30786 # First determine the toolchain type (compiler family)
30787 
30788 
30789 # Check whether --with-toolchain-type was given.
30790 if test "${with_toolchain_type+set}" = set; then :
30791   withval=$with_toolchain_type;
30792 fi
30793 
30794 
30795   # Use indirect variable referencing
30796   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30797   VALID_TOOLCHAINS=${!toolchain_var_name}
30798 
30799   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30800     if test -n "$XCODEBUILD"; then
30801       # On Mac OS X, default toolchain to clang after Xcode 5
30802       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30803       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30804       if test $? -ne 0; then
30805         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30806       fi
30807       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30808           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30809           $CUT -f 1 -d .`
30810       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30811 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30812       if test $XCODE_MAJOR_VERSION -ge 5; then
30813           DEFAULT_TOOLCHAIN="clang"
30814       else
30815           DEFAULT_TOOLCHAIN="gcc"
30816       fi
30817     else
30818       # If Xcode is not installed, but the command line tools are
30819       # then we can't run xcodebuild. On these systems we should
30820       # default to clang
30821       DEFAULT_TOOLCHAIN="clang"
30822     fi
30823   else
30824     # First toolchain type in the list is the default
30825     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30826   fi
30827 
30828   if test "x$with_toolchain_type" = xlist; then
30829     # List all toolchains
30830     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30831 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30832     for toolchain in $VALID_TOOLCHAINS; do
30833       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30834       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30835       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30836     done
30837 
30838     exit 0
30839   elif test "x$with_toolchain_type" != x; then
30840     # User override; check that it is valid
30841     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30842       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30843 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30844       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30845 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30846       as_fn_error $? "Cannot continue." "$LINENO" 5
30847     fi
30848     TOOLCHAIN_TYPE=$with_toolchain_type
30849   else
30850     # No flag given, use default
30851     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30852   fi
30853 
30854 
30855   TOOLCHAIN_CC_BINARY_clang="clang"
30856   TOOLCHAIN_CC_BINARY_gcc="gcc"
30857   TOOLCHAIN_CC_BINARY_microsoft="cl"
30858   TOOLCHAIN_CC_BINARY_solstudio="cc"
30859   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30860 
30861   TOOLCHAIN_CXX_BINARY_clang="clang++"
30862   TOOLCHAIN_CXX_BINARY_gcc="g++"
30863   TOOLCHAIN_CXX_BINARY_microsoft="cl"
30864   TOOLCHAIN_CXX_BINARY_solstudio="CC"
30865   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30866 
30867   # Use indirect variable referencing
30868   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30869   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30870   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30871   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30872   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30873   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30874   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30875   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30876 
30877 
30878   # Define filename patterns
30879   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30880     LIBRARY_PREFIX=
30881     SHARED_LIBRARY_SUFFIX='.dll'
30882     STATIC_LIBRARY_SUFFIX='.lib'
30883     SHARED_LIBRARY='$1.dll'
30884     STATIC_LIBRARY='$1.lib'
30885     OBJ_SUFFIX='.obj'
30886     EXE_SUFFIX='.exe'
30887   else
30888     LIBRARY_PREFIX=lib
30889     SHARED_LIBRARY_SUFFIX='.so'
30890     STATIC_LIBRARY_SUFFIX='.a'
30891     SHARED_LIBRARY='lib$1.so'
30892     STATIC_LIBRARY='lib$1.a'
30893     OBJ_SUFFIX='.o'
30894     EXE_SUFFIX=''
30895     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30896       # For full static builds, we're overloading the SHARED_LIBRARY
30897       # variables in order to limit the amount of changes required.
30898       # It would be better to remove SHARED and just use LIBRARY and
30899       # LIBRARY_SUFFIX for libraries that can be built either
30900       # shared or static and use STATIC_* for libraries that are
30901       # always built statically.
30902       if test "x$STATIC_BUILD" = xtrue; then
30903         SHARED_LIBRARY='lib$1.a'
30904         SHARED_LIBRARY_SUFFIX='.a'
30905       else
30906         SHARED_LIBRARY='lib$1.dylib'
30907         SHARED_LIBRARY_SUFFIX='.dylib'
30908       fi
30909     fi
30910   fi
30911 
30912 
30913 
30914 
30915 
30916 
30917 
30918 
30919 
30920 
30921   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30922     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30923 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30924   else
30925     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30926 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30927   fi
30928 
30929 
30930 # User supplied flags should be used when configure detects compilers
30931 
30932   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30933     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30934 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30935   fi
30936 
30937   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30938     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30939 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30940   fi
30941 
30942   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30943     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30944 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30945   fi
30946 
30947 
30948 # Check whether --with-extra-cflags was given.
30949 if test "${with_extra_cflags+set}" = set; then :
30950   withval=$with_extra_cflags;
30951 fi
30952 
30953 
30954 
30955 # Check whether --with-extra-cxxflags was given.
30956 if test "${with_extra_cxxflags+set}" = set; then :
30957   withval=$with_extra_cxxflags;
30958 fi
30959 
30960 
30961 
30962 # Check whether --with-extra-ldflags was given.
30963 if test "${with_extra_ldflags+set}" = set; then :
30964   withval=$with_extra_ldflags;
30965 fi
30966 
30967 
30968   EXTRA_CFLAGS="$with_extra_cflags"
30969   EXTRA_CXXFLAGS="$with_extra_cxxflags"
30970   EXTRA_LDFLAGS="$with_extra_ldflags"
30971 
30972   # Hotspot needs these set in their legacy form
30973   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30974   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30975   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30976 
30977 
30978 
30979 
30980 
30981 
30982 
30983 
30984 
30985   # The global CFLAGS and LDLAGS variables are used by configure tests and
30986   # should include the extra parameters
30987   CFLAGS="$EXTRA_CFLAGS"
30988   CXXFLAGS="$EXTRA_CXXFLAGS"
30989   LDFLAGS="$EXTRA_LDFLAGS"
30990   CPPFLAGS=""
30991 
30992 # The sysroot cflags are needed for configure to be able to run the compilers
30993 
30994   if test "x$SYSROOT" != "x"; then
30995     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30996       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30997         # Solaris Studio does not have a concept of sysroot. Instead we must
30998         # make sure the default include and lib dirs are appended to each
30999         # compile and link command line. Must also add -I-xbuiltin to enable
31000         # inlining of system functions and intrinsics.
31001         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31002         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31003             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31004             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31005       fi
31006     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31007       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31008       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31009     elif test "x$TOOLCHAIN_TYPE" = xclang; then
31010       SYSROOT_CFLAGS="-isysroot $SYSROOT"
31011       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31012     fi
31013     # Propagate the sysroot args to hotspot
31014     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31015     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31016     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31017     # The global CFLAGS and LDFLAGS variables need these for configure to function
31018     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31019     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31020     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31021     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31022   fi
31023 
31024   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31025     # We also need -iframework<path>/System/Library/Frameworks
31026     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31027     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31028     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31029     # set this here so it doesn't have to be peppered throughout the forest
31030     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31031     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31032   fi
31033 
31034 
31035 
31036 
31037 
31038 # Then detect the actual binaries needed
31039 
31040   # FIXME: Is this needed?
31041   ac_ext=cpp
31042 ac_cpp='$CXXCPP $CPPFLAGS'
31043 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31044 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31045 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31046 
31047 
31048   # Store the CFLAGS etc passed to the configure script.
31049   ORG_CFLAGS="$CFLAGS"
31050   ORG_CXXFLAGS="$CXXFLAGS"
31051 
31052   # autoconf magic only relies on PATH, so update it if tools dir is specified
31053   OLD_PATH="$PATH"
31054 
31055   # On Windows, we need to detect the visual studio installation first.
31056   # This will change the PATH, but we need to keep that new PATH even
31057   # after toolchain detection is done, since the compiler (on x86) uses
31058   # it for DLL resolution in runtime.
31059   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31060       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31061 
31062   # Store path to cygwin link.exe to help excluding it when searching for
31063   # VS linker. This must be done before changing the PATH when looking for VS.
31064   # Extract the first word of "link", so it can be a program name with args.
31065 set dummy link; ac_word=$2
31066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31067 $as_echo_n "checking for $ac_word... " >&6; }
31068 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31069   $as_echo_n "(cached) " >&6
31070 else
31071   case $CYGWIN_LINK in
31072   [\\/]* | ?:[\\/]*)
31073   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31074   ;;
31075   *)
31076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31077 for as_dir in $PATH
31078 do
31079   IFS=$as_save_IFS
31080   test -z "$as_dir" && as_dir=.
31081     for ac_exec_ext in '' $ac_executable_extensions; do
31082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31083     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31085     break 2
31086   fi
31087 done
31088   done
31089 IFS=$as_save_IFS
31090 
31091   ;;
31092 esac
31093 fi
31094 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31095 if test -n "$CYGWIN_LINK"; then
31096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31097 $as_echo "$CYGWIN_LINK" >&6; }
31098 else
31099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31100 $as_echo "no" >&6; }
31101 fi
31102 
31103 
31104   if test "x$CYGWIN_LINK" != x; then
31105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31106 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31107     "$CYGWIN_LINK" --version > /dev/null
31108     if test $? -eq 0 ; then
31109       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31110 $as_echo "yes" >&6; }
31111     else
31112       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31113 $as_echo "no" >&6; }
31114       # This might be the VS linker. Don't exclude it later on.
31115       CYGWIN_LINK=""
31116     fi
31117   fi
31118 
31119   # First-hand choice is to locate and run the vsvars bat file.
31120 
31121 
31122 # Check whether --with-toolchain-version was given.
31123 if test "${with_toolchain_version+set}" = set; then :
31124   withval=$with_toolchain_version;
31125 fi
31126 
31127 
31128   if test "x$with_toolchain_version" = xlist; then
31129     # List all toolchains
31130     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31131 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31132     for version in $VALID_VS_VERSIONS; do
31133       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31134       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31135     done
31136 
31137     exit 0
31138   elif test "x$DEVKIT_VS_VERSION" != x; then
31139     VS_VERSION=$DEVKIT_VS_VERSION
31140     TOOLCHAIN_VERSION=$VS_VERSION
31141     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31142     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31143     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31144     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31145     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31146     VS_PATH="$TOOLCHAIN_PATH:$PATH"
31147 
31148     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31149     # can still be exported as INCLUDE for compiler invocations without
31150     # SYSROOT_CFLAGS
31151     OLDIFS="$IFS"
31152     IFS=";"
31153     for i in $DEVKIT_VS_INCLUDE; do
31154       ipath=$i
31155 
31156   unix_path="$ipath"
31157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31158     windows_path=`$CYGPATH -m "$unix_path"`
31159     ipath="$windows_path"
31160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31161     windows_path=`cmd //c echo $unix_path`
31162     ipath="$windows_path"
31163   fi
31164 
31165       VS_INCLUDE="$VS_INCLUDE;$ipath"
31166     done
31167     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31168     # as LIB for compiler invocations without SYSROOT_LDFLAGS
31169     for i in $DEVKIT_VS_LIB; do
31170       libpath=$i
31171 
31172   unix_path="$libpath"
31173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31174     windows_path=`$CYGPATH -m "$unix_path"`
31175     libpath="$windows_path"
31176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31177     windows_path=`cmd //c echo $unix_path`
31178     libpath="$windows_path"
31179   fi
31180 
31181       VS_LIB="$VS_LIB;$libpath"
31182     done
31183     IFS="$OLDIFS"
31184 
31185     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31186 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31187 
31188   elif test "x$with_toolchain_version" != x; then
31189     # User override; check that it is valid
31190     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31191       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31192 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31193       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31194 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31195       as_fn_error $? "Cannot continue." "$LINENO" 5
31196     fi
31197     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31198   else
31199     # No flag given, use default
31200     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31201   fi
31202 
31203   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31204 
31205   VS_VERSION="$VS_VERSION"
31206   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31207   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31208   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31209   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31210 
31211   # When using --with-tools-dir, assume it points to the correct and default
31212   # version of Visual Studio or that --with-toolchain-version was also set.
31213   if test "x$with_tools_dir" != x; then
31214 
31215   if test "x$VS_ENV_CMD" = x; then
31216     VS_VERSION="${VS_VERSION}"
31217     VS_BASE="$with_tools_dir/../.."
31218     METHOD="--with-tools-dir"
31219 
31220     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31221       VCVARSFILE="vc/bin/vcvars32.bat"
31222     else
31223       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31224     fi
31225 
31226 
31227   windows_path="$VS_BASE"
31228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31229     unix_path=`$CYGPATH -u "$windows_path"`
31230     VS_BASE="$unix_path"
31231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31232     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31233     VS_BASE="$unix_path"
31234   fi
31235 
31236     if test -d "$VS_BASE"; then
31237       if test -f "$VS_BASE/$VCVARSFILE"; then
31238         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31239 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31240         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31241         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31242         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31243         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31244       else
31245         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31246 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31247         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31248 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31249       fi
31250     fi
31251   fi
31252 
31253 
31254   if test "x$VS_ENV_CMD" = x; then
31255     VS_VERSION="${VS_VERSION}"
31256     VS_BASE="$with_tools_dir/../../.."
31257     METHOD="--with-tools-dir"
31258 
31259     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31260       VCVARSFILE="vc/bin/vcvars32.bat"
31261     else
31262       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31263     fi
31264 
31265 
31266   windows_path="$VS_BASE"
31267   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31268     unix_path=`$CYGPATH -u "$windows_path"`
31269     VS_BASE="$unix_path"
31270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31271     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31272     VS_BASE="$unix_path"
31273   fi
31274 
31275     if test -d "$VS_BASE"; then
31276       if test -f "$VS_BASE/$VCVARSFILE"; then
31277         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31278 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31279         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31280         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31281         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31282         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31283       else
31284         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31285 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31286         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31287 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31288       fi
31289     fi
31290   fi
31291 
31292     if test "x$VS_ENV_CMD" = x; then
31293       # Having specified an argument which is incorrect will produce an instant failure;
31294       # we should not go on looking
31295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31296 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31297       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31298 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31299       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31300 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31301       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31302     fi
31303   fi
31304 
31305   VS_ENV_CMD=""
31306   VS_ENV_ARGS=""
31307 
31308   if test "x$VS_COMNTOOLS" != x; then
31309 
31310   if test "x$VS_ENV_CMD" = x; then
31311     VS_VERSION="${VS_VERSION}"
31312     VS_BASE="$VS_COMNTOOLS/../.."
31313     METHOD="$VS_COMNTOOLS_VAR variable"
31314 
31315     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31316       VCVARSFILE="vc/bin/vcvars32.bat"
31317     else
31318       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31319     fi
31320 
31321 
31322   windows_path="$VS_BASE"
31323   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31324     unix_path=`$CYGPATH -u "$windows_path"`
31325     VS_BASE="$unix_path"
31326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31327     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31328     VS_BASE="$unix_path"
31329   fi
31330 
31331     if test -d "$VS_BASE"; then
31332       if test -f "$VS_BASE/$VCVARSFILE"; then
31333         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31334 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31335         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31336         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31337         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31338         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31339       else
31340         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31341 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31342         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31343 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31344       fi
31345     fi
31346   fi
31347 
31348   fi
31349   if test "x$PROGRAMFILES" != x; then
31350 
31351   if test "x$VS_ENV_CMD" = x; then
31352     VS_VERSION="${VS_VERSION}"
31353     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31354     METHOD="well-known name"
31355 
31356     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31357       VCVARSFILE="vc/bin/vcvars32.bat"
31358     else
31359       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31360     fi
31361 
31362 
31363   windows_path="$VS_BASE"
31364   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31365     unix_path=`$CYGPATH -u "$windows_path"`
31366     VS_BASE="$unix_path"
31367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31368     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31369     VS_BASE="$unix_path"
31370   fi
31371 
31372     if test -d "$VS_BASE"; then
31373       if test -f "$VS_BASE/$VCVARSFILE"; then
31374         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31375 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31376         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31377         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31378         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31379         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31380       else
31381         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31382 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31383         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31384 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31385       fi
31386     fi
31387   fi
31388 
31389   fi
31390   # Work around the insanely named ProgramFiles(x86) env variable
31391   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31392   if test "x$PROGRAMFILES_X86" != x; then
31393 
31394   if test "x$VS_ENV_CMD" = x; then
31395     VS_VERSION="${VS_VERSION}"
31396     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31397     METHOD="well-known name"
31398 
31399     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31400       VCVARSFILE="vc/bin/vcvars32.bat"
31401     else
31402       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31403     fi
31404 
31405 
31406   windows_path="$VS_BASE"
31407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31408     unix_path=`$CYGPATH -u "$windows_path"`
31409     VS_BASE="$unix_path"
31410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31412     VS_BASE="$unix_path"
31413   fi
31414 
31415     if test -d "$VS_BASE"; then
31416       if test -f "$VS_BASE/$VCVARSFILE"; then
31417         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31418 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31419         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31420         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31421         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31422         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31423       else
31424         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31425 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31426         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31427 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31428       fi
31429     fi
31430   fi
31431 
31432   fi
31433 
31434   if test "x$VS_ENV_CMD" = x; then
31435     VS_VERSION="${VS_VERSION}"
31436     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31437     METHOD="well-known name"
31438 
31439     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31440       VCVARSFILE="vc/bin/vcvars32.bat"
31441     else
31442       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31443     fi
31444 
31445 
31446   windows_path="$VS_BASE"
31447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31448     unix_path=`$CYGPATH -u "$windows_path"`
31449     VS_BASE="$unix_path"
31450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31452     VS_BASE="$unix_path"
31453   fi
31454 
31455     if test -d "$VS_BASE"; then
31456       if test -f "$VS_BASE/$VCVARSFILE"; then
31457         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31458 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31459         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31460         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31461         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31462         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31463       else
31464         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31465 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31466         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31467 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31468       fi
31469     fi
31470   fi
31471 
31472 
31473   if test "x$VS_ENV_CMD" = x; then
31474     VS_VERSION="${VS_VERSION}"
31475     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31476     METHOD="well-known name"
31477 
31478     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31479       VCVARSFILE="vc/bin/vcvars32.bat"
31480     else
31481       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31482     fi
31483 
31484 
31485   windows_path="$VS_BASE"
31486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31487     unix_path=`$CYGPATH -u "$windows_path"`
31488     VS_BASE="$unix_path"
31489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31491     VS_BASE="$unix_path"
31492   fi
31493 
31494     if test -d "$VS_BASE"; then
31495       if test -f "$VS_BASE/$VCVARSFILE"; then
31496         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31497 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31498         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31499         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31500         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31501         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31502       else
31503         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31504 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31505         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31506 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31507       fi
31508     fi
31509   fi
31510 
31511 
31512   if test "x$SDK_INSTALL_DIR" != x; then
31513     if test "x$ProgramW6432" != x; then
31514 
31515   if test "x$VS_ENV_CMD" = x; then
31516     VS_VERSION="${VS_VERSION}"
31517     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31518     METHOD="well-known name"
31519 
31520   windows_path="$WIN_SDK_BASE"
31521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31522     unix_path=`$CYGPATH -u "$windows_path"`
31523     WIN_SDK_BASE="$unix_path"
31524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31526     WIN_SDK_BASE="$unix_path"
31527   fi
31528 
31529     if test -d "$WIN_SDK_BASE"; then
31530       # There have been cases of partial or broken SDK installations. A missing
31531       # lib dir is not going to work.
31532       if test ! -d "$WIN_SDK_BASE/lib"; then
31533         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31534 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31535         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31536 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31537       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31538         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31539 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31540         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31541         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31542           VS_ENV_ARGS="/x86"
31543         else
31544           VS_ENV_ARGS="/x64"
31545         fi
31546         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31547         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31548         # TODO: improve detection for other versions of SDK
31549         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31550       else
31551         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31552 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31553         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31554 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31555       fi
31556     fi
31557   fi
31558 
31559     fi
31560     if test "x$PROGRAMW6432" != x; then
31561 
31562   if test "x$VS_ENV_CMD" = x; then
31563     VS_VERSION="${VS_VERSION}"
31564     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31565     METHOD="well-known name"
31566 
31567   windows_path="$WIN_SDK_BASE"
31568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31569     unix_path=`$CYGPATH -u "$windows_path"`
31570     WIN_SDK_BASE="$unix_path"
31571   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31572     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31573     WIN_SDK_BASE="$unix_path"
31574   fi
31575 
31576     if test -d "$WIN_SDK_BASE"; then
31577       # There have been cases of partial or broken SDK installations. A missing
31578       # lib dir is not going to work.
31579       if test ! -d "$WIN_SDK_BASE/lib"; then
31580         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31581 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31582         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31583 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31584       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31585         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31586 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31587         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31588         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31589           VS_ENV_ARGS="/x86"
31590         else
31591           VS_ENV_ARGS="/x64"
31592         fi
31593         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31594         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31595         # TODO: improve detection for other versions of SDK
31596         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31597       else
31598         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31599 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31600         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31601 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31602       fi
31603     fi
31604   fi
31605 
31606     fi
31607     if test "x$PROGRAMFILES" != x; then
31608 
31609   if test "x$VS_ENV_CMD" = x; then
31610     VS_VERSION="${VS_VERSION}"
31611     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31612     METHOD="well-known name"
31613 
31614   windows_path="$WIN_SDK_BASE"
31615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31616     unix_path=`$CYGPATH -u "$windows_path"`
31617     WIN_SDK_BASE="$unix_path"
31618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31620     WIN_SDK_BASE="$unix_path"
31621   fi
31622 
31623     if test -d "$WIN_SDK_BASE"; then
31624       # There have been cases of partial or broken SDK installations. A missing
31625       # lib dir is not going to work.
31626       if test ! -d "$WIN_SDK_BASE/lib"; then
31627         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31628 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31629         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31630 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31631       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31632         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31633 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31634         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31635         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31636           VS_ENV_ARGS="/x86"
31637         else
31638           VS_ENV_ARGS="/x64"
31639         fi
31640         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31641         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31642         # TODO: improve detection for other versions of SDK
31643         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31644       else
31645         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31646 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31647         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31648 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31649       fi
31650     fi
31651   fi
31652 
31653     fi
31654 
31655   if test "x$VS_ENV_CMD" = x; then
31656     VS_VERSION="${VS_VERSION}"
31657     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31658     METHOD="well-known name"
31659 
31660   windows_path="$WIN_SDK_BASE"
31661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31662     unix_path=`$CYGPATH -u "$windows_path"`
31663     WIN_SDK_BASE="$unix_path"
31664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31666     WIN_SDK_BASE="$unix_path"
31667   fi
31668 
31669     if test -d "$WIN_SDK_BASE"; then
31670       # There have been cases of partial or broken SDK installations. A missing
31671       # lib dir is not going to work.
31672       if test ! -d "$WIN_SDK_BASE/lib"; then
31673         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31674 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31675         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31676 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31677       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31678         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31679 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31680         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31681         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31682           VS_ENV_ARGS="/x86"
31683         else
31684           VS_ENV_ARGS="/x64"
31685         fi
31686         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31687         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31688         # TODO: improve detection for other versions of SDK
31689         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31690       else
31691         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31692 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31693         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31694 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31695       fi
31696     fi
31697   fi
31698 
31699 
31700   if test "x$VS_ENV_CMD" = x; then
31701     VS_VERSION="${VS_VERSION}"
31702     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31703     METHOD="well-known name"
31704 
31705   windows_path="$WIN_SDK_BASE"
31706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31707     unix_path=`$CYGPATH -u "$windows_path"`
31708     WIN_SDK_BASE="$unix_path"
31709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31711     WIN_SDK_BASE="$unix_path"
31712   fi
31713 
31714     if test -d "$WIN_SDK_BASE"; then
31715       # There have been cases of partial or broken SDK installations. A missing
31716       # lib dir is not going to work.
31717       if test ! -d "$WIN_SDK_BASE/lib"; then
31718         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31719 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31720         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31721 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31722       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31723         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31724 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31725         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31726         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31727           VS_ENV_ARGS="/x86"
31728         else
31729           VS_ENV_ARGS="/x64"
31730         fi
31731         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31732         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31733         # TODO: improve detection for other versions of SDK
31734         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31735       else
31736         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31737 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31738         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31739 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31740       fi
31741     fi
31742   fi
31743 
31744   fi
31745 
31746     if test "x$VS_ENV_CMD" != x; then
31747       TOOLCHAIN_VERSION=$VS_VERSION
31748       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31749       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31750       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31751       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31752       # The rest of the variables are already evaled while probing
31753       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31754 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31755       break
31756     fi
31757   done
31758 
31759 
31760   # If we have a devkit, skip all of the below.
31761   if test "x$DEVKIT_VS_VERSION" = x; then
31762     if test "x$VS_ENV_CMD" != x; then
31763       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31764 
31765   # Only process if variable expands to non-empty
31766 
31767   if test "x$VS_ENV_CMD" != x; then
31768     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31769 
31770   # First separate the path from the arguments. This will split at the first
31771   # space.
31772   complete="$VS_ENV_CMD"
31773   path="${complete%% *}"
31774   tmp="$complete EOL"
31775   arguments="${tmp#* }"
31776 
31777   # Input might be given as Windows format, start by converting to
31778   # unix format.
31779   new_path=`$CYGPATH -u "$path"`
31780 
31781   # Now try to locate executable using which
31782   new_path=`$WHICH "$new_path" 2> /dev/null`
31783   # bat and cmd files are not always considered executable in cygwin causing which
31784   # to not find them
31785   if test "x$new_path" = x \
31786       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31787       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31788     new_path=`$CYGPATH -u "$path"`
31789   fi
31790   if test "x$new_path" = x; then
31791     # Oops. Which didn't find the executable.
31792     # The splitting of arguments from the executable at a space might have been incorrect,
31793     # since paths with space are more likely in Windows. Give it another try with the whole
31794     # argument.
31795     path="$complete"
31796     arguments="EOL"
31797     new_path=`$CYGPATH -u "$path"`
31798     new_path=`$WHICH "$new_path" 2> /dev/null`
31799     # bat and cmd files are not always considered executable in cygwin causing which
31800     # to not find them
31801     if test "x$new_path" = x \
31802         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31803         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31804       new_path=`$CYGPATH -u "$path"`
31805     fi
31806     if test "x$new_path" = x; then
31807       # It's still not found. Now this is an unrecoverable error.
31808       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31809 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31810       has_space=`$ECHO "$complete" | $GREP " "`
31811       if test "x$has_space" != x; then
31812         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31813 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31814       fi
31815       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31816     fi
31817   fi
31818 
31819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31822   # "foo.exe" is OK but "foo" is an error.
31823   #
31824   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31825   # It is also a way to make sure we got the proper file name for the real test later on.
31826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31827   if test "x$test_shortpath" = x; then
31828     # Short path failed, file does not exist as specified.
31829     # Try adding .exe or .cmd
31830     if test -f "${new_path}.exe"; then
31831       input_to_shortpath="${new_path}.exe"
31832     elif test -f "${new_path}.cmd"; then
31833       input_to_shortpath="${new_path}.cmd"
31834     else
31835       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31836 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31837       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31838 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31839       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31840     fi
31841   else
31842     input_to_shortpath="$new_path"
31843   fi
31844 
31845   # Call helper function which possibly converts this using DOS-style short mode.
31846   # If so, the updated path is stored in $new_path.
31847   new_path="$input_to_shortpath"
31848 
31849   input_path="$input_to_shortpath"
31850   # Check if we need to convert this using DOS-style short mode. If the path
31851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31852   # take no chances and rewrite it.
31853   # Note: m4 eats our [], so we need to use [ and ] instead.
31854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31855   if test "x$has_forbidden_chars" != x; then
31856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31857     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31858     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31859     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31860       # Going to short mode and back again did indeed matter. Since short mode is
31861       # case insensitive, let's make it lowercase to improve readability.
31862       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31863       # Now convert it back to Unix-style (cygpath)
31864       input_path=`$CYGPATH -u "$shortmode_path"`
31865       new_path="$input_path"
31866     fi
31867   fi
31868 
31869   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31870   if test "x$test_cygdrive_prefix" = x; then
31871     # As a simple fix, exclude /usr/bin since it's not a real path.
31872     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31873       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31874       # a path prefixed by /cygdrive for fixpath to work.
31875       new_path="$CYGWIN_ROOT_PATH$input_path"
31876     fi
31877   fi
31878 
31879   # remove trailing .exe if any
31880   new_path="${new_path/%.exe/}"
31881 
31882     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31883 
31884   # First separate the path from the arguments. This will split at the first
31885   # space.
31886   complete="$VS_ENV_CMD"
31887   path="${complete%% *}"
31888   tmp="$complete EOL"
31889   arguments="${tmp#* }"
31890 
31891   # Input might be given as Windows format, start by converting to
31892   # unix format.
31893   new_path="$path"
31894 
31895   windows_path="$new_path"
31896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31897     unix_path=`$CYGPATH -u "$windows_path"`
31898     new_path="$unix_path"
31899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31901     new_path="$unix_path"
31902   fi
31903 
31904 
31905   # Now try to locate executable using which
31906   new_path=`$WHICH "$new_path" 2> /dev/null`
31907 
31908   if test "x$new_path" = x; then
31909     # Oops. Which didn't find the executable.
31910     # The splitting of arguments from the executable at a space might have been incorrect,
31911     # since paths with space are more likely in Windows. Give it another try with the whole
31912     # argument.
31913     path="$complete"
31914     arguments="EOL"
31915     new_path="$path"
31916 
31917   windows_path="$new_path"
31918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31919     unix_path=`$CYGPATH -u "$windows_path"`
31920     new_path="$unix_path"
31921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31923     new_path="$unix_path"
31924   fi
31925 
31926 
31927     new_path=`$WHICH "$new_path" 2> /dev/null`
31928     # bat and cmd files are not always considered executable in MSYS causing which
31929     # to not find them
31930     if test "x$new_path" = x \
31931         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31932         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31933       new_path="$path"
31934 
31935   windows_path="$new_path"
31936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31937     unix_path=`$CYGPATH -u "$windows_path"`
31938     new_path="$unix_path"
31939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31941     new_path="$unix_path"
31942   fi
31943 
31944     fi
31945 
31946     if test "x$new_path" = x; then
31947       # It's still not found. Now this is an unrecoverable error.
31948       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31949 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31950       has_space=`$ECHO "$complete" | $GREP " "`
31951       if test "x$has_space" != x; then
31952         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31953 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31954       fi
31955       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31956     fi
31957   fi
31958 
31959   # Now new_path has a complete unix path to the binary
31960   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31961     # Keep paths in /bin as-is, but remove trailing .exe if any
31962     new_path="${new_path/%.exe/}"
31963     # Do not save /bin paths to all_fixpath_prefixes!
31964   else
31965     # Not in mixed or Windows style, start by that.
31966     new_path=`cmd //c echo $new_path`
31967 
31968   input_path="$new_path"
31969   # Check if we need to convert this using DOS-style short mode. If the path
31970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31971   # take no chances and rewrite it.
31972   # Note: m4 eats our [], so we need to use [ and ] instead.
31973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31974   if test "x$has_forbidden_chars" != x; then
31975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31976     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31977   fi
31978 
31979     # Output is in $new_path
31980 
31981   windows_path="$new_path"
31982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31983     unix_path=`$CYGPATH -u "$windows_path"`
31984     new_path="$unix_path"
31985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31987     new_path="$unix_path"
31988   fi
31989 
31990     # remove trailing .exe if any
31991     new_path="${new_path/%.exe/}"
31992 
31993     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31994     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31995   fi
31996 
31997     else
31998       # We're on a unix platform. Hooray! :)
31999       # First separate the path from the arguments. This will split at the first
32000       # space.
32001       complete="$VS_ENV_CMD"
32002       path="${complete%% *}"
32003       tmp="$complete EOL"
32004       arguments="${tmp#* }"
32005 
32006       # Cannot rely on the command "which" here since it doesn't always work.
32007       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32008       if test -z "$is_absolute_path"; then
32009         # Path to executable is not absolute. Find it.
32010         IFS_save="$IFS"
32011         IFS=:
32012         for p in $PATH; do
32013           if test -f "$p/$path" && test -x "$p/$path"; then
32014             new_path="$p/$path"
32015             break
32016           fi
32017         done
32018         IFS="$IFS_save"
32019       else
32020         # This is an absolute path, we can use it without further modifications.
32021         new_path="$path"
32022       fi
32023 
32024       if test "x$new_path" = x; then
32025         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32026 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32027         has_space=`$ECHO "$complete" | $GREP " "`
32028         if test "x$has_space" != x; then
32029           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32030 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32031         fi
32032         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32033       fi
32034     fi
32035 
32036     # Now join together the path and the arguments once again
32037     if test "x$arguments" != xEOL; then
32038       new_complete="$new_path ${arguments% *}"
32039     else
32040       new_complete="$new_path"
32041     fi
32042 
32043     if test "x$complete" != "x$new_complete"; then
32044       VS_ENV_CMD="$new_complete"
32045       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32046 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32047     fi
32048   fi
32049 
32050 
32051       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32052       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32053 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32054 
32055       # We need to create a couple of temporary files.
32056       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32057       $MKDIR -p $VS_ENV_TMP_DIR
32058 
32059       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32060       # Instead create a shell script which will set the relevant variables when run.
32061       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32062 
32063   unix_path="$WINPATH_VS_ENV_CMD"
32064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32065     windows_path=`$CYGPATH -m "$unix_path"`
32066     WINPATH_VS_ENV_CMD="$windows_path"
32067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32068     windows_path=`cmd //c echo $unix_path`
32069     WINPATH_VS_ENV_CMD="$windows_path"
32070   fi
32071 
32072       WINPATH_BASH="$BASH"
32073 
32074   unix_path="$WINPATH_BASH"
32075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32076     windows_path=`$CYGPATH -m "$unix_path"`
32077     WINPATH_BASH="$windows_path"
32078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32079     windows_path=`cmd //c echo $unix_path`
32080     WINPATH_BASH="$windows_path"
32081   fi
32082 
32083 
32084       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32085       # script (executable by bash) that will setup the important variables.
32086       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32087       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32088       # This will end up something like:
32089       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32090       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32091       # These will end up something like:
32092       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32093       # The trailing space for everyone except PATH is no typo, but is needed due
32094       # to trailing \ in the Windows paths. These will be stripped later.
32095       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32096           >> $EXTRACT_VC_ENV_BAT_FILE
32097       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32098           >> $EXTRACT_VC_ENV_BAT_FILE
32099       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32100           >> $EXTRACT_VC_ENV_BAT_FILE
32101       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32102           >> $EXTRACT_VC_ENV_BAT_FILE
32103       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32104           >> $EXTRACT_VC_ENV_BAT_FILE
32105       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32106           >> $EXTRACT_VC_ENV_BAT_FILE
32107 
32108       # Now execute the newly created bat file.
32109       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32110       # Change directory so we don't need to mess with Windows paths in redirects.
32111       cd $VS_ENV_TMP_DIR
32112       cmd /c extract-vs-env.bat | $CAT
32113       cd $CURDIR
32114 
32115       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32116         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32117 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32118         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32119 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32120         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32121 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32122         as_fn_error $? "Cannot continue" "$LINENO" 5
32123       fi
32124 
32125       # Now set all paths and other env variables. This will allow the rest of
32126       # the configure script to find and run the compiler in the proper way.
32127       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32128 $as_echo "$as_me: Setting extracted environment variables" >&6;}
32129       . $VS_ENV_TMP_DIR/set-vs-env.sh
32130       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32131       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32132     else
32133       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32134       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32135 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32136     fi
32137   fi
32138 
32139   # At this point, we should have correct variables in the environment, or we can't continue.
32140   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32141 $as_echo_n "checking for Visual Studio variables... " >&6; }
32142 
32143   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32144       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32145     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32146       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32147 $as_echo "present but broken" >&6; }
32148       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32149     else
32150       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32151 $as_echo "ok" >&6; }
32152       # Remove any trailing "\" ";" and " " from the variables.
32153       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32154       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32155       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32156       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32157       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32158       # Remove any paths containing # (typically F#) as that messes up make. This
32159       # is needed if visual studio was installed with F# support.
32160       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32161 
32162 
32163 
32164 
32165 
32166       # Convert VS_INCLUDE into SYSROOT_CFLAGS
32167       OLDIFS="$IFS"
32168       IFS=";"
32169       for i in $VS_INCLUDE; do
32170         ipath=$i
32171         # Only process non-empty elements
32172         if test "x$ipath" != x; then
32173           IFS="$OLDIFS"
32174           # Check that directory exists before calling fixup_path
32175           testpath=$ipath
32176 
32177   windows_path="$testpath"
32178   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32179     unix_path=`$CYGPATH -u "$windows_path"`
32180     testpath="$unix_path"
32181   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32182     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32183     testpath="$unix_path"
32184   fi
32185 
32186           if test -d "$testpath"; then
32187 
32188   # Only process if variable expands to non-empty
32189 
32190   if test "x$ipath" != x; then
32191     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32192 
32193   # Input might be given as Windows format, start by converting to
32194   # unix format.
32195   path="$ipath"
32196   new_path=`$CYGPATH -u "$path"`
32197 
32198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32201   # "foo.exe" is OK but "foo" is an error.
32202   #
32203   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32204   # It is also a way to make sure we got the proper file name for the real test later on.
32205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32206   if test "x$test_shortpath" = x; then
32207     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32208 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32209     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32210   fi
32211 
32212   # Call helper function which possibly converts this using DOS-style short mode.
32213   # If so, the updated path is stored in $new_path.
32214 
32215   input_path="$new_path"
32216   # Check if we need to convert this using DOS-style short mode. If the path
32217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32218   # take no chances and rewrite it.
32219   # Note: m4 eats our [], so we need to use [ and ] instead.
32220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32221   if test "x$has_forbidden_chars" != x; then
32222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32223     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32224     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32225     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32226       # Going to short mode and back again did indeed matter. Since short mode is
32227       # case insensitive, let's make it lowercase to improve readability.
32228       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32229       # Now convert it back to Unix-style (cygpath)
32230       input_path=`$CYGPATH -u "$shortmode_path"`
32231       new_path="$input_path"
32232     fi
32233   fi
32234 
32235   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32236   if test "x$test_cygdrive_prefix" = x; then
32237     # As a simple fix, exclude /usr/bin since it's not a real path.
32238     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32239       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32240       # a path prefixed by /cygdrive for fixpath to work.
32241       new_path="$CYGWIN_ROOT_PATH$input_path"
32242     fi
32243   fi
32244 
32245 
32246   if test "x$path" != "x$new_path"; then
32247     ipath="$new_path"
32248     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32249 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32250   fi
32251 
32252     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32253 
32254   path="$ipath"
32255   has_colon=`$ECHO $path | $GREP ^.:`
32256   new_path="$path"
32257   if test "x$has_colon" = x; then
32258     # Not in mixed or Windows style, start by that.
32259     new_path=`cmd //c echo $path`
32260   fi
32261 
32262 
32263   input_path="$new_path"
32264   # Check if we need to convert this using DOS-style short mode. If the path
32265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32266   # take no chances and rewrite it.
32267   # Note: m4 eats our [], so we need to use [ and ] instead.
32268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32269   if test "x$has_forbidden_chars" != x; then
32270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32271     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32272   fi
32273 
32274 
32275   windows_path="$new_path"
32276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32277     unix_path=`$CYGPATH -u "$windows_path"`
32278     new_path="$unix_path"
32279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32281     new_path="$unix_path"
32282   fi
32283 
32284   if test "x$path" != "x$new_path"; then
32285     ipath="$new_path"
32286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32287 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32288   fi
32289 
32290   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32291   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32292 
32293     else
32294       # We're on a unix platform. Hooray! :)
32295       path="$ipath"
32296       has_space=`$ECHO "$path" | $GREP " "`
32297       if test "x$has_space" != x; then
32298         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32299 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32300         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32301       fi
32302 
32303       # Use eval to expand a potential ~
32304       eval path="$path"
32305       if test ! -f "$path" && test ! -d "$path"; then
32306         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32307       fi
32308 
32309       if test -d "$path"; then
32310         ipath="`cd "$path"; $THEPWDCMD -L`"
32311       else
32312         dir="`$DIRNAME "$path"`"
32313         base="`$BASENAME "$path"`"
32314         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32315       fi
32316     fi
32317   fi
32318 
32319             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32320           fi
32321           IFS=";"
32322         fi
32323       done
32324       # Convert VS_LIB into SYSROOT_LDFLAGS
32325       for i in $VS_LIB; do
32326         libpath=$i
32327         # Only process non-empty elements
32328         if test "x$libpath" != x; then
32329           IFS="$OLDIFS"
32330           # Check that directory exists before calling fixup_path
32331           testpath=$libpath
32332 
32333   windows_path="$testpath"
32334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32335     unix_path=`$CYGPATH -u "$windows_path"`
32336     testpath="$unix_path"
32337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32339     testpath="$unix_path"
32340   fi
32341 
32342           if test -d "$testpath"; then
32343 
32344   # Only process if variable expands to non-empty
32345 
32346   if test "x$libpath" != x; then
32347     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32348 
32349   # Input might be given as Windows format, start by converting to
32350   # unix format.
32351   path="$libpath"
32352   new_path=`$CYGPATH -u "$path"`
32353 
32354   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32355   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32356   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32357   # "foo.exe" is OK but "foo" is an error.
32358   #
32359   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32360   # It is also a way to make sure we got the proper file name for the real test later on.
32361   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32362   if test "x$test_shortpath" = x; then
32363     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32364 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32365     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32366   fi
32367 
32368   # Call helper function which possibly converts this using DOS-style short mode.
32369   # If so, the updated path is stored in $new_path.
32370 
32371   input_path="$new_path"
32372   # Check if we need to convert this using DOS-style short mode. If the path
32373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32374   # take no chances and rewrite it.
32375   # Note: m4 eats our [], so we need to use [ and ] instead.
32376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32377   if test "x$has_forbidden_chars" != x; then
32378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32379     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32380     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32381     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32382       # Going to short mode and back again did indeed matter. Since short mode is
32383       # case insensitive, let's make it lowercase to improve readability.
32384       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32385       # Now convert it back to Unix-style (cygpath)
32386       input_path=`$CYGPATH -u "$shortmode_path"`
32387       new_path="$input_path"
32388     fi
32389   fi
32390 
32391   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32392   if test "x$test_cygdrive_prefix" = x; then
32393     # As a simple fix, exclude /usr/bin since it's not a real path.
32394     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32395       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32396       # a path prefixed by /cygdrive for fixpath to work.
32397       new_path="$CYGWIN_ROOT_PATH$input_path"
32398     fi
32399   fi
32400 
32401 
32402   if test "x$path" != "x$new_path"; then
32403     libpath="$new_path"
32404     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32405 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32406   fi
32407 
32408     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32409 
32410   path="$libpath"
32411   has_colon=`$ECHO $path | $GREP ^.:`
32412   new_path="$path"
32413   if test "x$has_colon" = x; then
32414     # Not in mixed or Windows style, start by that.
32415     new_path=`cmd //c echo $path`
32416   fi
32417 
32418 
32419   input_path="$new_path"
32420   # Check if we need to convert this using DOS-style short mode. If the path
32421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32422   # take no chances and rewrite it.
32423   # Note: m4 eats our [], so we need to use [ and ] instead.
32424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32425   if test "x$has_forbidden_chars" != x; then
32426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32427     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32428   fi
32429 
32430 
32431   windows_path="$new_path"
32432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32433     unix_path=`$CYGPATH -u "$windows_path"`
32434     new_path="$unix_path"
32435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32436     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32437     new_path="$unix_path"
32438   fi
32439 
32440   if test "x$path" != "x$new_path"; then
32441     libpath="$new_path"
32442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32443 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32444   fi
32445 
32446   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32447   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32448 
32449     else
32450       # We're on a unix platform. Hooray! :)
32451       path="$libpath"
32452       has_space=`$ECHO "$path" | $GREP " "`
32453       if test "x$has_space" != x; then
32454         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32455 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32456         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32457       fi
32458 
32459       # Use eval to expand a potential ~
32460       eval path="$path"
32461       if test ! -f "$path" && test ! -d "$path"; then
32462         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32463       fi
32464 
32465       if test -d "$path"; then
32466         libpath="`cd "$path"; $THEPWDCMD -L`"
32467       else
32468         dir="`$DIRNAME "$path"`"
32469         base="`$BASENAME "$path"`"
32470         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32471       fi
32472     fi
32473   fi
32474 
32475             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32476           fi
32477           IFS=";"
32478         fi
32479       done
32480       IFS="$OLDIFS"
32481     fi
32482   else
32483     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32484 $as_echo "not found" >&6; }
32485 
32486     if test "x$VS_ENV_CMD" = x; then
32487       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32488 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32489       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32490 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32491     else
32492       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32493 $as_echo "$as_me: Running the extraction script failed." >&6;}
32494     fi
32495     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32496 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32497     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32498 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32499     as_fn_error $? "Cannot continue" "$LINENO" 5
32500   fi
32501 
32502     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32503     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32504     PATH="$VS_PATH"
32505     # The microsoft toolchain also requires INCLUDE and LIB to be set.
32506     export INCLUDE="$VS_INCLUDE"
32507     export LIB="$VS_LIB"
32508   else
32509     if test "x$XCODE_VERSION_OUTPUT" != x; then
32510       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32511       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32512       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32513     else
32514       # Currently we do not define this for other toolchains. This might change as the need arise.
32515       TOOLCHAIN_VERSION=
32516     fi
32517   fi
32518 
32519 
32520   # For solaris we really need solaris tools, and not the GNU equivalent.
32521   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32522   # so add that to path before starting to probe.
32523   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32524   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32525     PATH="/usr/ccs/bin:$PATH"
32526   fi
32527 
32528   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32529   # override all other locations.
32530   if test "x$TOOLCHAIN_PATH" != x; then
32531     PATH=$TOOLCHAIN_PATH:$PATH
32532   fi
32533 
32534 
32535   #
32536   # Setup the compilers (CC and CXX)
32537   #
32538 
32539   COMPILER_NAME=C
32540   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32541 
32542   if test "x$CC" != x; then
32543     # User has supplied compiler name already, always let that override.
32544     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32545 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32546     if test "x`basename $CC`" = "x$CC"; then
32547       # A command without a complete path is provided, search $PATH.
32548 
32549       for ac_prog in $CC
32550 do
32551   # Extract the first word of "$ac_prog", so it can be a program name with args.
32552 set dummy $ac_prog; ac_word=$2
32553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32554 $as_echo_n "checking for $ac_word... " >&6; }
32555 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32556   $as_echo_n "(cached) " >&6
32557 else
32558   case $POTENTIAL_CC in
32559   [\\/]* | ?:[\\/]*)
32560   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32561   ;;
32562   *)
32563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32564 for as_dir in $PATH
32565 do
32566   IFS=$as_save_IFS
32567   test -z "$as_dir" && as_dir=.
32568     for ac_exec_ext in '' $ac_executable_extensions; do
32569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32570     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32572     break 2
32573   fi
32574 done
32575   done
32576 IFS=$as_save_IFS
32577 
32578   ;;
32579 esac
32580 fi
32581 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32582 if test -n "$POTENTIAL_CC"; then
32583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32584 $as_echo "$POTENTIAL_CC" >&6; }
32585 else
32586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32587 $as_echo "no" >&6; }
32588 fi
32589 
32590 
32591   test -n "$POTENTIAL_CC" && break
32592 done
32593 
32594       if test "x$POTENTIAL_CC" != x; then
32595         CC=$POTENTIAL_CC
32596       else
32597         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32598       fi
32599     else
32600       # Otherwise it might already be a complete path
32601       if test ! -x "$CC"; then
32602         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32603       fi
32604     fi
32605   else
32606     # No user supplied value. Locate compiler ourselves.
32607 
32608     # If we are cross compiling, assume cross compilation tools follows the
32609     # cross compilation standard where they are prefixed with the autoconf
32610     # standard name for the target. For example the binary
32611     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32612     # If we are not cross compiling, then the default compiler name will be
32613     # used.
32614 
32615     CC=
32616     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32617     # before checking the rest of the PATH.
32618     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32619     # step, this should not be necessary.
32620     if test -n "$TOOLCHAIN_PATH"; then
32621       PATH_save="$PATH"
32622       PATH="$TOOLCHAIN_PATH"
32623       for ac_prog in $SEARCH_LIST
32624 do
32625   # Extract the first word of "$ac_prog", so it can be a program name with args.
32626 set dummy $ac_prog; ac_word=$2
32627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32628 $as_echo_n "checking for $ac_word... " >&6; }
32629 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32630   $as_echo_n "(cached) " >&6
32631 else
32632   case $TOOLCHAIN_PATH_CC in
32633   [\\/]* | ?:[\\/]*)
32634   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32635   ;;
32636   *)
32637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32638 for as_dir in $PATH
32639 do
32640   IFS=$as_save_IFS
32641   test -z "$as_dir" && as_dir=.
32642     for ac_exec_ext in '' $ac_executable_extensions; do
32643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32644     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32646     break 2
32647   fi
32648 done
32649   done
32650 IFS=$as_save_IFS
32651 
32652   ;;
32653 esac
32654 fi
32655 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32656 if test -n "$TOOLCHAIN_PATH_CC"; then
32657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32658 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32659 else
32660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32661 $as_echo "no" >&6; }
32662 fi
32663 
32664 
32665   test -n "$TOOLCHAIN_PATH_CC" && break
32666 done
32667 
32668       CC=$TOOLCHAIN_PATH_CC
32669       PATH="$PATH_save"
32670     fi
32671 
32672     # AC_PATH_PROGS can't be run multiple times with the same variable,
32673     # so create a new name for this run.
32674     if test "x$CC" = x; then
32675       for ac_prog in $SEARCH_LIST
32676 do
32677   # Extract the first word of "$ac_prog", so it can be a program name with args.
32678 set dummy $ac_prog; ac_word=$2
32679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32680 $as_echo_n "checking for $ac_word... " >&6; }
32681 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32682   $as_echo_n "(cached) " >&6
32683 else
32684   case $POTENTIAL_CC in
32685   [\\/]* | ?:[\\/]*)
32686   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32687   ;;
32688   *)
32689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32690 for as_dir in $PATH
32691 do
32692   IFS=$as_save_IFS
32693   test -z "$as_dir" && as_dir=.
32694     for ac_exec_ext in '' $ac_executable_extensions; do
32695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32696     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32698     break 2
32699   fi
32700 done
32701   done
32702 IFS=$as_save_IFS
32703 
32704   ;;
32705 esac
32706 fi
32707 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32708 if test -n "$POTENTIAL_CC"; then
32709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32710 $as_echo "$POTENTIAL_CC" >&6; }
32711 else
32712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32713 $as_echo "no" >&6; }
32714 fi
32715 
32716 
32717   test -n "$POTENTIAL_CC" && break
32718 done
32719 
32720       CC=$POTENTIAL_CC
32721     fi
32722 
32723     if test "x$CC" = x; then
32724 
32725   # Print a helpful message on how to acquire the necessary build dependency.
32726   # devkit is the help tag: freetype, cups, alsa etc
32727   MISSING_DEPENDENCY=devkit
32728 
32729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32730     cygwin_help $MISSING_DEPENDENCY
32731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32732     msys_help $MISSING_DEPENDENCY
32733   else
32734     PKGHANDLER_COMMAND=
32735 
32736     case $PKGHANDLER in
32737       apt-get)
32738         apt_help     $MISSING_DEPENDENCY ;;
32739       yum)
32740         yum_help     $MISSING_DEPENDENCY ;;
32741       port)
32742         port_help    $MISSING_DEPENDENCY ;;
32743       pkgutil)
32744         pkgutil_help $MISSING_DEPENDENCY ;;
32745       pkgadd)
32746         pkgadd_help  $MISSING_DEPENDENCY ;;
32747     esac
32748 
32749     if test "x$PKGHANDLER_COMMAND" != x; then
32750       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32751     fi
32752   fi
32753 
32754       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32755     fi
32756   fi
32757 
32758   # Now we have a compiler binary in CC. Make sure it's okay.
32759 
32760   # Only process if variable expands to non-empty
32761 
32762   if test "x$CC" != x; then
32763     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32764 
32765   # First separate the path from the arguments. This will split at the first
32766   # space.
32767   complete="$CC"
32768   path="${complete%% *}"
32769   tmp="$complete EOL"
32770   arguments="${tmp#* }"
32771 
32772   # Input might be given as Windows format, start by converting to
32773   # unix format.
32774   new_path=`$CYGPATH -u "$path"`
32775 
32776   # Now try to locate executable using which
32777   new_path=`$WHICH "$new_path" 2> /dev/null`
32778   # bat and cmd files are not always considered executable in cygwin causing which
32779   # to not find them
32780   if test "x$new_path" = x \
32781       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32782       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32783     new_path=`$CYGPATH -u "$path"`
32784   fi
32785   if test "x$new_path" = x; then
32786     # Oops. Which didn't find the executable.
32787     # The splitting of arguments from the executable at a space might have been incorrect,
32788     # since paths with space are more likely in Windows. Give it another try with the whole
32789     # argument.
32790     path="$complete"
32791     arguments="EOL"
32792     new_path=`$CYGPATH -u "$path"`
32793     new_path=`$WHICH "$new_path" 2> /dev/null`
32794     # bat and cmd files are not always considered executable in cygwin causing which
32795     # to not find them
32796     if test "x$new_path" = x \
32797         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32798         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32799       new_path=`$CYGPATH -u "$path"`
32800     fi
32801     if test "x$new_path" = x; then
32802       # It's still not found. Now this is an unrecoverable error.
32803       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32804 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32805       has_space=`$ECHO "$complete" | $GREP " "`
32806       if test "x$has_space" != x; then
32807         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32808 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32809       fi
32810       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32811     fi
32812   fi
32813 
32814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32817   # "foo.exe" is OK but "foo" is an error.
32818   #
32819   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32820   # It is also a way to make sure we got the proper file name for the real test later on.
32821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32822   if test "x$test_shortpath" = x; then
32823     # Short path failed, file does not exist as specified.
32824     # Try adding .exe or .cmd
32825     if test -f "${new_path}.exe"; then
32826       input_to_shortpath="${new_path}.exe"
32827     elif test -f "${new_path}.cmd"; then
32828       input_to_shortpath="${new_path}.cmd"
32829     else
32830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32831 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32832       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32833 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32834       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32835     fi
32836   else
32837     input_to_shortpath="$new_path"
32838   fi
32839 
32840   # Call helper function which possibly converts this using DOS-style short mode.
32841   # If so, the updated path is stored in $new_path.
32842   new_path="$input_to_shortpath"
32843 
32844   input_path="$input_to_shortpath"
32845   # Check if we need to convert this using DOS-style short mode. If the path
32846   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32847   # take no chances and rewrite it.
32848   # Note: m4 eats our [], so we need to use [ and ] instead.
32849   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32850   if test "x$has_forbidden_chars" != x; then
32851     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32852     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32853     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32854     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32855       # Going to short mode and back again did indeed matter. Since short mode is
32856       # case insensitive, let's make it lowercase to improve readability.
32857       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32858       # Now convert it back to Unix-style (cygpath)
32859       input_path=`$CYGPATH -u "$shortmode_path"`
32860       new_path="$input_path"
32861     fi
32862   fi
32863 
32864   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32865   if test "x$test_cygdrive_prefix" = x; then
32866     # As a simple fix, exclude /usr/bin since it's not a real path.
32867     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32868       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32869       # a path prefixed by /cygdrive for fixpath to work.
32870       new_path="$CYGWIN_ROOT_PATH$input_path"
32871     fi
32872   fi
32873 
32874   # remove trailing .exe if any
32875   new_path="${new_path/%.exe/}"
32876 
32877     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32878 
32879   # First separate the path from the arguments. This will split at the first
32880   # space.
32881   complete="$CC"
32882   path="${complete%% *}"
32883   tmp="$complete EOL"
32884   arguments="${tmp#* }"
32885 
32886   # Input might be given as Windows format, start by converting to
32887   # unix format.
32888   new_path="$path"
32889 
32890   windows_path="$new_path"
32891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32892     unix_path=`$CYGPATH -u "$windows_path"`
32893     new_path="$unix_path"
32894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32895     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32896     new_path="$unix_path"
32897   fi
32898 
32899 
32900   # Now try to locate executable using which
32901   new_path=`$WHICH "$new_path" 2> /dev/null`
32902 
32903   if test "x$new_path" = x; then
32904     # Oops. Which didn't find the executable.
32905     # The splitting of arguments from the executable at a space might have been incorrect,
32906     # since paths with space are more likely in Windows. Give it another try with the whole
32907     # argument.
32908     path="$complete"
32909     arguments="EOL"
32910     new_path="$path"
32911 
32912   windows_path="$new_path"
32913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32914     unix_path=`$CYGPATH -u "$windows_path"`
32915     new_path="$unix_path"
32916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32918     new_path="$unix_path"
32919   fi
32920 
32921 
32922     new_path=`$WHICH "$new_path" 2> /dev/null`
32923     # bat and cmd files are not always considered executable in MSYS causing which
32924     # to not find them
32925     if test "x$new_path" = x \
32926         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32927         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32928       new_path="$path"
32929 
32930   windows_path="$new_path"
32931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32932     unix_path=`$CYGPATH -u "$windows_path"`
32933     new_path="$unix_path"
32934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32936     new_path="$unix_path"
32937   fi
32938 
32939     fi
32940 
32941     if test "x$new_path" = x; then
32942       # It's still not found. Now this is an unrecoverable error.
32943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32944 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32945       has_space=`$ECHO "$complete" | $GREP " "`
32946       if test "x$has_space" != x; then
32947         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32948 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32949       fi
32950       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32951     fi
32952   fi
32953 
32954   # Now new_path has a complete unix path to the binary
32955   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32956     # Keep paths in /bin as-is, but remove trailing .exe if any
32957     new_path="${new_path/%.exe/}"
32958     # Do not save /bin paths to all_fixpath_prefixes!
32959   else
32960     # Not in mixed or Windows style, start by that.
32961     new_path=`cmd //c echo $new_path`
32962 
32963   input_path="$new_path"
32964   # Check if we need to convert this using DOS-style short mode. If the path
32965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32966   # take no chances and rewrite it.
32967   # Note: m4 eats our [], so we need to use [ and ] instead.
32968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32969   if test "x$has_forbidden_chars" != x; then
32970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32971     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32972   fi
32973 
32974     # Output is in $new_path
32975 
32976   windows_path="$new_path"
32977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32978     unix_path=`$CYGPATH -u "$windows_path"`
32979     new_path="$unix_path"
32980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32982     new_path="$unix_path"
32983   fi
32984 
32985     # remove trailing .exe if any
32986     new_path="${new_path/%.exe/}"
32987 
32988     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32989     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32990   fi
32991 
32992     else
32993       # We're on a unix platform. Hooray! :)
32994       # First separate the path from the arguments. This will split at the first
32995       # space.
32996       complete="$CC"
32997       path="${complete%% *}"
32998       tmp="$complete EOL"
32999       arguments="${tmp#* }"
33000 
33001       # Cannot rely on the command "which" here since it doesn't always work.
33002       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33003       if test -z "$is_absolute_path"; then
33004         # Path to executable is not absolute. Find it.
33005         IFS_save="$IFS"
33006         IFS=:
33007         for p in $PATH; do
33008           if test -f "$p/$path" && test -x "$p/$path"; then
33009             new_path="$p/$path"
33010             break
33011           fi
33012         done
33013         IFS="$IFS_save"
33014       else
33015         # This is an absolute path, we can use it without further modifications.
33016         new_path="$path"
33017       fi
33018 
33019       if test "x$new_path" = x; then
33020         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33021 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33022         has_space=`$ECHO "$complete" | $GREP " "`
33023         if test "x$has_space" != x; then
33024           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33025 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33026         fi
33027         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33028       fi
33029     fi
33030 
33031     # Now join together the path and the arguments once again
33032     if test "x$arguments" != xEOL; then
33033       new_complete="$new_path ${arguments% *}"
33034     else
33035       new_complete="$new_path"
33036     fi
33037 
33038     if test "x$complete" != "x$new_complete"; then
33039       CC="$new_complete"
33040       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33041 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33042     fi
33043   fi
33044 
33045   TEST_COMPILER="$CC"
33046 
33047   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33048 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
33049   SYMLINK_ORIGINAL="$TEST_COMPILER"
33050 
33051   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33052     # Follow a chain of symbolic links. Use readlink
33053     # where it exists, else fall back to horribly
33054     # complicated shell code.
33055     if test "x$READLINK_TESTED" != yes; then
33056       # On MacOSX there is a readlink tool with a different
33057       # purpose than the GNU readlink tool. Check the found readlink.
33058       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33059       if test "x$ISGNU" = x; then
33060         # A readlink that we do not know how to use.
33061         # Are there other non-GNU readlinks out there?
33062         READLINK_TESTED=yes
33063         READLINK=
33064       fi
33065     fi
33066 
33067     if test "x$READLINK" != x; then
33068       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33069     else
33070       # Save the current directory for restoring afterwards
33071       STARTDIR=$PWD
33072       COUNTER=0
33073       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33074       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33075       cd $sym_link_dir
33076       # Use -P flag to resolve symlinks in directories.
33077       cd `$THEPWDCMD -P`
33078       sym_link_dir=`$THEPWDCMD -P`
33079       # Resolve file symlinks
33080       while test $COUNTER -lt 20; do
33081         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33082         if test "x$ISLINK" == x; then
33083           # This is not a symbolic link! We are done!
33084           break
33085         fi
33086         # Again resolve directory symlinks since the target of the just found
33087         # link could be in a different directory
33088         cd `$DIRNAME $ISLINK`
33089         sym_link_dir=`$THEPWDCMD -P`
33090         sym_link_file=`$BASENAME $ISLINK`
33091         let COUNTER=COUNTER+1
33092       done
33093       cd $STARTDIR
33094       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33095     fi
33096   fi
33097 
33098   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33099     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33100 $as_echo "no symlink" >&6; }
33101   else
33102     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33103 $as_echo "$SYMLINK_ORIGINAL" >&6; }
33104 
33105     # We can't handle ccache by gcc wrappers, since we need to know if we're
33106     # using ccache. Instead ccache usage must be controlled by a configure option.
33107     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33108     if test "x$COMPILER_BASENAME" = "xccache"; then
33109       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33110 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33111       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33112     fi
33113   fi
33114 
33115 
33116   COMPILER=$CC
33117   COMPILER_NAME=$COMPILER_NAME
33118 
33119   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33120     # cc -V output typically looks like
33121     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33122     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33123     # Check that this is likely to be the Solaris Studio cc.
33124     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33125     if test $? -ne 0; then
33126       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33127       { $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
33128 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33129       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33130 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33131       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33132 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33133       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33134     fi
33135     # Remove usage instructions (if present), and
33136     # collapse compiler output into a single line
33137     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33138         $SED -e 's/ *[Uu]sage:.*//'`
33139     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33140         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33141   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33142     # xlc -qversion output typically looks like
33143     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33144     #     Version: 11.01.0000.0015
33145     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33146     # Check that this is likely to be the IBM XL C compiler.
33147     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33148     if test $? -ne 0; then
33149       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33150       { $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
33151 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33152       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33153 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33154       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33155 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33156       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33157     fi
33158     # Collapse compiler output into a single line
33159     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33160     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33161         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33162   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33163     # There is no specific version flag, but all output starts with a version string.
33164     # First line typically looks something like:
33165     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33166     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33167     # Check that this is likely to be Microsoft CL.EXE.
33168     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33169     if test $? -ne 0; then
33170       { $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
33171 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33172       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33173 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33174       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33175     fi
33176     # Collapse compiler output into a single line
33177     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33178     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33179         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33180   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33181     # gcc --version output typically looks like
33182     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33183     #     Copyright (C) 2013 Free Software Foundation, Inc.
33184     #     This is free software; see the source for copying conditions.  There is NO
33185     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33186     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33187     # Check that this is likely to be GCC.
33188     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33189     if test $? -ne 0; then
33190       { $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
33191 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33192       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33193 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33194       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33195     fi
33196     # Remove Copyright and legalese from version string, and
33197     # collapse into a single line
33198     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33199         $SED -e 's/ *Copyright .*//'`
33200     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33201         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33202   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33203     # clang --version output typically looks like
33204     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33205     #    clang version 3.3 (tags/RELEASE_33/final)
33206     # or
33207     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33208     #    Target: x86_64-pc-linux-gnu
33209     #    Thread model: posix
33210     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33211     # Check that this is likely to be clang
33212     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33213     if test $? -ne 0; then
33214       { $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
33215 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33216       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33217 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33218       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33219     fi
33220     # Collapse compiler output into a single line
33221     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33222     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33223         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33224   else
33225       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33226   fi
33227   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33228   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33229   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33230   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33231 
33232   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33233 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33234 
33235 
33236   # Now that we have resolved CC ourself, let autoconf have its go at it
33237   ac_ext=c
33238 ac_cpp='$CPP $CPPFLAGS'
33239 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33240 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33241 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33242 if test -n "$ac_tool_prefix"; then
33243   for ac_prog in $CC
33244   do
33245     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33246 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33248 $as_echo_n "checking for $ac_word... " >&6; }
33249 if ${ac_cv_prog_CC+:} false; then :
33250   $as_echo_n "(cached) " >&6
33251 else
33252   if test -n "$CC"; then
33253   ac_cv_prog_CC="$CC" # Let the user override the test.
33254 else
33255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33256 for as_dir in $PATH
33257 do
33258   IFS=$as_save_IFS
33259   test -z "$as_dir" && as_dir=.
33260     for ac_exec_ext in '' $ac_executable_extensions; do
33261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33262     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33264     break 2
33265   fi
33266 done
33267   done
33268 IFS=$as_save_IFS
33269 
33270 fi
33271 fi
33272 CC=$ac_cv_prog_CC
33273 if test -n "$CC"; then
33274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33275 $as_echo "$CC" >&6; }
33276 else
33277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33278 $as_echo "no" >&6; }
33279 fi
33280 
33281 
33282     test -n "$CC" && break
33283   done
33284 fi
33285 if test -z "$CC"; then
33286   ac_ct_CC=$CC
33287   for ac_prog in $CC
33288 do
33289   # Extract the first word of "$ac_prog", so it can be a program name with args.
33290 set dummy $ac_prog; ac_word=$2
33291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33292 $as_echo_n "checking for $ac_word... " >&6; }
33293 if ${ac_cv_prog_ac_ct_CC+:} false; then :
33294   $as_echo_n "(cached) " >&6
33295 else
33296   if test -n "$ac_ct_CC"; then
33297   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33298 else
33299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33300 for as_dir in $PATH
33301 do
33302   IFS=$as_save_IFS
33303   test -z "$as_dir" && as_dir=.
33304     for ac_exec_ext in '' $ac_executable_extensions; do
33305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33306     ac_cv_prog_ac_ct_CC="$ac_prog"
33307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33308     break 2
33309   fi
33310 done
33311   done
33312 IFS=$as_save_IFS
33313 
33314 fi
33315 fi
33316 ac_ct_CC=$ac_cv_prog_ac_ct_CC
33317 if test -n "$ac_ct_CC"; then
33318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33319 $as_echo "$ac_ct_CC" >&6; }
33320 else
33321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33322 $as_echo "no" >&6; }
33323 fi
33324 
33325 
33326   test -n "$ac_ct_CC" && break
33327 done
33328 
33329   if test "x$ac_ct_CC" = x; then
33330     CC=""
33331   else
33332     case $cross_compiling:$ac_tool_warned in
33333 yes:)
33334 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33335 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33336 ac_tool_warned=yes ;;
33337 esac
33338     CC=$ac_ct_CC
33339   fi
33340 fi
33341 
33342 
33343 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33344 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33345 as_fn_error $? "no acceptable C compiler found in \$PATH
33346 See \`config.log' for more details" "$LINENO" 5; }
33347 
33348 # Provide some information about the compiler.
33349 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33350 set X $ac_compile
33351 ac_compiler=$2
33352 for ac_option in --version -v -V -qversion; do
33353   { { ac_try="$ac_compiler $ac_option >&5"
33354 case "(($ac_try" in
33355   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33356   *) ac_try_echo=$ac_try;;
33357 esac
33358 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33359 $as_echo "$ac_try_echo"; } >&5
33360   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33361   ac_status=$?
33362   if test -s conftest.err; then
33363     sed '10a\
33364 ... rest of stderr output deleted ...
33365          10q' conftest.err >conftest.er1
33366     cat conftest.er1 >&5
33367   fi
33368   rm -f conftest.er1 conftest.err
33369   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33370   test $ac_status = 0; }
33371 done
33372 
33373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33374 /* end confdefs.h.  */
33375 
33376 int
33377 main ()
33378 {
33379 
33380   ;
33381   return 0;
33382 }
33383 _ACEOF
33384 ac_clean_files_save=$ac_clean_files
33385 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33386 # Try to create an executable without -o first, disregard a.out.
33387 # It will help us diagnose broken compilers, and finding out an intuition
33388 # of exeext.
33389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33390 $as_echo_n "checking whether the C compiler works... " >&6; }
33391 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33392 
33393 # The possible output files:
33394 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33395 
33396 ac_rmfiles=
33397 for ac_file in $ac_files
33398 do
33399   case $ac_file in
33400     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33401     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33402   esac
33403 done
33404 rm -f $ac_rmfiles
33405 
33406 if { { ac_try="$ac_link_default"
33407 case "(($ac_try" in
33408   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33409   *) ac_try_echo=$ac_try;;
33410 esac
33411 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33412 $as_echo "$ac_try_echo"; } >&5
33413   (eval "$ac_link_default") 2>&5
33414   ac_status=$?
33415   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33416   test $ac_status = 0; }; then :
33417   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33418 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33419 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
33420 # so that the user can short-circuit this test for compilers unknown to
33421 # Autoconf.
33422 for ac_file in $ac_files ''
33423 do
33424   test -f "$ac_file" || continue
33425   case $ac_file in
33426     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33427         ;;
33428     [ab].out )
33429         # We found the default executable, but exeext='' is most
33430         # certainly right.
33431         break;;
33432     *.* )
33433         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33434         then :; else
33435            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33436         fi
33437         # We set ac_cv_exeext here because the later test for it is not
33438         # safe: cross compilers may not add the suffix if given an `-o'
33439         # argument, so we may need to know it at that point already.
33440         # Even if this section looks crufty: it has the advantage of
33441         # actually working.
33442         break;;
33443     * )
33444         break;;
33445   esac
33446 done
33447 test "$ac_cv_exeext" = no && ac_cv_exeext=
33448 
33449 else
33450   ac_file=''
33451 fi
33452 if test -z "$ac_file"; then :
33453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33454 $as_echo "no" >&6; }
33455 $as_echo "$as_me: failed program was:" >&5
33456 sed 's/^/| /' conftest.$ac_ext >&5
33457 
33458 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33459 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33460 as_fn_error 77 "C compiler cannot create executables
33461 See \`config.log' for more details" "$LINENO" 5; }
33462 else
33463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33464 $as_echo "yes" >&6; }
33465 fi
33466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33467 $as_echo_n "checking for C compiler default output file name... " >&6; }
33468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33469 $as_echo "$ac_file" >&6; }
33470 ac_exeext=$ac_cv_exeext
33471 
33472 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33473 ac_clean_files=$ac_clean_files_save
33474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33475 $as_echo_n "checking for suffix of executables... " >&6; }
33476 if { { ac_try="$ac_link"
33477 case "(($ac_try" in
33478   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33479   *) ac_try_echo=$ac_try;;
33480 esac
33481 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33482 $as_echo "$ac_try_echo"; } >&5
33483   (eval "$ac_link") 2>&5
33484   ac_status=$?
33485   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33486   test $ac_status = 0; }; then :
33487   # If both `conftest.exe' and `conftest' are `present' (well, observable)
33488 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33489 # work properly (i.e., refer to `conftest.exe'), while it won't with
33490 # `rm'.
33491 for ac_file in conftest.exe conftest conftest.*; do
33492   test -f "$ac_file" || continue
33493   case $ac_file in
33494     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33495     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33496           break;;
33497     * ) break;;
33498   esac
33499 done
33500 else
33501   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33502 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33503 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33504 See \`config.log' for more details" "$LINENO" 5; }
33505 fi
33506 rm -f conftest conftest$ac_cv_exeext
33507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33508 $as_echo "$ac_cv_exeext" >&6; }
33509 
33510 rm -f conftest.$ac_ext
33511 EXEEXT=$ac_cv_exeext
33512 ac_exeext=$EXEEXT
33513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33514 /* end confdefs.h.  */
33515 #include <stdio.h>
33516 int
33517 main ()
33518 {
33519 FILE *f = fopen ("conftest.out", "w");
33520  return ferror (f) || fclose (f) != 0;
33521 
33522   ;
33523   return 0;
33524 }
33525 _ACEOF
33526 ac_clean_files="$ac_clean_files conftest.out"
33527 # Check that the compiler produces executables we can run.  If not, either
33528 # the compiler is broken, or we cross compile.
33529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33530 $as_echo_n "checking whether we are cross compiling... " >&6; }
33531 if test "$cross_compiling" != yes; then
33532   { { ac_try="$ac_link"
33533 case "(($ac_try" in
33534   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33535   *) ac_try_echo=$ac_try;;
33536 esac
33537 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33538 $as_echo "$ac_try_echo"; } >&5
33539   (eval "$ac_link") 2>&5
33540   ac_status=$?
33541   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33542   test $ac_status = 0; }
33543   if { ac_try='./conftest$ac_cv_exeext'
33544   { { case "(($ac_try" in
33545   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33546   *) ac_try_echo=$ac_try;;
33547 esac
33548 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33549 $as_echo "$ac_try_echo"; } >&5
33550   (eval "$ac_try") 2>&5
33551   ac_status=$?
33552   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33553   test $ac_status = 0; }; }; then
33554     cross_compiling=no
33555   else
33556     if test "$cross_compiling" = maybe; then
33557         cross_compiling=yes
33558     else
33559         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33560 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33561 as_fn_error $? "cannot run C compiled programs.
33562 If you meant to cross compile, use \`--host'.
33563 See \`config.log' for more details" "$LINENO" 5; }
33564     fi
33565   fi
33566 fi
33567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33568 $as_echo "$cross_compiling" >&6; }
33569 
33570 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33571 ac_clean_files=$ac_clean_files_save
33572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33573 $as_echo_n "checking for suffix of object files... " >&6; }
33574 if ${ac_cv_objext+:} false; then :
33575   $as_echo_n "(cached) " >&6
33576 else
33577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33578 /* end confdefs.h.  */
33579 
33580 int
33581 main ()
33582 {
33583 
33584   ;
33585   return 0;
33586 }
33587 _ACEOF
33588 rm -f conftest.o conftest.obj
33589 if { { ac_try="$ac_compile"
33590 case "(($ac_try" in
33591   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33592   *) ac_try_echo=$ac_try;;
33593 esac
33594 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33595 $as_echo "$ac_try_echo"; } >&5
33596   (eval "$ac_compile") 2>&5
33597   ac_status=$?
33598   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33599   test $ac_status = 0; }; then :
33600   for ac_file in conftest.o conftest.obj conftest.*; do
33601   test -f "$ac_file" || continue;
33602   case $ac_file in
33603     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33604     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33605        break;;
33606   esac
33607 done
33608 else
33609   $as_echo "$as_me: failed program was:" >&5
33610 sed 's/^/| /' conftest.$ac_ext >&5
33611 
33612 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33613 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33614 as_fn_error $? "cannot compute suffix of object files: cannot compile
33615 See \`config.log' for more details" "$LINENO" 5; }
33616 fi
33617 rm -f conftest.$ac_cv_objext conftest.$ac_ext
33618 fi
33619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33620 $as_echo "$ac_cv_objext" >&6; }
33621 OBJEXT=$ac_cv_objext
33622 ac_objext=$OBJEXT
33623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33624 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33625 if ${ac_cv_c_compiler_gnu+:} false; then :
33626   $as_echo_n "(cached) " >&6
33627 else
33628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33629 /* end confdefs.h.  */
33630 
33631 int
33632 main ()
33633 {
33634 #ifndef __GNUC__
33635        choke me
33636 #endif
33637 
33638   ;
33639   return 0;
33640 }
33641 _ACEOF
33642 if ac_fn_c_try_compile "$LINENO"; then :
33643   ac_compiler_gnu=yes
33644 else
33645   ac_compiler_gnu=no
33646 fi
33647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33648 ac_cv_c_compiler_gnu=$ac_compiler_gnu
33649 
33650 fi
33651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33652 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
33653 if test $ac_compiler_gnu = yes; then
33654   GCC=yes
33655 else
33656   GCC=
33657 fi
33658 ac_test_CFLAGS=${CFLAGS+set}
33659 ac_save_CFLAGS=$CFLAGS
33660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33661 $as_echo_n "checking whether $CC accepts -g... " >&6; }
33662 if ${ac_cv_prog_cc_g+:} false; then :
33663   $as_echo_n "(cached) " >&6
33664 else
33665   ac_save_c_werror_flag=$ac_c_werror_flag
33666    ac_c_werror_flag=yes
33667    ac_cv_prog_cc_g=no
33668    CFLAGS="-g"
33669    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33670 /* end confdefs.h.  */
33671 
33672 int
33673 main ()
33674 {
33675 
33676   ;
33677   return 0;
33678 }
33679 _ACEOF
33680 if ac_fn_c_try_compile "$LINENO"; then :
33681   ac_cv_prog_cc_g=yes
33682 else
33683   CFLAGS=""
33684       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33685 /* end confdefs.h.  */
33686 
33687 int
33688 main ()
33689 {
33690 
33691   ;
33692   return 0;
33693 }
33694 _ACEOF
33695 if ac_fn_c_try_compile "$LINENO"; then :
33696 
33697 else
33698   ac_c_werror_flag=$ac_save_c_werror_flag
33699          CFLAGS="-g"
33700          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33701 /* end confdefs.h.  */
33702 
33703 int
33704 main ()
33705 {
33706 
33707   ;
33708   return 0;
33709 }
33710 _ACEOF
33711 if ac_fn_c_try_compile "$LINENO"; then :
33712   ac_cv_prog_cc_g=yes
33713 fi
33714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33715 fi
33716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33717 fi
33718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33719    ac_c_werror_flag=$ac_save_c_werror_flag
33720 fi
33721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33722 $as_echo "$ac_cv_prog_cc_g" >&6; }
33723 if test "$ac_test_CFLAGS" = set; then
33724   CFLAGS=$ac_save_CFLAGS
33725 elif test $ac_cv_prog_cc_g = yes; then
33726   if test "$GCC" = yes; then
33727     CFLAGS="-g -O2"
33728   else
33729     CFLAGS="-g"
33730   fi
33731 else
33732   if test "$GCC" = yes; then
33733     CFLAGS="-O2"
33734   else
33735     CFLAGS=
33736   fi
33737 fi
33738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33739 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33740 if ${ac_cv_prog_cc_c89+:} false; then :
33741   $as_echo_n "(cached) " >&6
33742 else
33743   ac_cv_prog_cc_c89=no
33744 ac_save_CC=$CC
33745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33746 /* end confdefs.h.  */
33747 #include <stdarg.h>
33748 #include <stdio.h>
33749 struct stat;
33750 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33751 struct buf { int x; };
33752 FILE * (*rcsopen) (struct buf *, struct stat *, int);
33753 static char *e (p, i)
33754      char **p;
33755      int i;
33756 {
33757   return p[i];
33758 }
33759 static char *f (char * (*g) (char **, int), char **p, ...)
33760 {
33761   char *s;
33762   va_list v;
33763   va_start (v,p);
33764   s = g (p, va_arg (v,int));
33765   va_end (v);
33766   return s;
33767 }
33768 
33769 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33770    function prototypes and stuff, but not '\xHH' hex character constants.
33771    These don't provoke an error unfortunately, instead are silently treated
33772    as 'x'.  The following induces an error, until -std is added to get
33773    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33774    array size at least.  It's necessary to write '\x00'==0 to get something
33775    that's true only with -std.  */
33776 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33777 
33778 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33779    inside strings and character constants.  */
33780 #define FOO(x) 'x'
33781 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33782 
33783 int test (int i, double x);
33784 struct s1 {int (*f) (int a);};
33785 struct s2 {int (*f) (double a);};
33786 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33787 int argc;
33788 char **argv;
33789 int
33790 main ()
33791 {
33792 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33793   ;
33794   return 0;
33795 }
33796 _ACEOF
33797 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33798         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33799 do
33800   CC="$ac_save_CC $ac_arg"
33801   if ac_fn_c_try_compile "$LINENO"; then :
33802   ac_cv_prog_cc_c89=$ac_arg
33803 fi
33804 rm -f core conftest.err conftest.$ac_objext
33805   test "x$ac_cv_prog_cc_c89" != "xno" && break
33806 done
33807 rm -f conftest.$ac_ext
33808 CC=$ac_save_CC
33809 
33810 fi
33811 # AC_CACHE_VAL
33812 case "x$ac_cv_prog_cc_c89" in
33813   x)
33814     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33815 $as_echo "none needed" >&6; } ;;
33816   xno)
33817     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33818 $as_echo "unsupported" >&6; } ;;
33819   *)
33820     CC="$CC $ac_cv_prog_cc_c89"
33821     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33822 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33823 esac
33824 if test "x$ac_cv_prog_cc_c89" != xno; then :
33825 
33826 fi
33827 
33828 ac_ext=cpp
33829 ac_cpp='$CXXCPP $CPPFLAGS'
33830 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33831 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33832 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33833 
33834 
33835 
33836   COMPILER_NAME=C++
33837   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33838 
33839   if test "x$CXX" != x; then
33840     # User has supplied compiler name already, always let that override.
33841     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33842 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33843     if test "x`basename $CXX`" = "x$CXX"; then
33844       # A command without a complete path is provided, search $PATH.
33845 
33846       for ac_prog in $CXX
33847 do
33848   # Extract the first word of "$ac_prog", so it can be a program name with args.
33849 set dummy $ac_prog; ac_word=$2
33850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33851 $as_echo_n "checking for $ac_word... " >&6; }
33852 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33853   $as_echo_n "(cached) " >&6
33854 else
33855   case $POTENTIAL_CXX in
33856   [\\/]* | ?:[\\/]*)
33857   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33858   ;;
33859   *)
33860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33861 for as_dir in $PATH
33862 do
33863   IFS=$as_save_IFS
33864   test -z "$as_dir" && as_dir=.
33865     for ac_exec_ext in '' $ac_executable_extensions; do
33866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33867     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33869     break 2
33870   fi
33871 done
33872   done
33873 IFS=$as_save_IFS
33874 
33875   ;;
33876 esac
33877 fi
33878 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33879 if test -n "$POTENTIAL_CXX"; then
33880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33881 $as_echo "$POTENTIAL_CXX" >&6; }
33882 else
33883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33884 $as_echo "no" >&6; }
33885 fi
33886 
33887 
33888   test -n "$POTENTIAL_CXX" && break
33889 done
33890 
33891       if test "x$POTENTIAL_CXX" != x; then
33892         CXX=$POTENTIAL_CXX
33893       else
33894         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33895       fi
33896     else
33897       # Otherwise it might already be a complete path
33898       if test ! -x "$CXX"; then
33899         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33900       fi
33901     fi
33902   else
33903     # No user supplied value. Locate compiler ourselves.
33904 
33905     # If we are cross compiling, assume cross compilation tools follows the
33906     # cross compilation standard where they are prefixed with the autoconf
33907     # standard name for the target. For example the binary
33908     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33909     # If we are not cross compiling, then the default compiler name will be
33910     # used.
33911 
33912     CXX=
33913     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33914     # before checking the rest of the PATH.
33915     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33916     # step, this should not be necessary.
33917     if test -n "$TOOLCHAIN_PATH"; then
33918       PATH_save="$PATH"
33919       PATH="$TOOLCHAIN_PATH"
33920       for ac_prog in $SEARCH_LIST
33921 do
33922   # Extract the first word of "$ac_prog", so it can be a program name with args.
33923 set dummy $ac_prog; ac_word=$2
33924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33925 $as_echo_n "checking for $ac_word... " >&6; }
33926 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33927   $as_echo_n "(cached) " >&6
33928 else
33929   case $TOOLCHAIN_PATH_CXX in
33930   [\\/]* | ?:[\\/]*)
33931   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33932   ;;
33933   *)
33934   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33935 for as_dir in $PATH
33936 do
33937   IFS=$as_save_IFS
33938   test -z "$as_dir" && as_dir=.
33939     for ac_exec_ext in '' $ac_executable_extensions; do
33940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33941     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33943     break 2
33944   fi
33945 done
33946   done
33947 IFS=$as_save_IFS
33948 
33949   ;;
33950 esac
33951 fi
33952 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33953 if test -n "$TOOLCHAIN_PATH_CXX"; then
33954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33955 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33956 else
33957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33958 $as_echo "no" >&6; }
33959 fi
33960 
33961 
33962   test -n "$TOOLCHAIN_PATH_CXX" && break
33963 done
33964 
33965       CXX=$TOOLCHAIN_PATH_CXX
33966       PATH="$PATH_save"
33967     fi
33968 
33969     # AC_PATH_PROGS can't be run multiple times with the same variable,
33970     # so create a new name for this run.
33971     if test "x$CXX" = x; then
33972       for ac_prog in $SEARCH_LIST
33973 do
33974   # Extract the first word of "$ac_prog", so it can be a program name with args.
33975 set dummy $ac_prog; ac_word=$2
33976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33977 $as_echo_n "checking for $ac_word... " >&6; }
33978 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33979   $as_echo_n "(cached) " >&6
33980 else
33981   case $POTENTIAL_CXX in
33982   [\\/]* | ?:[\\/]*)
33983   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33984   ;;
33985   *)
33986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33987 for as_dir in $PATH
33988 do
33989   IFS=$as_save_IFS
33990   test -z "$as_dir" && as_dir=.
33991     for ac_exec_ext in '' $ac_executable_extensions; do
33992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33993     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33995     break 2
33996   fi
33997 done
33998   done
33999 IFS=$as_save_IFS
34000 
34001   ;;
34002 esac
34003 fi
34004 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34005 if test -n "$POTENTIAL_CXX"; then
34006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34007 $as_echo "$POTENTIAL_CXX" >&6; }
34008 else
34009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34010 $as_echo "no" >&6; }
34011 fi
34012 
34013 
34014   test -n "$POTENTIAL_CXX" && break
34015 done
34016 
34017       CXX=$POTENTIAL_CXX
34018     fi
34019 
34020     if test "x$CXX" = x; then
34021 
34022   # Print a helpful message on how to acquire the necessary build dependency.
34023   # devkit is the help tag: freetype, cups, alsa etc
34024   MISSING_DEPENDENCY=devkit
34025 
34026   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34027     cygwin_help $MISSING_DEPENDENCY
34028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34029     msys_help $MISSING_DEPENDENCY
34030   else
34031     PKGHANDLER_COMMAND=
34032 
34033     case $PKGHANDLER in
34034       apt-get)
34035         apt_help     $MISSING_DEPENDENCY ;;
34036       yum)
34037         yum_help     $MISSING_DEPENDENCY ;;
34038       port)
34039         port_help    $MISSING_DEPENDENCY ;;
34040       pkgutil)
34041         pkgutil_help $MISSING_DEPENDENCY ;;
34042       pkgadd)
34043         pkgadd_help  $MISSING_DEPENDENCY ;;
34044     esac
34045 
34046     if test "x$PKGHANDLER_COMMAND" != x; then
34047       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34048     fi
34049   fi
34050 
34051       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34052     fi
34053   fi
34054 
34055   # Now we have a compiler binary in CXX. Make sure it's okay.
34056 
34057   # Only process if variable expands to non-empty
34058 
34059   if test "x$CXX" != x; then
34060     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34061 
34062   # First separate the path from the arguments. This will split at the first
34063   # space.
34064   complete="$CXX"
34065   path="${complete%% *}"
34066   tmp="$complete EOL"
34067   arguments="${tmp#* }"
34068 
34069   # Input might be given as Windows format, start by converting to
34070   # unix format.
34071   new_path=`$CYGPATH -u "$path"`
34072 
34073   # Now try to locate executable using which
34074   new_path=`$WHICH "$new_path" 2> /dev/null`
34075   # bat and cmd files are not always considered executable in cygwin causing which
34076   # to not find them
34077   if test "x$new_path" = x \
34078       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34079       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34080     new_path=`$CYGPATH -u "$path"`
34081   fi
34082   if test "x$new_path" = x; then
34083     # Oops. Which didn't find the executable.
34084     # The splitting of arguments from the executable at a space might have been incorrect,
34085     # since paths with space are more likely in Windows. Give it another try with the whole
34086     # argument.
34087     path="$complete"
34088     arguments="EOL"
34089     new_path=`$CYGPATH -u "$path"`
34090     new_path=`$WHICH "$new_path" 2> /dev/null`
34091     # bat and cmd files are not always considered executable in cygwin causing which
34092     # to not find them
34093     if test "x$new_path" = x \
34094         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34095         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34096       new_path=`$CYGPATH -u "$path"`
34097     fi
34098     if test "x$new_path" = x; then
34099       # It's still not found. Now this is an unrecoverable error.
34100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34101 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34102       has_space=`$ECHO "$complete" | $GREP " "`
34103       if test "x$has_space" != x; then
34104         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34105 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34106       fi
34107       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34108     fi
34109   fi
34110 
34111   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34112   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34113   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34114   # "foo.exe" is OK but "foo" is an error.
34115   #
34116   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34117   # It is also a way to make sure we got the proper file name for the real test later on.
34118   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34119   if test "x$test_shortpath" = x; then
34120     # Short path failed, file does not exist as specified.
34121     # Try adding .exe or .cmd
34122     if test -f "${new_path}.exe"; then
34123       input_to_shortpath="${new_path}.exe"
34124     elif test -f "${new_path}.cmd"; then
34125       input_to_shortpath="${new_path}.cmd"
34126     else
34127       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34128 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34129       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34130 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34131       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34132     fi
34133   else
34134     input_to_shortpath="$new_path"
34135   fi
34136 
34137   # Call helper function which possibly converts this using DOS-style short mode.
34138   # If so, the updated path is stored in $new_path.
34139   new_path="$input_to_shortpath"
34140 
34141   input_path="$input_to_shortpath"
34142   # Check if we need to convert this using DOS-style short mode. If the path
34143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34144   # take no chances and rewrite it.
34145   # Note: m4 eats our [], so we need to use [ and ] instead.
34146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34147   if test "x$has_forbidden_chars" != x; then
34148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34149     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34150     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34151     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34152       # Going to short mode and back again did indeed matter. Since short mode is
34153       # case insensitive, let's make it lowercase to improve readability.
34154       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34155       # Now convert it back to Unix-style (cygpath)
34156       input_path=`$CYGPATH -u "$shortmode_path"`
34157       new_path="$input_path"
34158     fi
34159   fi
34160 
34161   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34162   if test "x$test_cygdrive_prefix" = x; then
34163     # As a simple fix, exclude /usr/bin since it's not a real path.
34164     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34165       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34166       # a path prefixed by /cygdrive for fixpath to work.
34167       new_path="$CYGWIN_ROOT_PATH$input_path"
34168     fi
34169   fi
34170 
34171   # remove trailing .exe if any
34172   new_path="${new_path/%.exe/}"
34173 
34174     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34175 
34176   # First separate the path from the arguments. This will split at the first
34177   # space.
34178   complete="$CXX"
34179   path="${complete%% *}"
34180   tmp="$complete EOL"
34181   arguments="${tmp#* }"
34182 
34183   # Input might be given as Windows format, start by converting to
34184   # unix format.
34185   new_path="$path"
34186 
34187   windows_path="$new_path"
34188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34189     unix_path=`$CYGPATH -u "$windows_path"`
34190     new_path="$unix_path"
34191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34193     new_path="$unix_path"
34194   fi
34195 
34196 
34197   # Now try to locate executable using which
34198   new_path=`$WHICH "$new_path" 2> /dev/null`
34199 
34200   if test "x$new_path" = x; then
34201     # Oops. Which didn't find the executable.
34202     # The splitting of arguments from the executable at a space might have been incorrect,
34203     # since paths with space are more likely in Windows. Give it another try with the whole
34204     # argument.
34205     path="$complete"
34206     arguments="EOL"
34207     new_path="$path"
34208 
34209   windows_path="$new_path"
34210   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34211     unix_path=`$CYGPATH -u "$windows_path"`
34212     new_path="$unix_path"
34213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34214     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34215     new_path="$unix_path"
34216   fi
34217 
34218 
34219     new_path=`$WHICH "$new_path" 2> /dev/null`
34220     # bat and cmd files are not always considered executable in MSYS causing which
34221     # to not find them
34222     if test "x$new_path" = x \
34223         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34224         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34225       new_path="$path"
34226 
34227   windows_path="$new_path"
34228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34229     unix_path=`$CYGPATH -u "$windows_path"`
34230     new_path="$unix_path"
34231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34232     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34233     new_path="$unix_path"
34234   fi
34235 
34236     fi
34237 
34238     if test "x$new_path" = x; then
34239       # It's still not found. Now this is an unrecoverable error.
34240       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34241 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34242       has_space=`$ECHO "$complete" | $GREP " "`
34243       if test "x$has_space" != x; then
34244         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34245 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34246       fi
34247       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34248     fi
34249   fi
34250 
34251   # Now new_path has a complete unix path to the binary
34252   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34253     # Keep paths in /bin as-is, but remove trailing .exe if any
34254     new_path="${new_path/%.exe/}"
34255     # Do not save /bin paths to all_fixpath_prefixes!
34256   else
34257     # Not in mixed or Windows style, start by that.
34258     new_path=`cmd //c echo $new_path`
34259 
34260   input_path="$new_path"
34261   # Check if we need to convert this using DOS-style short mode. If the path
34262   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34263   # take no chances and rewrite it.
34264   # Note: m4 eats our [], so we need to use [ and ] instead.
34265   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34266   if test "x$has_forbidden_chars" != x; then
34267     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34268     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34269   fi
34270 
34271     # Output is in $new_path
34272 
34273   windows_path="$new_path"
34274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34275     unix_path=`$CYGPATH -u "$windows_path"`
34276     new_path="$unix_path"
34277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34279     new_path="$unix_path"
34280   fi
34281 
34282     # remove trailing .exe if any
34283     new_path="${new_path/%.exe/}"
34284 
34285     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34286     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34287   fi
34288 
34289     else
34290       # We're on a unix platform. Hooray! :)
34291       # First separate the path from the arguments. This will split at the first
34292       # space.
34293       complete="$CXX"
34294       path="${complete%% *}"
34295       tmp="$complete EOL"
34296       arguments="${tmp#* }"
34297 
34298       # Cannot rely on the command "which" here since it doesn't always work.
34299       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34300       if test -z "$is_absolute_path"; then
34301         # Path to executable is not absolute. Find it.
34302         IFS_save="$IFS"
34303         IFS=:
34304         for p in $PATH; do
34305           if test -f "$p/$path" && test -x "$p/$path"; then
34306             new_path="$p/$path"
34307             break
34308           fi
34309         done
34310         IFS="$IFS_save"
34311       else
34312         # This is an absolute path, we can use it without further modifications.
34313         new_path="$path"
34314       fi
34315 
34316       if test "x$new_path" = x; then
34317         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34318 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34319         has_space=`$ECHO "$complete" | $GREP " "`
34320         if test "x$has_space" != x; then
34321           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34322 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34323         fi
34324         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34325       fi
34326     fi
34327 
34328     # Now join together the path and the arguments once again
34329     if test "x$arguments" != xEOL; then
34330       new_complete="$new_path ${arguments% *}"
34331     else
34332       new_complete="$new_path"
34333     fi
34334 
34335     if test "x$complete" != "x$new_complete"; then
34336       CXX="$new_complete"
34337       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34338 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34339     fi
34340   fi
34341 
34342   TEST_COMPILER="$CXX"
34343 
34344   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34345 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34346   SYMLINK_ORIGINAL="$TEST_COMPILER"
34347 
34348   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34349     # Follow a chain of symbolic links. Use readlink
34350     # where it exists, else fall back to horribly
34351     # complicated shell code.
34352     if test "x$READLINK_TESTED" != yes; then
34353       # On MacOSX there is a readlink tool with a different
34354       # purpose than the GNU readlink tool. Check the found readlink.
34355       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34356       if test "x$ISGNU" = x; then
34357         # A readlink that we do not know how to use.
34358         # Are there other non-GNU readlinks out there?
34359         READLINK_TESTED=yes
34360         READLINK=
34361       fi
34362     fi
34363 
34364     if test "x$READLINK" != x; then
34365       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34366     else
34367       # Save the current directory for restoring afterwards
34368       STARTDIR=$PWD
34369       COUNTER=0
34370       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34371       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34372       cd $sym_link_dir
34373       # Use -P flag to resolve symlinks in directories.
34374       cd `$THEPWDCMD -P`
34375       sym_link_dir=`$THEPWDCMD -P`
34376       # Resolve file symlinks
34377       while test $COUNTER -lt 20; do
34378         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34379         if test "x$ISLINK" == x; then
34380           # This is not a symbolic link! We are done!
34381           break
34382         fi
34383         # Again resolve directory symlinks since the target of the just found
34384         # link could be in a different directory
34385         cd `$DIRNAME $ISLINK`
34386         sym_link_dir=`$THEPWDCMD -P`
34387         sym_link_file=`$BASENAME $ISLINK`
34388         let COUNTER=COUNTER+1
34389       done
34390       cd $STARTDIR
34391       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34392     fi
34393   fi
34394 
34395   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34396     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34397 $as_echo "no symlink" >&6; }
34398   else
34399     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34400 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34401 
34402     # We can't handle ccache by gcc wrappers, since we need to know if we're
34403     # using ccache. Instead ccache usage must be controlled by a configure option.
34404     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34405     if test "x$COMPILER_BASENAME" = "xccache"; then
34406       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34407 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34408       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34409     fi
34410   fi
34411 
34412 
34413   COMPILER=$CXX
34414   COMPILER_NAME=$COMPILER_NAME
34415 
34416   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34417     # cc -V output typically looks like
34418     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34419     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34420     # Check that this is likely to be the Solaris Studio cc.
34421     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34422     if test $? -ne 0; then
34423       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34424       { $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
34425 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34426       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34427 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34428       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34429 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34430       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34431     fi
34432     # Remove usage instructions (if present), and
34433     # collapse compiler output into a single line
34434     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34435         $SED -e 's/ *[Uu]sage:.*//'`
34436     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34437         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34438   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34439     # xlc -qversion output typically looks like
34440     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34441     #     Version: 11.01.0000.0015
34442     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34443     # Check that this is likely to be the IBM XL C compiler.
34444     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34445     if test $? -ne 0; then
34446       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34447       { $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
34448 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34449       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34450 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34451       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34452 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34453       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34454     fi
34455     # Collapse compiler output into a single line
34456     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34457     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34458         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34459   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34460     # There is no specific version flag, but all output starts with a version string.
34461     # First line typically looks something like:
34462     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34463     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34464     # Check that this is likely to be Microsoft CL.EXE.
34465     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34466     if test $? -ne 0; then
34467       { $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
34468 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34469       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34470 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34471       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34472     fi
34473     # Collapse compiler output into a single line
34474     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34475     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34476         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34477   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34478     # gcc --version output typically looks like
34479     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34480     #     Copyright (C) 2013 Free Software Foundation, Inc.
34481     #     This is free software; see the source for copying conditions.  There is NO
34482     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34483     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34484     # Check that this is likely to be GCC.
34485     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34486     if test $? -ne 0; then
34487       { $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
34488 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34489       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34490 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34491       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34492     fi
34493     # Remove Copyright and legalese from version string, and
34494     # collapse into a single line
34495     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34496         $SED -e 's/ *Copyright .*//'`
34497     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34498         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34499   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34500     # clang --version output typically looks like
34501     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34502     #    clang version 3.3 (tags/RELEASE_33/final)
34503     # or
34504     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34505     #    Target: x86_64-pc-linux-gnu
34506     #    Thread model: posix
34507     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34508     # Check that this is likely to be clang
34509     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34510     if test $? -ne 0; then
34511       { $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
34512 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34513       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34514 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34515       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34516     fi
34517     # Collapse compiler output into a single line
34518     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34519     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34520         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34521   else
34522       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34523   fi
34524   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34525   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34526   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34527   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34528 
34529   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34530 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34531 
34532 
34533   # Now that we have resolved CXX ourself, let autoconf have its go at it
34534   ac_ext=cpp
34535 ac_cpp='$CXXCPP $CPPFLAGS'
34536 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34537 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34538 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34539 if test -z "$CXX"; then
34540   if test -n "$CCC"; then
34541     CXX=$CCC
34542   else
34543     if test -n "$ac_tool_prefix"; then
34544   for ac_prog in $CXX
34545   do
34546     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34547 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34549 $as_echo_n "checking for $ac_word... " >&6; }
34550 if ${ac_cv_prog_CXX+:} false; then :
34551   $as_echo_n "(cached) " >&6
34552 else
34553   if test -n "$CXX"; then
34554   ac_cv_prog_CXX="$CXX" # Let the user override the test.
34555 else
34556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34557 for as_dir in $PATH
34558 do
34559   IFS=$as_save_IFS
34560   test -z "$as_dir" && as_dir=.
34561     for ac_exec_ext in '' $ac_executable_extensions; do
34562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34563     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34565     break 2
34566   fi
34567 done
34568   done
34569 IFS=$as_save_IFS
34570 
34571 fi
34572 fi
34573 CXX=$ac_cv_prog_CXX
34574 if test -n "$CXX"; then
34575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34576 $as_echo "$CXX" >&6; }
34577 else
34578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34579 $as_echo "no" >&6; }
34580 fi
34581 
34582 
34583     test -n "$CXX" && break
34584   done
34585 fi
34586 if test -z "$CXX"; then
34587   ac_ct_CXX=$CXX
34588   for ac_prog in $CXX
34589 do
34590   # Extract the first word of "$ac_prog", so it can be a program name with args.
34591 set dummy $ac_prog; ac_word=$2
34592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34593 $as_echo_n "checking for $ac_word... " >&6; }
34594 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34595   $as_echo_n "(cached) " >&6
34596 else
34597   if test -n "$ac_ct_CXX"; then
34598   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34599 else
34600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34601 for as_dir in $PATH
34602 do
34603   IFS=$as_save_IFS
34604   test -z "$as_dir" && as_dir=.
34605     for ac_exec_ext in '' $ac_executable_extensions; do
34606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34607     ac_cv_prog_ac_ct_CXX="$ac_prog"
34608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34609     break 2
34610   fi
34611 done
34612   done
34613 IFS=$as_save_IFS
34614 
34615 fi
34616 fi
34617 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34618 if test -n "$ac_ct_CXX"; then
34619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34620 $as_echo "$ac_ct_CXX" >&6; }
34621 else
34622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34623 $as_echo "no" >&6; }
34624 fi
34625 
34626 
34627   test -n "$ac_ct_CXX" && break
34628 done
34629 
34630   if test "x$ac_ct_CXX" = x; then
34631     CXX="g++"
34632   else
34633     case $cross_compiling:$ac_tool_warned in
34634 yes:)
34635 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34636 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34637 ac_tool_warned=yes ;;
34638 esac
34639     CXX=$ac_ct_CXX
34640   fi
34641 fi
34642 
34643   fi
34644 fi
34645 # Provide some information about the compiler.
34646 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34647 set X $ac_compile
34648 ac_compiler=$2
34649 for ac_option in --version -v -V -qversion; do
34650   { { ac_try="$ac_compiler $ac_option >&5"
34651 case "(($ac_try" in
34652   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34653   *) ac_try_echo=$ac_try;;
34654 esac
34655 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34656 $as_echo "$ac_try_echo"; } >&5
34657   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34658   ac_status=$?
34659   if test -s conftest.err; then
34660     sed '10a\
34661 ... rest of stderr output deleted ...
34662          10q' conftest.err >conftest.er1
34663     cat conftest.er1 >&5
34664   fi
34665   rm -f conftest.er1 conftest.err
34666   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34667   test $ac_status = 0; }
34668 done
34669 
34670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34671 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34672 if ${ac_cv_cxx_compiler_gnu+:} false; then :
34673   $as_echo_n "(cached) " >&6
34674 else
34675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34676 /* end confdefs.h.  */
34677 
34678 int
34679 main ()
34680 {
34681 #ifndef __GNUC__
34682        choke me
34683 #endif
34684 
34685   ;
34686   return 0;
34687 }
34688 _ACEOF
34689 if ac_fn_cxx_try_compile "$LINENO"; then :
34690   ac_compiler_gnu=yes
34691 else
34692   ac_compiler_gnu=no
34693 fi
34694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34695 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34696 
34697 fi
34698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34699 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34700 if test $ac_compiler_gnu = yes; then
34701   GXX=yes
34702 else
34703   GXX=
34704 fi
34705 ac_test_CXXFLAGS=${CXXFLAGS+set}
34706 ac_save_CXXFLAGS=$CXXFLAGS
34707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34708 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
34709 if ${ac_cv_prog_cxx_g+:} false; then :
34710   $as_echo_n "(cached) " >&6
34711 else
34712   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34713    ac_cxx_werror_flag=yes
34714    ac_cv_prog_cxx_g=no
34715    CXXFLAGS="-g"
34716    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34717 /* end confdefs.h.  */
34718 
34719 int
34720 main ()
34721 {
34722 
34723   ;
34724   return 0;
34725 }
34726 _ACEOF
34727 if ac_fn_cxx_try_compile "$LINENO"; then :
34728   ac_cv_prog_cxx_g=yes
34729 else
34730   CXXFLAGS=""
34731       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34732 /* end confdefs.h.  */
34733 
34734 int
34735 main ()
34736 {
34737 
34738   ;
34739   return 0;
34740 }
34741 _ACEOF
34742 if ac_fn_cxx_try_compile "$LINENO"; then :
34743 
34744 else
34745   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34746          CXXFLAGS="-g"
34747          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34748 /* end confdefs.h.  */
34749 
34750 int
34751 main ()
34752 {
34753 
34754   ;
34755   return 0;
34756 }
34757 _ACEOF
34758 if ac_fn_cxx_try_compile "$LINENO"; then :
34759   ac_cv_prog_cxx_g=yes
34760 fi
34761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34762 fi
34763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34764 fi
34765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34766    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34767 fi
34768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34769 $as_echo "$ac_cv_prog_cxx_g" >&6; }
34770 if test "$ac_test_CXXFLAGS" = set; then
34771   CXXFLAGS=$ac_save_CXXFLAGS
34772 elif test $ac_cv_prog_cxx_g = yes; then
34773   if test "$GXX" = yes; then
34774     CXXFLAGS="-g -O2"
34775   else
34776     CXXFLAGS="-g"
34777   fi
34778 else
34779   if test "$GXX" = yes; then
34780     CXXFLAGS="-O2"
34781   else
34782     CXXFLAGS=
34783   fi
34784 fi
34785 ac_ext=cpp
34786 ac_cpp='$CXXCPP $CPPFLAGS'
34787 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34788 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34789 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34790 
34791 
34792   # This is the compiler version number on the form X.Y[.Z]
34793 
34794 
34795 
34796 
34797   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34798     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34799 $as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34800     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34801 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34802   fi
34803 
34804   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34805   if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34806     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34807 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34808   fi
34809 
34810   if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34811     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34812 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34813   fi
34814 
34815   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34816 
34817 
34818   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34819 
34820 
34821 
34822 
34823 
34824 
34825 
34826 
34827 
34828 
34829 
34830 
34831 
34832 
34833 
34834 
34835 
34836 
34837 
34838 
34839 
34840 
34841 
34842 
34843 
34844 
34845 
34846 
34847 
34848 
34849 
34850 
34851 
34852 
34853 
34854 
34855 
34856 
34857 
34858 
34859 
34860 
34861     # Execute function body
34862 
34863   # Need to assign to a variable since m4 is blocked from modifying parts in [].
34864   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34865 
34866   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34867     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34868   fi
34869 
34870   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34871     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34872   fi
34873 
34874   # Version comparison method inspired by http://stackoverflow.com/a/24067243
34875   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34876 
34877   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34878     :
34879 
34880   else
34881     :
34882 
34883           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
34884 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34885 
34886 
34887   fi
34888 
34889 
34890 
34891 
34892 
34893 
34894 
34895 
34896 
34897 
34898 
34899 
34900   fi
34901 
34902   #
34903   # Setup the preprocessor (CPP and CXXCPP)
34904   #
34905   ac_ext=c
34906 ac_cpp='$CPP $CPPFLAGS'
34907 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34908 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34909 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34911 $as_echo_n "checking how to run the C preprocessor... " >&6; }
34912 # On Suns, sometimes $CPP names a directory.
34913 if test -n "$CPP" && test -d "$CPP"; then
34914   CPP=
34915 fi
34916 if test -z "$CPP"; then
34917   if ${ac_cv_prog_CPP+:} false; then :
34918   $as_echo_n "(cached) " >&6
34919 else
34920       # Double quotes because CPP needs to be expanded
34921     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34922     do
34923       ac_preproc_ok=false
34924 for ac_c_preproc_warn_flag in '' yes
34925 do
34926   # Use a header file that comes with gcc, so configuring glibc
34927   # with a fresh cross-compiler works.
34928   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34929   # <limits.h> exists even on freestanding compilers.
34930   # On the NeXT, cc -E runs the code through the compiler's parser,
34931   # not just through cpp. "Syntax error" is here to catch this case.
34932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34933 /* end confdefs.h.  */
34934 #ifdef __STDC__
34935 # include <limits.h>
34936 #else
34937 # include <assert.h>
34938 #endif
34939                      Syntax error
34940 _ACEOF
34941 if ac_fn_c_try_cpp "$LINENO"; then :
34942 
34943 else
34944   # Broken: fails on valid input.
34945 continue
34946 fi
34947 rm -f conftest.err conftest.i conftest.$ac_ext
34948 
34949   # OK, works on sane cases.  Now check whether nonexistent headers
34950   # can be detected and how.
34951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34952 /* end confdefs.h.  */
34953 #include <ac_nonexistent.h>
34954 _ACEOF
34955 if ac_fn_c_try_cpp "$LINENO"; then :
34956   # Broken: success on invalid input.
34957 continue
34958 else
34959   # Passes both tests.
34960 ac_preproc_ok=:
34961 break
34962 fi
34963 rm -f conftest.err conftest.i conftest.$ac_ext
34964 
34965 done
34966 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34967 rm -f conftest.i conftest.err conftest.$ac_ext
34968 if $ac_preproc_ok; then :
34969   break
34970 fi
34971 
34972     done
34973     ac_cv_prog_CPP=$CPP
34974 
34975 fi
34976   CPP=$ac_cv_prog_CPP
34977 else
34978   ac_cv_prog_CPP=$CPP
34979 fi
34980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34981 $as_echo "$CPP" >&6; }
34982 ac_preproc_ok=false
34983 for ac_c_preproc_warn_flag in '' yes
34984 do
34985   # Use a header file that comes with gcc, so configuring glibc
34986   # with a fresh cross-compiler works.
34987   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34988   # <limits.h> exists even on freestanding compilers.
34989   # On the NeXT, cc -E runs the code through the compiler's parser,
34990   # not just through cpp. "Syntax error" is here to catch this case.
34991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34992 /* end confdefs.h.  */
34993 #ifdef __STDC__
34994 # include <limits.h>
34995 #else
34996 # include <assert.h>
34997 #endif
34998                      Syntax error
34999 _ACEOF
35000 if ac_fn_c_try_cpp "$LINENO"; then :
35001 
35002 else
35003   # Broken: fails on valid input.
35004 continue
35005 fi
35006 rm -f conftest.err conftest.i conftest.$ac_ext
35007 
35008   # OK, works on sane cases.  Now check whether nonexistent headers
35009   # can be detected and how.
35010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35011 /* end confdefs.h.  */
35012 #include <ac_nonexistent.h>
35013 _ACEOF
35014 if ac_fn_c_try_cpp "$LINENO"; then :
35015   # Broken: success on invalid input.
35016 continue
35017 else
35018   # Passes both tests.
35019 ac_preproc_ok=:
35020 break
35021 fi
35022 rm -f conftest.err conftest.i conftest.$ac_ext
35023 
35024 done
35025 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35026 rm -f conftest.i conftest.err conftest.$ac_ext
35027 if $ac_preproc_ok; then :
35028 
35029 else
35030   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35031 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35032 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35033 See \`config.log' for more details" "$LINENO" 5; }
35034 fi
35035 
35036 ac_ext=cpp
35037 ac_cpp='$CXXCPP $CPPFLAGS'
35038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35041 
35042 
35043   # Only process if variable expands to non-empty
35044 
35045   if test "x$CPP" != x; then
35046     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35047 
35048   # First separate the path from the arguments. This will split at the first
35049   # space.
35050   complete="$CPP"
35051   path="${complete%% *}"
35052   tmp="$complete EOL"
35053   arguments="${tmp#* }"
35054 
35055   # Input might be given as Windows format, start by converting to
35056   # unix format.
35057   new_path=`$CYGPATH -u "$path"`
35058 
35059   # Now try to locate executable using which
35060   new_path=`$WHICH "$new_path" 2> /dev/null`
35061   # bat and cmd files are not always considered executable in cygwin causing which
35062   # to not find them
35063   if test "x$new_path" = x \
35064       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35065       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35066     new_path=`$CYGPATH -u "$path"`
35067   fi
35068   if test "x$new_path" = x; then
35069     # Oops. Which didn't find the executable.
35070     # The splitting of arguments from the executable at a space might have been incorrect,
35071     # since paths with space are more likely in Windows. Give it another try with the whole
35072     # argument.
35073     path="$complete"
35074     arguments="EOL"
35075     new_path=`$CYGPATH -u "$path"`
35076     new_path=`$WHICH "$new_path" 2> /dev/null`
35077     # bat and cmd files are not always considered executable in cygwin causing which
35078     # to not find them
35079     if test "x$new_path" = x \
35080         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35081         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35082       new_path=`$CYGPATH -u "$path"`
35083     fi
35084     if test "x$new_path" = x; then
35085       # It's still not found. Now this is an unrecoverable error.
35086       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35087 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35088       has_space=`$ECHO "$complete" | $GREP " "`
35089       if test "x$has_space" != x; then
35090         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35091 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35092       fi
35093       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35094     fi
35095   fi
35096 
35097   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35098   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35099   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35100   # "foo.exe" is OK but "foo" is an error.
35101   #
35102   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35103   # It is also a way to make sure we got the proper file name for the real test later on.
35104   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35105   if test "x$test_shortpath" = x; then
35106     # Short path failed, file does not exist as specified.
35107     # Try adding .exe or .cmd
35108     if test -f "${new_path}.exe"; then
35109       input_to_shortpath="${new_path}.exe"
35110     elif test -f "${new_path}.cmd"; then
35111       input_to_shortpath="${new_path}.cmd"
35112     else
35113       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35114 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35115       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35116 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35117       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35118     fi
35119   else
35120     input_to_shortpath="$new_path"
35121   fi
35122 
35123   # Call helper function which possibly converts this using DOS-style short mode.
35124   # If so, the updated path is stored in $new_path.
35125   new_path="$input_to_shortpath"
35126 
35127   input_path="$input_to_shortpath"
35128   # Check if we need to convert this using DOS-style short mode. If the path
35129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35130   # take no chances and rewrite it.
35131   # Note: m4 eats our [], so we need to use [ and ] instead.
35132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35133   if test "x$has_forbidden_chars" != x; then
35134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35135     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35136     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35137     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35138       # Going to short mode and back again did indeed matter. Since short mode is
35139       # case insensitive, let's make it lowercase to improve readability.
35140       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35141       # Now convert it back to Unix-style (cygpath)
35142       input_path=`$CYGPATH -u "$shortmode_path"`
35143       new_path="$input_path"
35144     fi
35145   fi
35146 
35147   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35148   if test "x$test_cygdrive_prefix" = x; then
35149     # As a simple fix, exclude /usr/bin since it's not a real path.
35150     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35151       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35152       # a path prefixed by /cygdrive for fixpath to work.
35153       new_path="$CYGWIN_ROOT_PATH$input_path"
35154     fi
35155   fi
35156 
35157   # remove trailing .exe if any
35158   new_path="${new_path/%.exe/}"
35159 
35160     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35161 
35162   # First separate the path from the arguments. This will split at the first
35163   # space.
35164   complete="$CPP"
35165   path="${complete%% *}"
35166   tmp="$complete EOL"
35167   arguments="${tmp#* }"
35168 
35169   # Input might be given as Windows format, start by converting to
35170   # unix format.
35171   new_path="$path"
35172 
35173   windows_path="$new_path"
35174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35175     unix_path=`$CYGPATH -u "$windows_path"`
35176     new_path="$unix_path"
35177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35179     new_path="$unix_path"
35180   fi
35181 
35182 
35183   # Now try to locate executable using which
35184   new_path=`$WHICH "$new_path" 2> /dev/null`
35185 
35186   if test "x$new_path" = x; then
35187     # Oops. Which didn't find the executable.
35188     # The splitting of arguments from the executable at a space might have been incorrect,
35189     # since paths with space are more likely in Windows. Give it another try with the whole
35190     # argument.
35191     path="$complete"
35192     arguments="EOL"
35193     new_path="$path"
35194 
35195   windows_path="$new_path"
35196   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35197     unix_path=`$CYGPATH -u "$windows_path"`
35198     new_path="$unix_path"
35199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35200     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35201     new_path="$unix_path"
35202   fi
35203 
35204 
35205     new_path=`$WHICH "$new_path" 2> /dev/null`
35206     # bat and cmd files are not always considered executable in MSYS causing which
35207     # to not find them
35208     if test "x$new_path" = x \
35209         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35210         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35211       new_path="$path"
35212 
35213   windows_path="$new_path"
35214   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35215     unix_path=`$CYGPATH -u "$windows_path"`
35216     new_path="$unix_path"
35217   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35218     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35219     new_path="$unix_path"
35220   fi
35221 
35222     fi
35223 
35224     if test "x$new_path" = x; then
35225       # It's still not found. Now this is an unrecoverable error.
35226       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35227 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35228       has_space=`$ECHO "$complete" | $GREP " "`
35229       if test "x$has_space" != x; then
35230         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35231 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35232       fi
35233       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35234     fi
35235   fi
35236 
35237   # Now new_path has a complete unix path to the binary
35238   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35239     # Keep paths in /bin as-is, but remove trailing .exe if any
35240     new_path="${new_path/%.exe/}"
35241     # Do not save /bin paths to all_fixpath_prefixes!
35242   else
35243     # Not in mixed or Windows style, start by that.
35244     new_path=`cmd //c echo $new_path`
35245 
35246   input_path="$new_path"
35247   # Check if we need to convert this using DOS-style short mode. If the path
35248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35249   # take no chances and rewrite it.
35250   # Note: m4 eats our [], so we need to use [ and ] instead.
35251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35252   if test "x$has_forbidden_chars" != x; then
35253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35254     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35255   fi
35256 
35257     # Output is in $new_path
35258 
35259   windows_path="$new_path"
35260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35261     unix_path=`$CYGPATH -u "$windows_path"`
35262     new_path="$unix_path"
35263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35265     new_path="$unix_path"
35266   fi
35267 
35268     # remove trailing .exe if any
35269     new_path="${new_path/%.exe/}"
35270 
35271     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35272     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35273   fi
35274 
35275     else
35276       # We're on a unix platform. Hooray! :)
35277       # First separate the path from the arguments. This will split at the first
35278       # space.
35279       complete="$CPP"
35280       path="${complete%% *}"
35281       tmp="$complete EOL"
35282       arguments="${tmp#* }"
35283 
35284       # Cannot rely on the command "which" here since it doesn't always work.
35285       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35286       if test -z "$is_absolute_path"; then
35287         # Path to executable is not absolute. Find it.
35288         IFS_save="$IFS"
35289         IFS=:
35290         for p in $PATH; do
35291           if test -f "$p/$path" && test -x "$p/$path"; then
35292             new_path="$p/$path"
35293             break
35294           fi
35295         done
35296         IFS="$IFS_save"
35297       else
35298         # This is an absolute path, we can use it without further modifications.
35299         new_path="$path"
35300       fi
35301 
35302       if test "x$new_path" = x; then
35303         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35304 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35305         has_space=`$ECHO "$complete" | $GREP " "`
35306         if test "x$has_space" != x; then
35307           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35308 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35309         fi
35310         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35311       fi
35312     fi
35313 
35314     # Now join together the path and the arguments once again
35315     if test "x$arguments" != xEOL; then
35316       new_complete="$new_path ${arguments% *}"
35317     else
35318       new_complete="$new_path"
35319     fi
35320 
35321     if test "x$complete" != "x$new_complete"; then
35322       CPP="$new_complete"
35323       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35324 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35325     fi
35326   fi
35327 
35328   ac_ext=cpp
35329 ac_cpp='$CXXCPP $CPPFLAGS'
35330 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35331 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35332 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35334 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35335 if test -z "$CXXCPP"; then
35336   if ${ac_cv_prog_CXXCPP+:} false; then :
35337   $as_echo_n "(cached) " >&6
35338 else
35339       # Double quotes because CXXCPP needs to be expanded
35340     for CXXCPP in "$CXX -E" "/lib/cpp"
35341     do
35342       ac_preproc_ok=false
35343 for ac_cxx_preproc_warn_flag in '' yes
35344 do
35345   # Use a header file that comes with gcc, so configuring glibc
35346   # with a fresh cross-compiler works.
35347   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35348   # <limits.h> exists even on freestanding compilers.
35349   # On the NeXT, cc -E runs the code through the compiler's parser,
35350   # not just through cpp. "Syntax error" is here to catch this case.
35351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35352 /* end confdefs.h.  */
35353 #ifdef __STDC__
35354 # include <limits.h>
35355 #else
35356 # include <assert.h>
35357 #endif
35358                      Syntax error
35359 _ACEOF
35360 if ac_fn_cxx_try_cpp "$LINENO"; then :
35361 
35362 else
35363   # Broken: fails on valid input.
35364 continue
35365 fi
35366 rm -f conftest.err conftest.i conftest.$ac_ext
35367 
35368   # OK, works on sane cases.  Now check whether nonexistent headers
35369   # can be detected and how.
35370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35371 /* end confdefs.h.  */
35372 #include <ac_nonexistent.h>
35373 _ACEOF
35374 if ac_fn_cxx_try_cpp "$LINENO"; then :
35375   # Broken: success on invalid input.
35376 continue
35377 else
35378   # Passes both tests.
35379 ac_preproc_ok=:
35380 break
35381 fi
35382 rm -f conftest.err conftest.i conftest.$ac_ext
35383 
35384 done
35385 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35386 rm -f conftest.i conftest.err conftest.$ac_ext
35387 if $ac_preproc_ok; then :
35388   break
35389 fi
35390 
35391     done
35392     ac_cv_prog_CXXCPP=$CXXCPP
35393 
35394 fi
35395   CXXCPP=$ac_cv_prog_CXXCPP
35396 else
35397   ac_cv_prog_CXXCPP=$CXXCPP
35398 fi
35399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35400 $as_echo "$CXXCPP" >&6; }
35401 ac_preproc_ok=false
35402 for ac_cxx_preproc_warn_flag in '' yes
35403 do
35404   # Use a header file that comes with gcc, so configuring glibc
35405   # with a fresh cross-compiler works.
35406   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35407   # <limits.h> exists even on freestanding compilers.
35408   # On the NeXT, cc -E runs the code through the compiler's parser,
35409   # not just through cpp. "Syntax error" is here to catch this case.
35410   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35411 /* end confdefs.h.  */
35412 #ifdef __STDC__
35413 # include <limits.h>
35414 #else
35415 # include <assert.h>
35416 #endif
35417                      Syntax error
35418 _ACEOF
35419 if ac_fn_cxx_try_cpp "$LINENO"; then :
35420 
35421 else
35422   # Broken: fails on valid input.
35423 continue
35424 fi
35425 rm -f conftest.err conftest.i conftest.$ac_ext
35426 
35427   # OK, works on sane cases.  Now check whether nonexistent headers
35428   # can be detected and how.
35429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35430 /* end confdefs.h.  */
35431 #include <ac_nonexistent.h>
35432 _ACEOF
35433 if ac_fn_cxx_try_cpp "$LINENO"; then :
35434   # Broken: success on invalid input.
35435 continue
35436 else
35437   # Passes both tests.
35438 ac_preproc_ok=:
35439 break
35440 fi
35441 rm -f conftest.err conftest.i conftest.$ac_ext
35442 
35443 done
35444 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35445 rm -f conftest.i conftest.err conftest.$ac_ext
35446 if $ac_preproc_ok; then :
35447 
35448 else
35449   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35450 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35451 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35452 See \`config.log' for more details" "$LINENO" 5; }
35453 fi
35454 
35455 ac_ext=cpp
35456 ac_cpp='$CXXCPP $CPPFLAGS'
35457 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35458 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35459 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35460 
35461 
35462   # Only process if variable expands to non-empty
35463 
35464   if test "x$CXXCPP" != x; then
35465     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35466 
35467   # First separate the path from the arguments. This will split at the first
35468   # space.
35469   complete="$CXXCPP"
35470   path="${complete%% *}"
35471   tmp="$complete EOL"
35472   arguments="${tmp#* }"
35473 
35474   # Input might be given as Windows format, start by converting to
35475   # unix format.
35476   new_path=`$CYGPATH -u "$path"`
35477 
35478   # Now try to locate executable using which
35479   new_path=`$WHICH "$new_path" 2> /dev/null`
35480   # bat and cmd files are not always considered executable in cygwin causing which
35481   # to not find them
35482   if test "x$new_path" = x \
35483       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35484       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35485     new_path=`$CYGPATH -u "$path"`
35486   fi
35487   if test "x$new_path" = x; then
35488     # Oops. Which didn't find the executable.
35489     # The splitting of arguments from the executable at a space might have been incorrect,
35490     # since paths with space are more likely in Windows. Give it another try with the whole
35491     # argument.
35492     path="$complete"
35493     arguments="EOL"
35494     new_path=`$CYGPATH -u "$path"`
35495     new_path=`$WHICH "$new_path" 2> /dev/null`
35496     # bat and cmd files are not always considered executable in cygwin causing which
35497     # to not find them
35498     if test "x$new_path" = x \
35499         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35500         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35501       new_path=`$CYGPATH -u "$path"`
35502     fi
35503     if test "x$new_path" = x; then
35504       # It's still not found. Now this is an unrecoverable error.
35505       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35506 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35507       has_space=`$ECHO "$complete" | $GREP " "`
35508       if test "x$has_space" != x; then
35509         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35510 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35511       fi
35512       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35513     fi
35514   fi
35515 
35516   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35517   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35518   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35519   # "foo.exe" is OK but "foo" is an error.
35520   #
35521   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35522   # It is also a way to make sure we got the proper file name for the real test later on.
35523   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35524   if test "x$test_shortpath" = x; then
35525     # Short path failed, file does not exist as specified.
35526     # Try adding .exe or .cmd
35527     if test -f "${new_path}.exe"; then
35528       input_to_shortpath="${new_path}.exe"
35529     elif test -f "${new_path}.cmd"; then
35530       input_to_shortpath="${new_path}.cmd"
35531     else
35532       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35533 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35534       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35535 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35536       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35537     fi
35538   else
35539     input_to_shortpath="$new_path"
35540   fi
35541 
35542   # Call helper function which possibly converts this using DOS-style short mode.
35543   # If so, the updated path is stored in $new_path.
35544   new_path="$input_to_shortpath"
35545 
35546   input_path="$input_to_shortpath"
35547   # Check if we need to convert this using DOS-style short mode. If the path
35548   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35549   # take no chances and rewrite it.
35550   # Note: m4 eats our [], so we need to use [ and ] instead.
35551   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35552   if test "x$has_forbidden_chars" != x; then
35553     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35554     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35555     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35556     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35557       # Going to short mode and back again did indeed matter. Since short mode is
35558       # case insensitive, let's make it lowercase to improve readability.
35559       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35560       # Now convert it back to Unix-style (cygpath)
35561       input_path=`$CYGPATH -u "$shortmode_path"`
35562       new_path="$input_path"
35563     fi
35564   fi
35565 
35566   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35567   if test "x$test_cygdrive_prefix" = x; then
35568     # As a simple fix, exclude /usr/bin since it's not a real path.
35569     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35570       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35571       # a path prefixed by /cygdrive for fixpath to work.
35572       new_path="$CYGWIN_ROOT_PATH$input_path"
35573     fi
35574   fi
35575 
35576   # remove trailing .exe if any
35577   new_path="${new_path/%.exe/}"
35578 
35579     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35580 
35581   # First separate the path from the arguments. This will split at the first
35582   # space.
35583   complete="$CXXCPP"
35584   path="${complete%% *}"
35585   tmp="$complete EOL"
35586   arguments="${tmp#* }"
35587 
35588   # Input might be given as Windows format, start by converting to
35589   # unix format.
35590   new_path="$path"
35591 
35592   windows_path="$new_path"
35593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35594     unix_path=`$CYGPATH -u "$windows_path"`
35595     new_path="$unix_path"
35596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35598     new_path="$unix_path"
35599   fi
35600 
35601 
35602   # Now try to locate executable using which
35603   new_path=`$WHICH "$new_path" 2> /dev/null`
35604 
35605   if test "x$new_path" = x; then
35606     # Oops. Which didn't find the executable.
35607     # The splitting of arguments from the executable at a space might have been incorrect,
35608     # since paths with space are more likely in Windows. Give it another try with the whole
35609     # argument.
35610     path="$complete"
35611     arguments="EOL"
35612     new_path="$path"
35613 
35614   windows_path="$new_path"
35615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35616     unix_path=`$CYGPATH -u "$windows_path"`
35617     new_path="$unix_path"
35618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35620     new_path="$unix_path"
35621   fi
35622 
35623 
35624     new_path=`$WHICH "$new_path" 2> /dev/null`
35625     # bat and cmd files are not always considered executable in MSYS causing which
35626     # to not find them
35627     if test "x$new_path" = x \
35628         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35629         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35630       new_path="$path"
35631 
35632   windows_path="$new_path"
35633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35634     unix_path=`$CYGPATH -u "$windows_path"`
35635     new_path="$unix_path"
35636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35638     new_path="$unix_path"
35639   fi
35640 
35641     fi
35642 
35643     if test "x$new_path" = x; then
35644       # It's still not found. Now this is an unrecoverable error.
35645       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35646 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35647       has_space=`$ECHO "$complete" | $GREP " "`
35648       if test "x$has_space" != x; then
35649         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35650 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35651       fi
35652       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35653     fi
35654   fi
35655 
35656   # Now new_path has a complete unix path to the binary
35657   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35658     # Keep paths in /bin as-is, but remove trailing .exe if any
35659     new_path="${new_path/%.exe/}"
35660     # Do not save /bin paths to all_fixpath_prefixes!
35661   else
35662     # Not in mixed or Windows style, start by that.
35663     new_path=`cmd //c echo $new_path`
35664 
35665   input_path="$new_path"
35666   # Check if we need to convert this using DOS-style short mode. If the path
35667   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35668   # take no chances and rewrite it.
35669   # Note: m4 eats our [], so we need to use [ and ] instead.
35670   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35671   if test "x$has_forbidden_chars" != x; then
35672     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35673     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35674   fi
35675 
35676     # Output is in $new_path
35677 
35678   windows_path="$new_path"
35679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35680     unix_path=`$CYGPATH -u "$windows_path"`
35681     new_path="$unix_path"
35682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35684     new_path="$unix_path"
35685   fi
35686 
35687     # remove trailing .exe if any
35688     new_path="${new_path/%.exe/}"
35689 
35690     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35691     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35692   fi
35693 
35694     else
35695       # We're on a unix platform. Hooray! :)
35696       # First separate the path from the arguments. This will split at the first
35697       # space.
35698       complete="$CXXCPP"
35699       path="${complete%% *}"
35700       tmp="$complete EOL"
35701       arguments="${tmp#* }"
35702 
35703       # Cannot rely on the command "which" here since it doesn't always work.
35704       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35705       if test -z "$is_absolute_path"; then
35706         # Path to executable is not absolute. Find it.
35707         IFS_save="$IFS"
35708         IFS=:
35709         for p in $PATH; do
35710           if test -f "$p/$path" && test -x "$p/$path"; then
35711             new_path="$p/$path"
35712             break
35713           fi
35714         done
35715         IFS="$IFS_save"
35716       else
35717         # This is an absolute path, we can use it without further modifications.
35718         new_path="$path"
35719       fi
35720 
35721       if test "x$new_path" = x; then
35722         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35723 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35724         has_space=`$ECHO "$complete" | $GREP " "`
35725         if test "x$has_space" != x; then
35726           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35727 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35728         fi
35729         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35730       fi
35731     fi
35732 
35733     # Now join together the path and the arguments once again
35734     if test "x$arguments" != xEOL; then
35735       new_complete="$new_path ${arguments% *}"
35736     else
35737       new_complete="$new_path"
35738     fi
35739 
35740     if test "x$complete" != "x$new_complete"; then
35741       CXXCPP="$new_complete"
35742       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35743 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35744     fi
35745   fi
35746 
35747 
35748   #
35749   # Setup the linker (LD)
35750   #
35751   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35752     # In the Microsoft toolchain we have a separate LD command "link".
35753     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35754     # a cygwin program for something completely different.
35755     # Extract the first word of "link", so it can be a program name with args.
35756 set dummy link; ac_word=$2
35757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35758 $as_echo_n "checking for $ac_word... " >&6; }
35759 if ${ac_cv_prog_LD+:} false; then :
35760   $as_echo_n "(cached) " >&6
35761 else
35762   if test -n "$LD"; then
35763   ac_cv_prog_LD="$LD" # Let the user override the test.
35764 else
35765   ac_prog_rejected=no
35766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35767 for as_dir in $PATH
35768 do
35769   IFS=$as_save_IFS
35770   test -z "$as_dir" && as_dir=.
35771     for ac_exec_ext in '' $ac_executable_extensions; do
35772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35773     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35774        ac_prog_rejected=yes
35775        continue
35776      fi
35777     ac_cv_prog_LD="link"
35778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35779     break 2
35780   fi
35781 done
35782   done
35783 IFS=$as_save_IFS
35784 
35785 if test $ac_prog_rejected = yes; then
35786   # We found a bogon in the path, so make sure we never use it.
35787   set dummy $ac_cv_prog_LD
35788   shift
35789   if test $# != 0; then
35790     # We chose a different compiler from the bogus one.
35791     # However, it has the same basename, so the bogon will be chosen
35792     # first if we set LD to just the basename; use the full file name.
35793     shift
35794     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35795   fi
35796 fi
35797 fi
35798 fi
35799 LD=$ac_cv_prog_LD
35800 if test -n "$LD"; then
35801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35802 $as_echo "$LD" >&6; }
35803 else
35804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35805 $as_echo "no" >&6; }
35806 fi
35807 
35808 
35809 
35810   # Only process if variable expands to non-empty
35811 
35812   if test "x$LD" != x; then
35813     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35814 
35815   # First separate the path from the arguments. This will split at the first
35816   # space.
35817   complete="$LD"
35818   path="${complete%% *}"
35819   tmp="$complete EOL"
35820   arguments="${tmp#* }"
35821 
35822   # Input might be given as Windows format, start by converting to
35823   # unix format.
35824   new_path=`$CYGPATH -u "$path"`
35825 
35826   # Now try to locate executable using which
35827   new_path=`$WHICH "$new_path" 2> /dev/null`
35828   # bat and cmd files are not always considered executable in cygwin causing which
35829   # to not find them
35830   if test "x$new_path" = x \
35831       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35832       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35833     new_path=`$CYGPATH -u "$path"`
35834   fi
35835   if test "x$new_path" = x; then
35836     # Oops. Which didn't find the executable.
35837     # The splitting of arguments from the executable at a space might have been incorrect,
35838     # since paths with space are more likely in Windows. Give it another try with the whole
35839     # argument.
35840     path="$complete"
35841     arguments="EOL"
35842     new_path=`$CYGPATH -u "$path"`
35843     new_path=`$WHICH "$new_path" 2> /dev/null`
35844     # bat and cmd files are not always considered executable in cygwin causing which
35845     # to not find them
35846     if test "x$new_path" = x \
35847         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35848         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35849       new_path=`$CYGPATH -u "$path"`
35850     fi
35851     if test "x$new_path" = x; then
35852       # It's still not found. Now this is an unrecoverable error.
35853       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35854 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35855       has_space=`$ECHO "$complete" | $GREP " "`
35856       if test "x$has_space" != x; then
35857         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35858 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35859       fi
35860       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35861     fi
35862   fi
35863 
35864   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35865   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35866   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35867   # "foo.exe" is OK but "foo" is an error.
35868   #
35869   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35870   # It is also a way to make sure we got the proper file name for the real test later on.
35871   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35872   if test "x$test_shortpath" = x; then
35873     # Short path failed, file does not exist as specified.
35874     # Try adding .exe or .cmd
35875     if test -f "${new_path}.exe"; then
35876       input_to_shortpath="${new_path}.exe"
35877     elif test -f "${new_path}.cmd"; then
35878       input_to_shortpath="${new_path}.cmd"
35879     else
35880       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35881 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35882       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35883 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35884       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35885     fi
35886   else
35887     input_to_shortpath="$new_path"
35888   fi
35889 
35890   # Call helper function which possibly converts this using DOS-style short mode.
35891   # If so, the updated path is stored in $new_path.
35892   new_path="$input_to_shortpath"
35893 
35894   input_path="$input_to_shortpath"
35895   # Check if we need to convert this using DOS-style short mode. If the path
35896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35897   # take no chances and rewrite it.
35898   # Note: m4 eats our [], so we need to use [ and ] instead.
35899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35900   if test "x$has_forbidden_chars" != x; then
35901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35902     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35903     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35904     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35905       # Going to short mode and back again did indeed matter. Since short mode is
35906       # case insensitive, let's make it lowercase to improve readability.
35907       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35908       # Now convert it back to Unix-style (cygpath)
35909       input_path=`$CYGPATH -u "$shortmode_path"`
35910       new_path="$input_path"
35911     fi
35912   fi
35913 
35914   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35915   if test "x$test_cygdrive_prefix" = x; then
35916     # As a simple fix, exclude /usr/bin since it's not a real path.
35917     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35918       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35919       # a path prefixed by /cygdrive for fixpath to work.
35920       new_path="$CYGWIN_ROOT_PATH$input_path"
35921     fi
35922   fi
35923 
35924   # remove trailing .exe if any
35925   new_path="${new_path/%.exe/}"
35926 
35927     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35928 
35929   # First separate the path from the arguments. This will split at the first
35930   # space.
35931   complete="$LD"
35932   path="${complete%% *}"
35933   tmp="$complete EOL"
35934   arguments="${tmp#* }"
35935 
35936   # Input might be given as Windows format, start by converting to
35937   # unix format.
35938   new_path="$path"
35939 
35940   windows_path="$new_path"
35941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35942     unix_path=`$CYGPATH -u "$windows_path"`
35943     new_path="$unix_path"
35944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35946     new_path="$unix_path"
35947   fi
35948 
35949 
35950   # Now try to locate executable using which
35951   new_path=`$WHICH "$new_path" 2> /dev/null`
35952 
35953   if test "x$new_path" = x; then
35954     # Oops. Which didn't find the executable.
35955     # The splitting of arguments from the executable at a space might have been incorrect,
35956     # since paths with space are more likely in Windows. Give it another try with the whole
35957     # argument.
35958     path="$complete"
35959     arguments="EOL"
35960     new_path="$path"
35961 
35962   windows_path="$new_path"
35963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35964     unix_path=`$CYGPATH -u "$windows_path"`
35965     new_path="$unix_path"
35966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35968     new_path="$unix_path"
35969   fi
35970 
35971 
35972     new_path=`$WHICH "$new_path" 2> /dev/null`
35973     # bat and cmd files are not always considered executable in MSYS causing which
35974     # to not find them
35975     if test "x$new_path" = x \
35976         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35977         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35978       new_path="$path"
35979 
35980   windows_path="$new_path"
35981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35982     unix_path=`$CYGPATH -u "$windows_path"`
35983     new_path="$unix_path"
35984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35986     new_path="$unix_path"
35987   fi
35988 
35989     fi
35990 
35991     if test "x$new_path" = x; then
35992       # It's still not found. Now this is an unrecoverable error.
35993       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35994 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35995       has_space=`$ECHO "$complete" | $GREP " "`
35996       if test "x$has_space" != x; then
35997         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35998 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35999       fi
36000       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36001     fi
36002   fi
36003 
36004   # Now new_path has a complete unix path to the binary
36005   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36006     # Keep paths in /bin as-is, but remove trailing .exe if any
36007     new_path="${new_path/%.exe/}"
36008     # Do not save /bin paths to all_fixpath_prefixes!
36009   else
36010     # Not in mixed or Windows style, start by that.
36011     new_path=`cmd //c echo $new_path`
36012 
36013   input_path="$new_path"
36014   # Check if we need to convert this using DOS-style short mode. If the path
36015   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36016   # take no chances and rewrite it.
36017   # Note: m4 eats our [], so we need to use [ and ] instead.
36018   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36019   if test "x$has_forbidden_chars" != x; then
36020     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36021     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36022   fi
36023 
36024     # Output is in $new_path
36025 
36026   windows_path="$new_path"
36027   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36028     unix_path=`$CYGPATH -u "$windows_path"`
36029     new_path="$unix_path"
36030   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36031     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36032     new_path="$unix_path"
36033   fi
36034 
36035     # remove trailing .exe if any
36036     new_path="${new_path/%.exe/}"
36037 
36038     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36039     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36040   fi
36041 
36042     else
36043       # We're on a unix platform. Hooray! :)
36044       # First separate the path from the arguments. This will split at the first
36045       # space.
36046       complete="$LD"
36047       path="${complete%% *}"
36048       tmp="$complete EOL"
36049       arguments="${tmp#* }"
36050 
36051       # Cannot rely on the command "which" here since it doesn't always work.
36052       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36053       if test -z "$is_absolute_path"; then
36054         # Path to executable is not absolute. Find it.
36055         IFS_save="$IFS"
36056         IFS=:
36057         for p in $PATH; do
36058           if test -f "$p/$path" && test -x "$p/$path"; then
36059             new_path="$p/$path"
36060             break
36061           fi
36062         done
36063         IFS="$IFS_save"
36064       else
36065         # This is an absolute path, we can use it without further modifications.
36066         new_path="$path"
36067       fi
36068 
36069       if test "x$new_path" = x; then
36070         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36071 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36072         has_space=`$ECHO "$complete" | $GREP " "`
36073         if test "x$has_space" != x; then
36074           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36075 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36076         fi
36077         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36078       fi
36079     fi
36080 
36081     # Now join together the path and the arguments once again
36082     if test "x$arguments" != xEOL; then
36083       new_complete="$new_path ${arguments% *}"
36084     else
36085       new_complete="$new_path"
36086     fi
36087 
36088     if test "x$complete" != "x$new_complete"; then
36089       LD="$new_complete"
36090       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36091 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36092     fi
36093   fi
36094 
36095     # Verify that we indeed succeeded with this trick.
36096     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36097 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36098     "$LD" --version > /dev/null
36099     if test $? -eq 0 ; then
36100       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36101 $as_echo "no" >&6; }
36102       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36103     else
36104       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36105 $as_echo "yes" >&6; }
36106     fi
36107     LDCXX="$LD"
36108   else
36109     # All other toolchains use the compiler to link.
36110     LD="$CC"
36111     LDCXX="$CXX"
36112   fi
36113 
36114   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36115 
36116 
36117   #
36118   # Setup the assembler (AS)
36119   #
36120   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36121     # FIXME: should this really be solaris, or solstudio?
36122 
36123 
36124   # Publish this variable in the help.
36125 
36126 
36127   if [ -z "${AS+x}" ]; then
36128     # The variable is not set by user, try to locate tool using the code snippet
36129     for ac_prog in as
36130 do
36131   # Extract the first word of "$ac_prog", so it can be a program name with args.
36132 set dummy $ac_prog; ac_word=$2
36133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36134 $as_echo_n "checking for $ac_word... " >&6; }
36135 if ${ac_cv_path_AS+:} false; then :
36136   $as_echo_n "(cached) " >&6
36137 else
36138   case $AS in
36139   [\\/]* | ?:[\\/]*)
36140   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36141   ;;
36142   *)
36143   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36144 for as_dir in $PATH
36145 do
36146   IFS=$as_save_IFS
36147   test -z "$as_dir" && as_dir=.
36148     for ac_exec_ext in '' $ac_executable_extensions; do
36149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36150     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36152     break 2
36153   fi
36154 done
36155   done
36156 IFS=$as_save_IFS
36157 
36158   ;;
36159 esac
36160 fi
36161 AS=$ac_cv_path_AS
36162 if test -n "$AS"; then
36163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36164 $as_echo "$AS" >&6; }
36165 else
36166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36167 $as_echo "no" >&6; }
36168 fi
36169 
36170 
36171   test -n "$AS" && break
36172 done
36173 
36174   else
36175     # The variable is set, but is it from the command line or the environment?
36176 
36177     # Try to remove the string !AS! from our list.
36178     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36179     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36180       # If it failed, the variable was not from the command line. Ignore it,
36181       # but warn the user (except for BASH, which is always set by the calling BASH).
36182       if test "xAS" != xBASH; then
36183         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36184 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36185       fi
36186       # Try to locate tool using the code snippet
36187       for ac_prog in as
36188 do
36189   # Extract the first word of "$ac_prog", so it can be a program name with args.
36190 set dummy $ac_prog; ac_word=$2
36191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36192 $as_echo_n "checking for $ac_word... " >&6; }
36193 if ${ac_cv_path_AS+:} false; then :
36194   $as_echo_n "(cached) " >&6
36195 else
36196   case $AS in
36197   [\\/]* | ?:[\\/]*)
36198   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36199   ;;
36200   *)
36201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36202 for as_dir in $PATH
36203 do
36204   IFS=$as_save_IFS
36205   test -z "$as_dir" && as_dir=.
36206     for ac_exec_ext in '' $ac_executable_extensions; do
36207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36208     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36210     break 2
36211   fi
36212 done
36213   done
36214 IFS=$as_save_IFS
36215 
36216   ;;
36217 esac
36218 fi
36219 AS=$ac_cv_path_AS
36220 if test -n "$AS"; then
36221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36222 $as_echo "$AS" >&6; }
36223 else
36224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36225 $as_echo "no" >&6; }
36226 fi
36227 
36228 
36229   test -n "$AS" && break
36230 done
36231 
36232     else
36233       # If it succeeded, then it was overridden by the user. We will use it
36234       # for the tool.
36235 
36236       # First remove it from the list of overridden variables, so we can test
36237       # for unknown variables in the end.
36238       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36239 
36240       # Check if we try to supply an empty value
36241       if test "x$AS" = x; then
36242         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36243 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36244         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36245 $as_echo_n "checking for AS... " >&6; }
36246         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36247 $as_echo "disabled" >&6; }
36248       else
36249         # Check if the provided tool contains a complete path.
36250         tool_specified="$AS"
36251         tool_basename="${tool_specified##*/}"
36252         if test "x$tool_basename" = "x$tool_specified"; then
36253           # A command without a complete path is provided, search $PATH.
36254           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36255 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36256           # Extract the first word of "$tool_basename", so it can be a program name with args.
36257 set dummy $tool_basename; ac_word=$2
36258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36259 $as_echo_n "checking for $ac_word... " >&6; }
36260 if ${ac_cv_path_AS+:} false; then :
36261   $as_echo_n "(cached) " >&6
36262 else
36263   case $AS in
36264   [\\/]* | ?:[\\/]*)
36265   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36266   ;;
36267   *)
36268   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36269 for as_dir in $PATH
36270 do
36271   IFS=$as_save_IFS
36272   test -z "$as_dir" && as_dir=.
36273     for ac_exec_ext in '' $ac_executable_extensions; do
36274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36275     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36277     break 2
36278   fi
36279 done
36280   done
36281 IFS=$as_save_IFS
36282 
36283   ;;
36284 esac
36285 fi
36286 AS=$ac_cv_path_AS
36287 if test -n "$AS"; then
36288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36289 $as_echo "$AS" >&6; }
36290 else
36291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36292 $as_echo "no" >&6; }
36293 fi
36294 
36295 
36296           if test "x$AS" = x; then
36297             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36298           fi
36299         else
36300           # Otherwise we believe it is a complete path. Use it as it is.
36301           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36302 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36303           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36304 $as_echo_n "checking for AS... " >&6; }
36305           if test ! -x "$tool_specified"; then
36306             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36307 $as_echo "not found" >&6; }
36308             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36309           fi
36310           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36311 $as_echo "$tool_specified" >&6; }
36312         fi
36313       fi
36314     fi
36315 
36316   fi
36317 
36318 
36319 
36320   # Only process if variable expands to non-empty
36321 
36322   if test "x$AS" != x; then
36323     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36324 
36325   # First separate the path from the arguments. This will split at the first
36326   # space.
36327   complete="$AS"
36328   path="${complete%% *}"
36329   tmp="$complete EOL"
36330   arguments="${tmp#* }"
36331 
36332   # Input might be given as Windows format, start by converting to
36333   # unix format.
36334   new_path=`$CYGPATH -u "$path"`
36335 
36336   # Now try to locate executable using which
36337   new_path=`$WHICH "$new_path" 2> /dev/null`
36338   # bat and cmd files are not always considered executable in cygwin causing which
36339   # to not find them
36340   if test "x$new_path" = x \
36341       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36342       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36343     new_path=`$CYGPATH -u "$path"`
36344   fi
36345   if test "x$new_path" = x; then
36346     # Oops. Which didn't find the executable.
36347     # The splitting of arguments from the executable at a space might have been incorrect,
36348     # since paths with space are more likely in Windows. Give it another try with the whole
36349     # argument.
36350     path="$complete"
36351     arguments="EOL"
36352     new_path=`$CYGPATH -u "$path"`
36353     new_path=`$WHICH "$new_path" 2> /dev/null`
36354     # bat and cmd files are not always considered executable in cygwin causing which
36355     # to not find them
36356     if test "x$new_path" = x \
36357         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36358         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36359       new_path=`$CYGPATH -u "$path"`
36360     fi
36361     if test "x$new_path" = x; then
36362       # It's still not found. Now this is an unrecoverable error.
36363       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36364 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36365       has_space=`$ECHO "$complete" | $GREP " "`
36366       if test "x$has_space" != x; then
36367         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36368 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36369       fi
36370       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36371     fi
36372   fi
36373 
36374   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36375   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36376   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36377   # "foo.exe" is OK but "foo" is an error.
36378   #
36379   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36380   # It is also a way to make sure we got the proper file name for the real test later on.
36381   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36382   if test "x$test_shortpath" = x; then
36383     # Short path failed, file does not exist as specified.
36384     # Try adding .exe or .cmd
36385     if test -f "${new_path}.exe"; then
36386       input_to_shortpath="${new_path}.exe"
36387     elif test -f "${new_path}.cmd"; then
36388       input_to_shortpath="${new_path}.cmd"
36389     else
36390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36391 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36392       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36393 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36394       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36395     fi
36396   else
36397     input_to_shortpath="$new_path"
36398   fi
36399 
36400   # Call helper function which possibly converts this using DOS-style short mode.
36401   # If so, the updated path is stored in $new_path.
36402   new_path="$input_to_shortpath"
36403 
36404   input_path="$input_to_shortpath"
36405   # Check if we need to convert this using DOS-style short mode. If the path
36406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36407   # take no chances and rewrite it.
36408   # Note: m4 eats our [], so we need to use [ and ] instead.
36409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36410   if test "x$has_forbidden_chars" != x; then
36411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36412     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36413     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36414     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36415       # Going to short mode and back again did indeed matter. Since short mode is
36416       # case insensitive, let's make it lowercase to improve readability.
36417       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36418       # Now convert it back to Unix-style (cygpath)
36419       input_path=`$CYGPATH -u "$shortmode_path"`
36420       new_path="$input_path"
36421     fi
36422   fi
36423 
36424   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36425   if test "x$test_cygdrive_prefix" = x; then
36426     # As a simple fix, exclude /usr/bin since it's not a real path.
36427     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36428       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36429       # a path prefixed by /cygdrive for fixpath to work.
36430       new_path="$CYGWIN_ROOT_PATH$input_path"
36431     fi
36432   fi
36433 
36434   # remove trailing .exe if any
36435   new_path="${new_path/%.exe/}"
36436 
36437     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36438 
36439   # First separate the path from the arguments. This will split at the first
36440   # space.
36441   complete="$AS"
36442   path="${complete%% *}"
36443   tmp="$complete EOL"
36444   arguments="${tmp#* }"
36445 
36446   # Input might be given as Windows format, start by converting to
36447   # unix format.
36448   new_path="$path"
36449 
36450   windows_path="$new_path"
36451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36452     unix_path=`$CYGPATH -u "$windows_path"`
36453     new_path="$unix_path"
36454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36456     new_path="$unix_path"
36457   fi
36458 
36459 
36460   # Now try to locate executable using which
36461   new_path=`$WHICH "$new_path" 2> /dev/null`
36462 
36463   if test "x$new_path" = x; then
36464     # Oops. Which didn't find the executable.
36465     # The splitting of arguments from the executable at a space might have been incorrect,
36466     # since paths with space are more likely in Windows. Give it another try with the whole
36467     # argument.
36468     path="$complete"
36469     arguments="EOL"
36470     new_path="$path"
36471 
36472   windows_path="$new_path"
36473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36474     unix_path=`$CYGPATH -u "$windows_path"`
36475     new_path="$unix_path"
36476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36478     new_path="$unix_path"
36479   fi
36480 
36481 
36482     new_path=`$WHICH "$new_path" 2> /dev/null`
36483     # bat and cmd files are not always considered executable in MSYS causing which
36484     # to not find them
36485     if test "x$new_path" = x \
36486         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36487         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36488       new_path="$path"
36489 
36490   windows_path="$new_path"
36491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36492     unix_path=`$CYGPATH -u "$windows_path"`
36493     new_path="$unix_path"
36494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36496     new_path="$unix_path"
36497   fi
36498 
36499     fi
36500 
36501     if test "x$new_path" = x; then
36502       # It's still not found. Now this is an unrecoverable error.
36503       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36504 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36505       has_space=`$ECHO "$complete" | $GREP " "`
36506       if test "x$has_space" != x; then
36507         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36508 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36509       fi
36510       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36511     fi
36512   fi
36513 
36514   # Now new_path has a complete unix path to the binary
36515   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36516     # Keep paths in /bin as-is, but remove trailing .exe if any
36517     new_path="${new_path/%.exe/}"
36518     # Do not save /bin paths to all_fixpath_prefixes!
36519   else
36520     # Not in mixed or Windows style, start by that.
36521     new_path=`cmd //c echo $new_path`
36522 
36523   input_path="$new_path"
36524   # Check if we need to convert this using DOS-style short mode. If the path
36525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36526   # take no chances and rewrite it.
36527   # Note: m4 eats our [], so we need to use [ and ] instead.
36528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36529   if test "x$has_forbidden_chars" != x; then
36530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36531     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36532   fi
36533 
36534     # Output is in $new_path
36535 
36536   windows_path="$new_path"
36537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36538     unix_path=`$CYGPATH -u "$windows_path"`
36539     new_path="$unix_path"
36540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36542     new_path="$unix_path"
36543   fi
36544 
36545     # remove trailing .exe if any
36546     new_path="${new_path/%.exe/}"
36547 
36548     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36549     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36550   fi
36551 
36552     else
36553       # We're on a unix platform. Hooray! :)
36554       # First separate the path from the arguments. This will split at the first
36555       # space.
36556       complete="$AS"
36557       path="${complete%% *}"
36558       tmp="$complete EOL"
36559       arguments="${tmp#* }"
36560 
36561       # Cannot rely on the command "which" here since it doesn't always work.
36562       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36563       if test -z "$is_absolute_path"; then
36564         # Path to executable is not absolute. Find it.
36565         IFS_save="$IFS"
36566         IFS=:
36567         for p in $PATH; do
36568           if test -f "$p/$path" && test -x "$p/$path"; then
36569             new_path="$p/$path"
36570             break
36571           fi
36572         done
36573         IFS="$IFS_save"
36574       else
36575         # This is an absolute path, we can use it without further modifications.
36576         new_path="$path"
36577       fi
36578 
36579       if test "x$new_path" = x; then
36580         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36581 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36582         has_space=`$ECHO "$complete" | $GREP " "`
36583         if test "x$has_space" != x; then
36584           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36585 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36586         fi
36587         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36588       fi
36589     fi
36590 
36591     # Now join together the path and the arguments once again
36592     if test "x$arguments" != xEOL; then
36593       new_complete="$new_path ${arguments% *}"
36594     else
36595       new_complete="$new_path"
36596     fi
36597 
36598     if test "x$complete" != "x$new_complete"; then
36599       AS="$new_complete"
36600       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36601 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36602     fi
36603   fi
36604 
36605   else
36606     # FIXME: is this correct for microsoft?
36607     AS="$CC -c"
36608   fi
36609 
36610 
36611   #
36612   # Setup the archiver (AR)
36613   #
36614   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36615     # The corresponding ar tool is lib.exe (used to create static libraries)
36616     # Extract the first word of "lib", so it can be a program name with args.
36617 set dummy lib; ac_word=$2
36618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36619 $as_echo_n "checking for $ac_word... " >&6; }
36620 if ${ac_cv_prog_AR+:} false; then :
36621   $as_echo_n "(cached) " >&6
36622 else
36623   if test -n "$AR"; then
36624   ac_cv_prog_AR="$AR" # Let the user override the test.
36625 else
36626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36627 for as_dir in $PATH
36628 do
36629   IFS=$as_save_IFS
36630   test -z "$as_dir" && as_dir=.
36631     for ac_exec_ext in '' $ac_executable_extensions; do
36632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36633     ac_cv_prog_AR="lib"
36634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36635     break 2
36636   fi
36637 done
36638   done
36639 IFS=$as_save_IFS
36640 
36641 fi
36642 fi
36643 AR=$ac_cv_prog_AR
36644 if test -n "$AR"; then
36645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36646 $as_echo "$AR" >&6; }
36647 else
36648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36649 $as_echo "no" >&6; }
36650 fi
36651 
36652 
36653   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36654 
36655 
36656   # Publish this variable in the help.
36657 
36658 
36659   if [ -z "${AR+x}" ]; then
36660     # The variable is not set by user, try to locate tool using the code snippet
36661     if test -n "$ac_tool_prefix"; then
36662   for ac_prog in ar gcc-ar
36663   do
36664     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36665 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36667 $as_echo_n "checking for $ac_word... " >&6; }
36668 if ${ac_cv_prog_AR+:} false; then :
36669   $as_echo_n "(cached) " >&6
36670 else
36671   if test -n "$AR"; then
36672   ac_cv_prog_AR="$AR" # Let the user override the test.
36673 else
36674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36675 for as_dir in $PATH
36676 do
36677   IFS=$as_save_IFS
36678   test -z "$as_dir" && as_dir=.
36679     for ac_exec_ext in '' $ac_executable_extensions; do
36680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36681     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36683     break 2
36684   fi
36685 done
36686   done
36687 IFS=$as_save_IFS
36688 
36689 fi
36690 fi
36691 AR=$ac_cv_prog_AR
36692 if test -n "$AR"; then
36693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36694 $as_echo "$AR" >&6; }
36695 else
36696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36697 $as_echo "no" >&6; }
36698 fi
36699 
36700 
36701     test -n "$AR" && break
36702   done
36703 fi
36704 if test -z "$AR"; then
36705   ac_ct_AR=$AR
36706   for ac_prog in ar gcc-ar
36707 do
36708   # Extract the first word of "$ac_prog", so it can be a program name with args.
36709 set dummy $ac_prog; ac_word=$2
36710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36711 $as_echo_n "checking for $ac_word... " >&6; }
36712 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36713   $as_echo_n "(cached) " >&6
36714 else
36715   if test -n "$ac_ct_AR"; then
36716   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36717 else
36718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36719 for as_dir in $PATH
36720 do
36721   IFS=$as_save_IFS
36722   test -z "$as_dir" && as_dir=.
36723     for ac_exec_ext in '' $ac_executable_extensions; do
36724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36725     ac_cv_prog_ac_ct_AR="$ac_prog"
36726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36727     break 2
36728   fi
36729 done
36730   done
36731 IFS=$as_save_IFS
36732 
36733 fi
36734 fi
36735 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36736 if test -n "$ac_ct_AR"; then
36737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36738 $as_echo "$ac_ct_AR" >&6; }
36739 else
36740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36741 $as_echo "no" >&6; }
36742 fi
36743 
36744 
36745   test -n "$ac_ct_AR" && break
36746 done
36747 
36748   if test "x$ac_ct_AR" = x; then
36749     AR=""
36750   else
36751     case $cross_compiling:$ac_tool_warned in
36752 yes:)
36753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36754 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36755 ac_tool_warned=yes ;;
36756 esac
36757     AR=$ac_ct_AR
36758   fi
36759 fi
36760 
36761   else
36762     # The variable is set, but is it from the command line or the environment?
36763 
36764     # Try to remove the string !AR! from our list.
36765     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36766     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36767       # If it failed, the variable was not from the command line. Ignore it,
36768       # but warn the user (except for BASH, which is always set by the calling BASH).
36769       if test "xAR" != xBASH; then
36770         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36771 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36772       fi
36773       # Try to locate tool using the code snippet
36774       if test -n "$ac_tool_prefix"; then
36775   for ac_prog in ar gcc-ar
36776   do
36777     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36778 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36780 $as_echo_n "checking for $ac_word... " >&6; }
36781 if ${ac_cv_prog_AR+:} false; then :
36782   $as_echo_n "(cached) " >&6
36783 else
36784   if test -n "$AR"; then
36785   ac_cv_prog_AR="$AR" # Let the user override the test.
36786 else
36787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36788 for as_dir in $PATH
36789 do
36790   IFS=$as_save_IFS
36791   test -z "$as_dir" && as_dir=.
36792     for ac_exec_ext in '' $ac_executable_extensions; do
36793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36794     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36796     break 2
36797   fi
36798 done
36799   done
36800 IFS=$as_save_IFS
36801 
36802 fi
36803 fi
36804 AR=$ac_cv_prog_AR
36805 if test -n "$AR"; then
36806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36807 $as_echo "$AR" >&6; }
36808 else
36809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36810 $as_echo "no" >&6; }
36811 fi
36812 
36813 
36814     test -n "$AR" && break
36815   done
36816 fi
36817 if test -z "$AR"; then
36818   ac_ct_AR=$AR
36819   for ac_prog in ar gcc-ar
36820 do
36821   # Extract the first word of "$ac_prog", so it can be a program name with args.
36822 set dummy $ac_prog; ac_word=$2
36823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36824 $as_echo_n "checking for $ac_word... " >&6; }
36825 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36826   $as_echo_n "(cached) " >&6
36827 else
36828   if test -n "$ac_ct_AR"; then
36829   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36830 else
36831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36832 for as_dir in $PATH
36833 do
36834   IFS=$as_save_IFS
36835   test -z "$as_dir" && as_dir=.
36836     for ac_exec_ext in '' $ac_executable_extensions; do
36837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36838     ac_cv_prog_ac_ct_AR="$ac_prog"
36839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36840     break 2
36841   fi
36842 done
36843   done
36844 IFS=$as_save_IFS
36845 
36846 fi
36847 fi
36848 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36849 if test -n "$ac_ct_AR"; then
36850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36851 $as_echo "$ac_ct_AR" >&6; }
36852 else
36853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36854 $as_echo "no" >&6; }
36855 fi
36856 
36857 
36858   test -n "$ac_ct_AR" && break
36859 done
36860 
36861   if test "x$ac_ct_AR" = x; then
36862     AR=""
36863   else
36864     case $cross_compiling:$ac_tool_warned in
36865 yes:)
36866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36867 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36868 ac_tool_warned=yes ;;
36869 esac
36870     AR=$ac_ct_AR
36871   fi
36872 fi
36873 
36874     else
36875       # If it succeeded, then it was overridden by the user. We will use it
36876       # for the tool.
36877 
36878       # First remove it from the list of overridden variables, so we can test
36879       # for unknown variables in the end.
36880       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36881 
36882       # Check if we try to supply an empty value
36883       if test "x$AR" = x; then
36884         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36885 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36886         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36887 $as_echo_n "checking for AR... " >&6; }
36888         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36889 $as_echo "disabled" >&6; }
36890       else
36891         # Check if the provided tool contains a complete path.
36892         tool_specified="$AR"
36893         tool_basename="${tool_specified##*/}"
36894         if test "x$tool_basename" = "x$tool_specified"; then
36895           # A command without a complete path is provided, search $PATH.
36896           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36897 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36898           # Extract the first word of "$tool_basename", so it can be a program name with args.
36899 set dummy $tool_basename; ac_word=$2
36900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36901 $as_echo_n "checking for $ac_word... " >&6; }
36902 if ${ac_cv_path_AR+:} false; then :
36903   $as_echo_n "(cached) " >&6
36904 else
36905   case $AR in
36906   [\\/]* | ?:[\\/]*)
36907   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36908   ;;
36909   *)
36910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36911 for as_dir in $PATH
36912 do
36913   IFS=$as_save_IFS
36914   test -z "$as_dir" && as_dir=.
36915     for ac_exec_ext in '' $ac_executable_extensions; do
36916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36917     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36919     break 2
36920   fi
36921 done
36922   done
36923 IFS=$as_save_IFS
36924 
36925   ;;
36926 esac
36927 fi
36928 AR=$ac_cv_path_AR
36929 if test -n "$AR"; then
36930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36931 $as_echo "$AR" >&6; }
36932 else
36933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36934 $as_echo "no" >&6; }
36935 fi
36936 
36937 
36938           if test "x$AR" = x; then
36939             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36940           fi
36941         else
36942           # Otherwise we believe it is a complete path. Use it as it is.
36943           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36944 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36945           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36946 $as_echo_n "checking for AR... " >&6; }
36947           if test ! -x "$tool_specified"; then
36948             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36949 $as_echo "not found" >&6; }
36950             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36951           fi
36952           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36953 $as_echo "$tool_specified" >&6; }
36954         fi
36955       fi
36956     fi
36957 
36958   fi
36959 
36960 
36961   else
36962 
36963 
36964   # Publish this variable in the help.
36965 
36966 
36967   if [ -z "${AR+x}" ]; then
36968     # The variable is not set by user, try to locate tool using the code snippet
36969     if test -n "$ac_tool_prefix"; then
36970   for ac_prog in ar
36971   do
36972     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36973 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36975 $as_echo_n "checking for $ac_word... " >&6; }
36976 if ${ac_cv_prog_AR+:} false; then :
36977   $as_echo_n "(cached) " >&6
36978 else
36979   if test -n "$AR"; then
36980   ac_cv_prog_AR="$AR" # Let the user override the test.
36981 else
36982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36983 for as_dir in $PATH
36984 do
36985   IFS=$as_save_IFS
36986   test -z "$as_dir" && as_dir=.
36987     for ac_exec_ext in '' $ac_executable_extensions; do
36988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36989     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36991     break 2
36992   fi
36993 done
36994   done
36995 IFS=$as_save_IFS
36996 
36997 fi
36998 fi
36999 AR=$ac_cv_prog_AR
37000 if test -n "$AR"; then
37001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37002 $as_echo "$AR" >&6; }
37003 else
37004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37005 $as_echo "no" >&6; }
37006 fi
37007 
37008 
37009     test -n "$AR" && break
37010   done
37011 fi
37012 if test -z "$AR"; then
37013   ac_ct_AR=$AR
37014   for ac_prog in ar
37015 do
37016   # Extract the first word of "$ac_prog", so it can be a program name with args.
37017 set dummy $ac_prog; ac_word=$2
37018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37019 $as_echo_n "checking for $ac_word... " >&6; }
37020 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37021   $as_echo_n "(cached) " >&6
37022 else
37023   if test -n "$ac_ct_AR"; then
37024   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37025 else
37026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37027 for as_dir in $PATH
37028 do
37029   IFS=$as_save_IFS
37030   test -z "$as_dir" && as_dir=.
37031     for ac_exec_ext in '' $ac_executable_extensions; do
37032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37033     ac_cv_prog_ac_ct_AR="$ac_prog"
37034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37035     break 2
37036   fi
37037 done
37038   done
37039 IFS=$as_save_IFS
37040 
37041 fi
37042 fi
37043 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37044 if test -n "$ac_ct_AR"; then
37045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37046 $as_echo "$ac_ct_AR" >&6; }
37047 else
37048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37049 $as_echo "no" >&6; }
37050 fi
37051 
37052 
37053   test -n "$ac_ct_AR" && break
37054 done
37055 
37056   if test "x$ac_ct_AR" = x; then
37057     AR=""
37058   else
37059     case $cross_compiling:$ac_tool_warned in
37060 yes:)
37061 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37062 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37063 ac_tool_warned=yes ;;
37064 esac
37065     AR=$ac_ct_AR
37066   fi
37067 fi
37068 
37069   else
37070     # The variable is set, but is it from the command line or the environment?
37071 
37072     # Try to remove the string !AR! from our list.
37073     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37074     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37075       # If it failed, the variable was not from the command line. Ignore it,
37076       # but warn the user (except for BASH, which is always set by the calling BASH).
37077       if test "xAR" != xBASH; then
37078         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37079 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37080       fi
37081       # Try to locate tool using the code snippet
37082       if test -n "$ac_tool_prefix"; then
37083   for ac_prog in ar
37084   do
37085     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37086 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37088 $as_echo_n "checking for $ac_word... " >&6; }
37089 if ${ac_cv_prog_AR+:} false; then :
37090   $as_echo_n "(cached) " >&6
37091 else
37092   if test -n "$AR"; then
37093   ac_cv_prog_AR="$AR" # Let the user override the test.
37094 else
37095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37096 for as_dir in $PATH
37097 do
37098   IFS=$as_save_IFS
37099   test -z "$as_dir" && as_dir=.
37100     for ac_exec_ext in '' $ac_executable_extensions; do
37101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37102     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37104     break 2
37105   fi
37106 done
37107   done
37108 IFS=$as_save_IFS
37109 
37110 fi
37111 fi
37112 AR=$ac_cv_prog_AR
37113 if test -n "$AR"; then
37114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37115 $as_echo "$AR" >&6; }
37116 else
37117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37118 $as_echo "no" >&6; }
37119 fi
37120 
37121 
37122     test -n "$AR" && break
37123   done
37124 fi
37125 if test -z "$AR"; then
37126   ac_ct_AR=$AR
37127   for ac_prog in ar
37128 do
37129   # Extract the first word of "$ac_prog", so it can be a program name with args.
37130 set dummy $ac_prog; ac_word=$2
37131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37132 $as_echo_n "checking for $ac_word... " >&6; }
37133 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37134   $as_echo_n "(cached) " >&6
37135 else
37136   if test -n "$ac_ct_AR"; then
37137   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37138 else
37139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37140 for as_dir in $PATH
37141 do
37142   IFS=$as_save_IFS
37143   test -z "$as_dir" && as_dir=.
37144     for ac_exec_ext in '' $ac_executable_extensions; do
37145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37146     ac_cv_prog_ac_ct_AR="$ac_prog"
37147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37148     break 2
37149   fi
37150 done
37151   done
37152 IFS=$as_save_IFS
37153 
37154 fi
37155 fi
37156 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37157 if test -n "$ac_ct_AR"; then
37158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37159 $as_echo "$ac_ct_AR" >&6; }
37160 else
37161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37162 $as_echo "no" >&6; }
37163 fi
37164 
37165 
37166   test -n "$ac_ct_AR" && break
37167 done
37168 
37169   if test "x$ac_ct_AR" = x; then
37170     AR=""
37171   else
37172     case $cross_compiling:$ac_tool_warned in
37173 yes:)
37174 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37175 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37176 ac_tool_warned=yes ;;
37177 esac
37178     AR=$ac_ct_AR
37179   fi
37180 fi
37181 
37182     else
37183       # If it succeeded, then it was overridden by the user. We will use it
37184       # for the tool.
37185 
37186       # First remove it from the list of overridden variables, so we can test
37187       # for unknown variables in the end.
37188       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37189 
37190       # Check if we try to supply an empty value
37191       if test "x$AR" = x; then
37192         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37193 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37194         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37195 $as_echo_n "checking for AR... " >&6; }
37196         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37197 $as_echo "disabled" >&6; }
37198       else
37199         # Check if the provided tool contains a complete path.
37200         tool_specified="$AR"
37201         tool_basename="${tool_specified##*/}"
37202         if test "x$tool_basename" = "x$tool_specified"; then
37203           # A command without a complete path is provided, search $PATH.
37204           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37205 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37206           # Extract the first word of "$tool_basename", so it can be a program name with args.
37207 set dummy $tool_basename; ac_word=$2
37208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37209 $as_echo_n "checking for $ac_word... " >&6; }
37210 if ${ac_cv_path_AR+:} false; then :
37211   $as_echo_n "(cached) " >&6
37212 else
37213   case $AR in
37214   [\\/]* | ?:[\\/]*)
37215   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37216   ;;
37217   *)
37218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37219 for as_dir in $PATH
37220 do
37221   IFS=$as_save_IFS
37222   test -z "$as_dir" && as_dir=.
37223     for ac_exec_ext in '' $ac_executable_extensions; do
37224   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37225     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37227     break 2
37228   fi
37229 done
37230   done
37231 IFS=$as_save_IFS
37232 
37233   ;;
37234 esac
37235 fi
37236 AR=$ac_cv_path_AR
37237 if test -n "$AR"; then
37238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37239 $as_echo "$AR" >&6; }
37240 else
37241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37242 $as_echo "no" >&6; }
37243 fi
37244 
37245 
37246           if test "x$AR" = x; then
37247             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37248           fi
37249         else
37250           # Otherwise we believe it is a complete path. Use it as it is.
37251           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37252 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37253           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37254 $as_echo_n "checking for AR... " >&6; }
37255           if test ! -x "$tool_specified"; then
37256             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37257 $as_echo "not found" >&6; }
37258             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37259           fi
37260           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37261 $as_echo "$tool_specified" >&6; }
37262         fi
37263       fi
37264     fi
37265 
37266   fi
37267 
37268 
37269   fi
37270 
37271   # Only process if variable expands to non-empty
37272 
37273   if test "x$AR" != x; then
37274     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37275 
37276   # First separate the path from the arguments. This will split at the first
37277   # space.
37278   complete="$AR"
37279   path="${complete%% *}"
37280   tmp="$complete EOL"
37281   arguments="${tmp#* }"
37282 
37283   # Input might be given as Windows format, start by converting to
37284   # unix format.
37285   new_path=`$CYGPATH -u "$path"`
37286 
37287   # Now try to locate executable using which
37288   new_path=`$WHICH "$new_path" 2> /dev/null`
37289   # bat and cmd files are not always considered executable in cygwin causing which
37290   # to not find them
37291   if test "x$new_path" = x \
37292       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37293       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37294     new_path=`$CYGPATH -u "$path"`
37295   fi
37296   if test "x$new_path" = x; then
37297     # Oops. Which didn't find the executable.
37298     # The splitting of arguments from the executable at a space might have been incorrect,
37299     # since paths with space are more likely in Windows. Give it another try with the whole
37300     # argument.
37301     path="$complete"
37302     arguments="EOL"
37303     new_path=`$CYGPATH -u "$path"`
37304     new_path=`$WHICH "$new_path" 2> /dev/null`
37305     # bat and cmd files are not always considered executable in cygwin causing which
37306     # to not find them
37307     if test "x$new_path" = x \
37308         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37309         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37310       new_path=`$CYGPATH -u "$path"`
37311     fi
37312     if test "x$new_path" = x; then
37313       # It's still not found. Now this is an unrecoverable error.
37314       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37315 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37316       has_space=`$ECHO "$complete" | $GREP " "`
37317       if test "x$has_space" != x; then
37318         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37319 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37320       fi
37321       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37322     fi
37323   fi
37324 
37325   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37326   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37327   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37328   # "foo.exe" is OK but "foo" is an error.
37329   #
37330   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37331   # It is also a way to make sure we got the proper file name for the real test later on.
37332   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37333   if test "x$test_shortpath" = x; then
37334     # Short path failed, file does not exist as specified.
37335     # Try adding .exe or .cmd
37336     if test -f "${new_path}.exe"; then
37337       input_to_shortpath="${new_path}.exe"
37338     elif test -f "${new_path}.cmd"; then
37339       input_to_shortpath="${new_path}.cmd"
37340     else
37341       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37342 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37343       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37344 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37345       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37346     fi
37347   else
37348     input_to_shortpath="$new_path"
37349   fi
37350 
37351   # Call helper function which possibly converts this using DOS-style short mode.
37352   # If so, the updated path is stored in $new_path.
37353   new_path="$input_to_shortpath"
37354 
37355   input_path="$input_to_shortpath"
37356   # Check if we need to convert this using DOS-style short mode. If the path
37357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37358   # take no chances and rewrite it.
37359   # Note: m4 eats our [], so we need to use [ and ] instead.
37360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37361   if test "x$has_forbidden_chars" != x; then
37362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37363     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37364     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37365     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37366       # Going to short mode and back again did indeed matter. Since short mode is
37367       # case insensitive, let's make it lowercase to improve readability.
37368       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37369       # Now convert it back to Unix-style (cygpath)
37370       input_path=`$CYGPATH -u "$shortmode_path"`
37371       new_path="$input_path"
37372     fi
37373   fi
37374 
37375   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37376   if test "x$test_cygdrive_prefix" = x; then
37377     # As a simple fix, exclude /usr/bin since it's not a real path.
37378     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37379       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37380       # a path prefixed by /cygdrive for fixpath to work.
37381       new_path="$CYGWIN_ROOT_PATH$input_path"
37382     fi
37383   fi
37384 
37385   # remove trailing .exe if any
37386   new_path="${new_path/%.exe/}"
37387 
37388     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37389 
37390   # First separate the path from the arguments. This will split at the first
37391   # space.
37392   complete="$AR"
37393   path="${complete%% *}"
37394   tmp="$complete EOL"
37395   arguments="${tmp#* }"
37396 
37397   # Input might be given as Windows format, start by converting to
37398   # unix format.
37399   new_path="$path"
37400 
37401   windows_path="$new_path"
37402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37403     unix_path=`$CYGPATH -u "$windows_path"`
37404     new_path="$unix_path"
37405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37407     new_path="$unix_path"
37408   fi
37409 
37410 
37411   # Now try to locate executable using which
37412   new_path=`$WHICH "$new_path" 2> /dev/null`
37413 
37414   if test "x$new_path" = x; then
37415     # Oops. Which didn't find the executable.
37416     # The splitting of arguments from the executable at a space might have been incorrect,
37417     # since paths with space are more likely in Windows. Give it another try with the whole
37418     # argument.
37419     path="$complete"
37420     arguments="EOL"
37421     new_path="$path"
37422 
37423   windows_path="$new_path"
37424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37425     unix_path=`$CYGPATH -u "$windows_path"`
37426     new_path="$unix_path"
37427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37429     new_path="$unix_path"
37430   fi
37431 
37432 
37433     new_path=`$WHICH "$new_path" 2> /dev/null`
37434     # bat and cmd files are not always considered executable in MSYS causing which
37435     # to not find them
37436     if test "x$new_path" = x \
37437         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37438         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37439       new_path="$path"
37440 
37441   windows_path="$new_path"
37442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37443     unix_path=`$CYGPATH -u "$windows_path"`
37444     new_path="$unix_path"
37445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37446     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37447     new_path="$unix_path"
37448   fi
37449 
37450     fi
37451 
37452     if test "x$new_path" = x; then
37453       # It's still not found. Now this is an unrecoverable error.
37454       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37455 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37456       has_space=`$ECHO "$complete" | $GREP " "`
37457       if test "x$has_space" != x; then
37458         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37459 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37460       fi
37461       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37462     fi
37463   fi
37464 
37465   # Now new_path has a complete unix path to the binary
37466   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37467     # Keep paths in /bin as-is, but remove trailing .exe if any
37468     new_path="${new_path/%.exe/}"
37469     # Do not save /bin paths to all_fixpath_prefixes!
37470   else
37471     # Not in mixed or Windows style, start by that.
37472     new_path=`cmd //c echo $new_path`
37473 
37474   input_path="$new_path"
37475   # Check if we need to convert this using DOS-style short mode. If the path
37476   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37477   # take no chances and rewrite it.
37478   # Note: m4 eats our [], so we need to use [ and ] instead.
37479   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37480   if test "x$has_forbidden_chars" != x; then
37481     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37482     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37483   fi
37484 
37485     # Output is in $new_path
37486 
37487   windows_path="$new_path"
37488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37489     unix_path=`$CYGPATH -u "$windows_path"`
37490     new_path="$unix_path"
37491   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37492     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37493     new_path="$unix_path"
37494   fi
37495 
37496     # remove trailing .exe if any
37497     new_path="${new_path/%.exe/}"
37498 
37499     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37500     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37501   fi
37502 
37503     else
37504       # We're on a unix platform. Hooray! :)
37505       # First separate the path from the arguments. This will split at the first
37506       # space.
37507       complete="$AR"
37508       path="${complete%% *}"
37509       tmp="$complete EOL"
37510       arguments="${tmp#* }"
37511 
37512       # Cannot rely on the command "which" here since it doesn't always work.
37513       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37514       if test -z "$is_absolute_path"; then
37515         # Path to executable is not absolute. Find it.
37516         IFS_save="$IFS"
37517         IFS=:
37518         for p in $PATH; do
37519           if test -f "$p/$path" && test -x "$p/$path"; then
37520             new_path="$p/$path"
37521             break
37522           fi
37523         done
37524         IFS="$IFS_save"
37525       else
37526         # This is an absolute path, we can use it without further modifications.
37527         new_path="$path"
37528       fi
37529 
37530       if test "x$new_path" = x; then
37531         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37532 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37533         has_space=`$ECHO "$complete" | $GREP " "`
37534         if test "x$has_space" != x; then
37535           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37536 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37537         fi
37538         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37539       fi
37540     fi
37541 
37542     # Now join together the path and the arguments once again
37543     if test "x$arguments" != xEOL; then
37544       new_complete="$new_path ${arguments% *}"
37545     else
37546       new_complete="$new_path"
37547     fi
37548 
37549     if test "x$complete" != "x$new_complete"; then
37550       AR="$new_complete"
37551       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37552 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37553     fi
37554   fi
37555 
37556 
37557 
37558   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37559 
37560 
37561   # Publish this variable in the help.
37562 
37563 
37564   if [ -z "${LIPO+x}" ]; then
37565     # The variable is not set by user, try to locate tool using the code snippet
37566     for ac_prog in lipo
37567 do
37568   # Extract the first word of "$ac_prog", so it can be a program name with args.
37569 set dummy $ac_prog; ac_word=$2
37570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37571 $as_echo_n "checking for $ac_word... " >&6; }
37572 if ${ac_cv_path_LIPO+:} false; then :
37573   $as_echo_n "(cached) " >&6
37574 else
37575   case $LIPO in
37576   [\\/]* | ?:[\\/]*)
37577   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37578   ;;
37579   *)
37580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37581 for as_dir in $PATH
37582 do
37583   IFS=$as_save_IFS
37584   test -z "$as_dir" && as_dir=.
37585     for ac_exec_ext in '' $ac_executable_extensions; do
37586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37587     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37589     break 2
37590   fi
37591 done
37592   done
37593 IFS=$as_save_IFS
37594 
37595   ;;
37596 esac
37597 fi
37598 LIPO=$ac_cv_path_LIPO
37599 if test -n "$LIPO"; then
37600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37601 $as_echo "$LIPO" >&6; }
37602 else
37603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37604 $as_echo "no" >&6; }
37605 fi
37606 
37607 
37608   test -n "$LIPO" && break
37609 done
37610 
37611   else
37612     # The variable is set, but is it from the command line or the environment?
37613 
37614     # Try to remove the string !LIPO! from our list.
37615     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37616     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37617       # If it failed, the variable was not from the command line. Ignore it,
37618       # but warn the user (except for BASH, which is always set by the calling BASH).
37619       if test "xLIPO" != xBASH; then
37620         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37621 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37622       fi
37623       # Try to locate tool using the code snippet
37624       for ac_prog in lipo
37625 do
37626   # Extract the first word of "$ac_prog", so it can be a program name with args.
37627 set dummy $ac_prog; ac_word=$2
37628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37629 $as_echo_n "checking for $ac_word... " >&6; }
37630 if ${ac_cv_path_LIPO+:} false; then :
37631   $as_echo_n "(cached) " >&6
37632 else
37633   case $LIPO in
37634   [\\/]* | ?:[\\/]*)
37635   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37636   ;;
37637   *)
37638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37639 for as_dir in $PATH
37640 do
37641   IFS=$as_save_IFS
37642   test -z "$as_dir" && as_dir=.
37643     for ac_exec_ext in '' $ac_executable_extensions; do
37644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37645     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37647     break 2
37648   fi
37649 done
37650   done
37651 IFS=$as_save_IFS
37652 
37653   ;;
37654 esac
37655 fi
37656 LIPO=$ac_cv_path_LIPO
37657 if test -n "$LIPO"; then
37658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37659 $as_echo "$LIPO" >&6; }
37660 else
37661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37662 $as_echo "no" >&6; }
37663 fi
37664 
37665 
37666   test -n "$LIPO" && break
37667 done
37668 
37669     else
37670       # If it succeeded, then it was overridden by the user. We will use it
37671       # for the tool.
37672 
37673       # First remove it from the list of overridden variables, so we can test
37674       # for unknown variables in the end.
37675       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37676 
37677       # Check if we try to supply an empty value
37678       if test "x$LIPO" = x; then
37679         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37680 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37681         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37682 $as_echo_n "checking for LIPO... " >&6; }
37683         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37684 $as_echo "disabled" >&6; }
37685       else
37686         # Check if the provided tool contains a complete path.
37687         tool_specified="$LIPO"
37688         tool_basename="${tool_specified##*/}"
37689         if test "x$tool_basename" = "x$tool_specified"; then
37690           # A command without a complete path is provided, search $PATH.
37691           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37692 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37693           # Extract the first word of "$tool_basename", so it can be a program name with args.
37694 set dummy $tool_basename; ac_word=$2
37695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37696 $as_echo_n "checking for $ac_word... " >&6; }
37697 if ${ac_cv_path_LIPO+:} false; then :
37698   $as_echo_n "(cached) " >&6
37699 else
37700   case $LIPO in
37701   [\\/]* | ?:[\\/]*)
37702   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37703   ;;
37704   *)
37705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37706 for as_dir in $PATH
37707 do
37708   IFS=$as_save_IFS
37709   test -z "$as_dir" && as_dir=.
37710     for ac_exec_ext in '' $ac_executable_extensions; do
37711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37712     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37714     break 2
37715   fi
37716 done
37717   done
37718 IFS=$as_save_IFS
37719 
37720   ;;
37721 esac
37722 fi
37723 LIPO=$ac_cv_path_LIPO
37724 if test -n "$LIPO"; then
37725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37726 $as_echo "$LIPO" >&6; }
37727 else
37728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37729 $as_echo "no" >&6; }
37730 fi
37731 
37732 
37733           if test "x$LIPO" = x; then
37734             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37735           fi
37736         else
37737           # Otherwise we believe it is a complete path. Use it as it is.
37738           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37739 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37740           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37741 $as_echo_n "checking for LIPO... " >&6; }
37742           if test ! -x "$tool_specified"; then
37743             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37744 $as_echo "not found" >&6; }
37745             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37746           fi
37747           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37748 $as_echo "$tool_specified" >&6; }
37749         fi
37750       fi
37751     fi
37752 
37753   fi
37754 
37755 
37756 
37757   # Only process if variable expands to non-empty
37758 
37759   if test "x$LIPO" != x; then
37760     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37761 
37762   # First separate the path from the arguments. This will split at the first
37763   # space.
37764   complete="$LIPO"
37765   path="${complete%% *}"
37766   tmp="$complete EOL"
37767   arguments="${tmp#* }"
37768 
37769   # Input might be given as Windows format, start by converting to
37770   # unix format.
37771   new_path=`$CYGPATH -u "$path"`
37772 
37773   # Now try to locate executable using which
37774   new_path=`$WHICH "$new_path" 2> /dev/null`
37775   # bat and cmd files are not always considered executable in cygwin causing which
37776   # to not find them
37777   if test "x$new_path" = x \
37778       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37779       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37780     new_path=`$CYGPATH -u "$path"`
37781   fi
37782   if test "x$new_path" = x; then
37783     # Oops. Which didn't find the executable.
37784     # The splitting of arguments from the executable at a space might have been incorrect,
37785     # since paths with space are more likely in Windows. Give it another try with the whole
37786     # argument.
37787     path="$complete"
37788     arguments="EOL"
37789     new_path=`$CYGPATH -u "$path"`
37790     new_path=`$WHICH "$new_path" 2> /dev/null`
37791     # bat and cmd files are not always considered executable in cygwin causing which
37792     # to not find them
37793     if test "x$new_path" = x \
37794         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37795         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37796       new_path=`$CYGPATH -u "$path"`
37797     fi
37798     if test "x$new_path" = x; then
37799       # It's still not found. Now this is an unrecoverable error.
37800       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37801 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37802       has_space=`$ECHO "$complete" | $GREP " "`
37803       if test "x$has_space" != x; then
37804         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37805 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37806       fi
37807       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37808     fi
37809   fi
37810 
37811   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37812   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37813   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37814   # "foo.exe" is OK but "foo" is an error.
37815   #
37816   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37817   # It is also a way to make sure we got the proper file name for the real test later on.
37818   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37819   if test "x$test_shortpath" = x; then
37820     # Short path failed, file does not exist as specified.
37821     # Try adding .exe or .cmd
37822     if test -f "${new_path}.exe"; then
37823       input_to_shortpath="${new_path}.exe"
37824     elif test -f "${new_path}.cmd"; then
37825       input_to_shortpath="${new_path}.cmd"
37826     else
37827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37828 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37829       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37830 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37831       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37832     fi
37833   else
37834     input_to_shortpath="$new_path"
37835   fi
37836 
37837   # Call helper function which possibly converts this using DOS-style short mode.
37838   # If so, the updated path is stored in $new_path.
37839   new_path="$input_to_shortpath"
37840 
37841   input_path="$input_to_shortpath"
37842   # Check if we need to convert this using DOS-style short mode. If the path
37843   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37844   # take no chances and rewrite it.
37845   # Note: m4 eats our [], so we need to use [ and ] instead.
37846   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37847   if test "x$has_forbidden_chars" != x; then
37848     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37849     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37850     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37851     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37852       # Going to short mode and back again did indeed matter. Since short mode is
37853       # case insensitive, let's make it lowercase to improve readability.
37854       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37855       # Now convert it back to Unix-style (cygpath)
37856       input_path=`$CYGPATH -u "$shortmode_path"`
37857       new_path="$input_path"
37858     fi
37859   fi
37860 
37861   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37862   if test "x$test_cygdrive_prefix" = x; then
37863     # As a simple fix, exclude /usr/bin since it's not a real path.
37864     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37865       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37866       # a path prefixed by /cygdrive for fixpath to work.
37867       new_path="$CYGWIN_ROOT_PATH$input_path"
37868     fi
37869   fi
37870 
37871   # remove trailing .exe if any
37872   new_path="${new_path/%.exe/}"
37873 
37874     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37875 
37876   # First separate the path from the arguments. This will split at the first
37877   # space.
37878   complete="$LIPO"
37879   path="${complete%% *}"
37880   tmp="$complete EOL"
37881   arguments="${tmp#* }"
37882 
37883   # Input might be given as Windows format, start by converting to
37884   # unix format.
37885   new_path="$path"
37886 
37887   windows_path="$new_path"
37888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37889     unix_path=`$CYGPATH -u "$windows_path"`
37890     new_path="$unix_path"
37891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37892     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37893     new_path="$unix_path"
37894   fi
37895 
37896 
37897   # Now try to locate executable using which
37898   new_path=`$WHICH "$new_path" 2> /dev/null`
37899 
37900   if test "x$new_path" = x; then
37901     # Oops. Which didn't find the executable.
37902     # The splitting of arguments from the executable at a space might have been incorrect,
37903     # since paths with space are more likely in Windows. Give it another try with the whole
37904     # argument.
37905     path="$complete"
37906     arguments="EOL"
37907     new_path="$path"
37908 
37909   windows_path="$new_path"
37910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37911     unix_path=`$CYGPATH -u "$windows_path"`
37912     new_path="$unix_path"
37913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37915     new_path="$unix_path"
37916   fi
37917 
37918 
37919     new_path=`$WHICH "$new_path" 2> /dev/null`
37920     # bat and cmd files are not always considered executable in MSYS causing which
37921     # to not find them
37922     if test "x$new_path" = x \
37923         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37924         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37925       new_path="$path"
37926 
37927   windows_path="$new_path"
37928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37929     unix_path=`$CYGPATH -u "$windows_path"`
37930     new_path="$unix_path"
37931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37933     new_path="$unix_path"
37934   fi
37935 
37936     fi
37937 
37938     if test "x$new_path" = x; then
37939       # It's still not found. Now this is an unrecoverable error.
37940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37941 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37942       has_space=`$ECHO "$complete" | $GREP " "`
37943       if test "x$has_space" != x; then
37944         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37945 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37946       fi
37947       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37948     fi
37949   fi
37950 
37951   # Now new_path has a complete unix path to the binary
37952   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37953     # Keep paths in /bin as-is, but remove trailing .exe if any
37954     new_path="${new_path/%.exe/}"
37955     # Do not save /bin paths to all_fixpath_prefixes!
37956   else
37957     # Not in mixed or Windows style, start by that.
37958     new_path=`cmd //c echo $new_path`
37959 
37960   input_path="$new_path"
37961   # Check if we need to convert this using DOS-style short mode. If the path
37962   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37963   # take no chances and rewrite it.
37964   # Note: m4 eats our [], so we need to use [ and ] instead.
37965   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37966   if test "x$has_forbidden_chars" != x; then
37967     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37968     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37969   fi
37970 
37971     # Output is in $new_path
37972 
37973   windows_path="$new_path"
37974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37975     unix_path=`$CYGPATH -u "$windows_path"`
37976     new_path="$unix_path"
37977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37979     new_path="$unix_path"
37980   fi
37981 
37982     # remove trailing .exe if any
37983     new_path="${new_path/%.exe/}"
37984 
37985     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37986     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37987   fi
37988 
37989     else
37990       # We're on a unix platform. Hooray! :)
37991       # First separate the path from the arguments. This will split at the first
37992       # space.
37993       complete="$LIPO"
37994       path="${complete%% *}"
37995       tmp="$complete EOL"
37996       arguments="${tmp#* }"
37997 
37998       # Cannot rely on the command "which" here since it doesn't always work.
37999       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38000       if test -z "$is_absolute_path"; then
38001         # Path to executable is not absolute. Find it.
38002         IFS_save="$IFS"
38003         IFS=:
38004         for p in $PATH; do
38005           if test -f "$p/$path" && test -x "$p/$path"; then
38006             new_path="$p/$path"
38007             break
38008           fi
38009         done
38010         IFS="$IFS_save"
38011       else
38012         # This is an absolute path, we can use it without further modifications.
38013         new_path="$path"
38014       fi
38015 
38016       if test "x$new_path" = x; then
38017         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38018 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38019         has_space=`$ECHO "$complete" | $GREP " "`
38020         if test "x$has_space" != x; then
38021           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38022 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38023         fi
38024         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38025       fi
38026     fi
38027 
38028     # Now join together the path and the arguments once again
38029     if test "x$arguments" != xEOL; then
38030       new_complete="$new_path ${arguments% *}"
38031     else
38032       new_complete="$new_path"
38033     fi
38034 
38035     if test "x$complete" != "x$new_complete"; then
38036       LIPO="$new_complete"
38037       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38038 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38039     fi
38040   fi
38041 
38042   fi
38043 
38044   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38045     # Extract the first word of "mt", so it can be a program name with args.
38046 set dummy mt; ac_word=$2
38047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38048 $as_echo_n "checking for $ac_word... " >&6; }
38049 if ${ac_cv_prog_MT+:} false; then :
38050   $as_echo_n "(cached) " >&6
38051 else
38052   if test -n "$MT"; then
38053   ac_cv_prog_MT="$MT" # Let the user override the test.
38054 else
38055   ac_prog_rejected=no
38056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38057 for as_dir in $PATH
38058 do
38059   IFS=$as_save_IFS
38060   test -z "$as_dir" && as_dir=.
38061     for ac_exec_ext in '' $ac_executable_extensions; do
38062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38063     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38064        ac_prog_rejected=yes
38065        continue
38066      fi
38067     ac_cv_prog_MT="mt"
38068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38069     break 2
38070   fi
38071 done
38072   done
38073 IFS=$as_save_IFS
38074 
38075 if test $ac_prog_rejected = yes; then
38076   # We found a bogon in the path, so make sure we never use it.
38077   set dummy $ac_cv_prog_MT
38078   shift
38079   if test $# != 0; then
38080     # We chose a different compiler from the bogus one.
38081     # However, it has the same basename, so the bogon will be chosen
38082     # first if we set MT to just the basename; use the full file name.
38083     shift
38084     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38085   fi
38086 fi
38087 fi
38088 fi
38089 MT=$ac_cv_prog_MT
38090 if test -n "$MT"; then
38091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38092 $as_echo "$MT" >&6; }
38093 else
38094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38095 $as_echo "no" >&6; }
38096 fi
38097 
38098 
38099 
38100   # Only process if variable expands to non-empty
38101 
38102   if test "x$MT" != x; then
38103     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38104 
38105   # First separate the path from the arguments. This will split at the first
38106   # space.
38107   complete="$MT"
38108   path="${complete%% *}"
38109   tmp="$complete EOL"
38110   arguments="${tmp#* }"
38111 
38112   # Input might be given as Windows format, start by converting to
38113   # unix format.
38114   new_path=`$CYGPATH -u "$path"`
38115 
38116   # Now try to locate executable using which
38117   new_path=`$WHICH "$new_path" 2> /dev/null`
38118   # bat and cmd files are not always considered executable in cygwin causing which
38119   # to not find them
38120   if test "x$new_path" = x \
38121       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38122       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38123     new_path=`$CYGPATH -u "$path"`
38124   fi
38125   if test "x$new_path" = x; then
38126     # Oops. Which didn't find the executable.
38127     # The splitting of arguments from the executable at a space might have been incorrect,
38128     # since paths with space are more likely in Windows. Give it another try with the whole
38129     # argument.
38130     path="$complete"
38131     arguments="EOL"
38132     new_path=`$CYGPATH -u "$path"`
38133     new_path=`$WHICH "$new_path" 2> /dev/null`
38134     # bat and cmd files are not always considered executable in cygwin causing which
38135     # to not find them
38136     if test "x$new_path" = x \
38137         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38138         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38139       new_path=`$CYGPATH -u "$path"`
38140     fi
38141     if test "x$new_path" = x; then
38142       # It's still not found. Now this is an unrecoverable error.
38143       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38144 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38145       has_space=`$ECHO "$complete" | $GREP " "`
38146       if test "x$has_space" != x; then
38147         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38148 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38149       fi
38150       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38151     fi
38152   fi
38153 
38154   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38155   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38156   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38157   # "foo.exe" is OK but "foo" is an error.
38158   #
38159   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38160   # It is also a way to make sure we got the proper file name for the real test later on.
38161   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38162   if test "x$test_shortpath" = x; then
38163     # Short path failed, file does not exist as specified.
38164     # Try adding .exe or .cmd
38165     if test -f "${new_path}.exe"; then
38166       input_to_shortpath="${new_path}.exe"
38167     elif test -f "${new_path}.cmd"; then
38168       input_to_shortpath="${new_path}.cmd"
38169     else
38170       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38171 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38172       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38173 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38174       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38175     fi
38176   else
38177     input_to_shortpath="$new_path"
38178   fi
38179 
38180   # Call helper function which possibly converts this using DOS-style short mode.
38181   # If so, the updated path is stored in $new_path.
38182   new_path="$input_to_shortpath"
38183 
38184   input_path="$input_to_shortpath"
38185   # Check if we need to convert this using DOS-style short mode. If the path
38186   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38187   # take no chances and rewrite it.
38188   # Note: m4 eats our [], so we need to use [ and ] instead.
38189   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38190   if test "x$has_forbidden_chars" != x; then
38191     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38192     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38193     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38194     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38195       # Going to short mode and back again did indeed matter. Since short mode is
38196       # case insensitive, let's make it lowercase to improve readability.
38197       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38198       # Now convert it back to Unix-style (cygpath)
38199       input_path=`$CYGPATH -u "$shortmode_path"`
38200       new_path="$input_path"
38201     fi
38202   fi
38203 
38204   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38205   if test "x$test_cygdrive_prefix" = x; then
38206     # As a simple fix, exclude /usr/bin since it's not a real path.
38207     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38208       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38209       # a path prefixed by /cygdrive for fixpath to work.
38210       new_path="$CYGWIN_ROOT_PATH$input_path"
38211     fi
38212   fi
38213 
38214   # remove trailing .exe if any
38215   new_path="${new_path/%.exe/}"
38216 
38217     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38218 
38219   # First separate the path from the arguments. This will split at the first
38220   # space.
38221   complete="$MT"
38222   path="${complete%% *}"
38223   tmp="$complete EOL"
38224   arguments="${tmp#* }"
38225 
38226   # Input might be given as Windows format, start by converting to
38227   # unix format.
38228   new_path="$path"
38229 
38230   windows_path="$new_path"
38231   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38232     unix_path=`$CYGPATH -u "$windows_path"`
38233     new_path="$unix_path"
38234   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38235     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38236     new_path="$unix_path"
38237   fi
38238 
38239 
38240   # Now try to locate executable using which
38241   new_path=`$WHICH "$new_path" 2> /dev/null`
38242 
38243   if test "x$new_path" = x; then
38244     # Oops. Which didn't find the executable.
38245     # The splitting of arguments from the executable at a space might have been incorrect,
38246     # since paths with space are more likely in Windows. Give it another try with the whole
38247     # argument.
38248     path="$complete"
38249     arguments="EOL"
38250     new_path="$path"
38251 
38252   windows_path="$new_path"
38253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38254     unix_path=`$CYGPATH -u "$windows_path"`
38255     new_path="$unix_path"
38256   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38257     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38258     new_path="$unix_path"
38259   fi
38260 
38261 
38262     new_path=`$WHICH "$new_path" 2> /dev/null`
38263     # bat and cmd files are not always considered executable in MSYS causing which
38264     # to not find them
38265     if test "x$new_path" = x \
38266         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38267         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38268       new_path="$path"
38269 
38270   windows_path="$new_path"
38271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38272     unix_path=`$CYGPATH -u "$windows_path"`
38273     new_path="$unix_path"
38274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38276     new_path="$unix_path"
38277   fi
38278 
38279     fi
38280 
38281     if test "x$new_path" = x; then
38282       # It's still not found. Now this is an unrecoverable error.
38283       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38284 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38285       has_space=`$ECHO "$complete" | $GREP " "`
38286       if test "x$has_space" != x; then
38287         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38288 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38289       fi
38290       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38291     fi
38292   fi
38293 
38294   # Now new_path has a complete unix path to the binary
38295   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38296     # Keep paths in /bin as-is, but remove trailing .exe if any
38297     new_path="${new_path/%.exe/}"
38298     # Do not save /bin paths to all_fixpath_prefixes!
38299   else
38300     # Not in mixed or Windows style, start by that.
38301     new_path=`cmd //c echo $new_path`
38302 
38303   input_path="$new_path"
38304   # Check if we need to convert this using DOS-style short mode. If the path
38305   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38306   # take no chances and rewrite it.
38307   # Note: m4 eats our [], so we need to use [ and ] instead.
38308   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38309   if test "x$has_forbidden_chars" != x; then
38310     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38311     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38312   fi
38313 
38314     # Output is in $new_path
38315 
38316   windows_path="$new_path"
38317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38318     unix_path=`$CYGPATH -u "$windows_path"`
38319     new_path="$unix_path"
38320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38322     new_path="$unix_path"
38323   fi
38324 
38325     # remove trailing .exe if any
38326     new_path="${new_path/%.exe/}"
38327 
38328     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38329     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38330   fi
38331 
38332     else
38333       # We're on a unix platform. Hooray! :)
38334       # First separate the path from the arguments. This will split at the first
38335       # space.
38336       complete="$MT"
38337       path="${complete%% *}"
38338       tmp="$complete EOL"
38339       arguments="${tmp#* }"
38340 
38341       # Cannot rely on the command "which" here since it doesn't always work.
38342       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38343       if test -z "$is_absolute_path"; then
38344         # Path to executable is not absolute. Find it.
38345         IFS_save="$IFS"
38346         IFS=:
38347         for p in $PATH; do
38348           if test -f "$p/$path" && test -x "$p/$path"; then
38349             new_path="$p/$path"
38350             break
38351           fi
38352         done
38353         IFS="$IFS_save"
38354       else
38355         # This is an absolute path, we can use it without further modifications.
38356         new_path="$path"
38357       fi
38358 
38359       if test "x$new_path" = x; then
38360         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38361 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38362         has_space=`$ECHO "$complete" | $GREP " "`
38363         if test "x$has_space" != x; then
38364           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38365 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38366         fi
38367         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38368       fi
38369     fi
38370 
38371     # Now join together the path and the arguments once again
38372     if test "x$arguments" != xEOL; then
38373       new_complete="$new_path ${arguments% *}"
38374     else
38375       new_complete="$new_path"
38376     fi
38377 
38378     if test "x$complete" != "x$new_complete"; then
38379       MT="$new_complete"
38380       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38381 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38382     fi
38383   fi
38384 
38385     # Setup the resource compiler (RC)
38386     # Extract the first word of "rc", so it can be a program name with args.
38387 set dummy rc; ac_word=$2
38388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38389 $as_echo_n "checking for $ac_word... " >&6; }
38390 if ${ac_cv_prog_RC+:} false; then :
38391   $as_echo_n "(cached) " >&6
38392 else
38393   if test -n "$RC"; then
38394   ac_cv_prog_RC="$RC" # Let the user override the test.
38395 else
38396   ac_prog_rejected=no
38397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38398 for as_dir in $PATH
38399 do
38400   IFS=$as_save_IFS
38401   test -z "$as_dir" && as_dir=.
38402     for ac_exec_ext in '' $ac_executable_extensions; do
38403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38404     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38405        ac_prog_rejected=yes
38406        continue
38407      fi
38408     ac_cv_prog_RC="rc"
38409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38410     break 2
38411   fi
38412 done
38413   done
38414 IFS=$as_save_IFS
38415 
38416 if test $ac_prog_rejected = yes; then
38417   # We found a bogon in the path, so make sure we never use it.
38418   set dummy $ac_cv_prog_RC
38419   shift
38420   if test $# != 0; then
38421     # We chose a different compiler from the bogus one.
38422     # However, it has the same basename, so the bogon will be chosen
38423     # first if we set RC to just the basename; use the full file name.
38424     shift
38425     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38426   fi
38427 fi
38428 fi
38429 fi
38430 RC=$ac_cv_prog_RC
38431 if test -n "$RC"; then
38432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38433 $as_echo "$RC" >&6; }
38434 else
38435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38436 $as_echo "no" >&6; }
38437 fi
38438 
38439 
38440 
38441   # Only process if variable expands to non-empty
38442 
38443   if test "x$RC" != x; then
38444     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38445 
38446   # First separate the path from the arguments. This will split at the first
38447   # space.
38448   complete="$RC"
38449   path="${complete%% *}"
38450   tmp="$complete EOL"
38451   arguments="${tmp#* }"
38452 
38453   # Input might be given as Windows format, start by converting to
38454   # unix format.
38455   new_path=`$CYGPATH -u "$path"`
38456 
38457   # Now try to locate executable using which
38458   new_path=`$WHICH "$new_path" 2> /dev/null`
38459   # bat and cmd files are not always considered executable in cygwin causing which
38460   # to not find them
38461   if test "x$new_path" = x \
38462       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38463       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38464     new_path=`$CYGPATH -u "$path"`
38465   fi
38466   if test "x$new_path" = x; then
38467     # Oops. Which didn't find the executable.
38468     # The splitting of arguments from the executable at a space might have been incorrect,
38469     # since paths with space are more likely in Windows. Give it another try with the whole
38470     # argument.
38471     path="$complete"
38472     arguments="EOL"
38473     new_path=`$CYGPATH -u "$path"`
38474     new_path=`$WHICH "$new_path" 2> /dev/null`
38475     # bat and cmd files are not always considered executable in cygwin causing which
38476     # to not find them
38477     if test "x$new_path" = x \
38478         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38479         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38480       new_path=`$CYGPATH -u "$path"`
38481     fi
38482     if test "x$new_path" = x; then
38483       # It's still not found. Now this is an unrecoverable error.
38484       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38485 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38486       has_space=`$ECHO "$complete" | $GREP " "`
38487       if test "x$has_space" != x; then
38488         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38489 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38490       fi
38491       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38492     fi
38493   fi
38494 
38495   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38496   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38497   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38498   # "foo.exe" is OK but "foo" is an error.
38499   #
38500   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38501   # It is also a way to make sure we got the proper file name for the real test later on.
38502   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38503   if test "x$test_shortpath" = x; then
38504     # Short path failed, file does not exist as specified.
38505     # Try adding .exe or .cmd
38506     if test -f "${new_path}.exe"; then
38507       input_to_shortpath="${new_path}.exe"
38508     elif test -f "${new_path}.cmd"; then
38509       input_to_shortpath="${new_path}.cmd"
38510     else
38511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38512 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38513       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38514 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38515       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38516     fi
38517   else
38518     input_to_shortpath="$new_path"
38519   fi
38520 
38521   # Call helper function which possibly converts this using DOS-style short mode.
38522   # If so, the updated path is stored in $new_path.
38523   new_path="$input_to_shortpath"
38524 
38525   input_path="$input_to_shortpath"
38526   # Check if we need to convert this using DOS-style short mode. If the path
38527   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38528   # take no chances and rewrite it.
38529   # Note: m4 eats our [], so we need to use [ and ] instead.
38530   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38531   if test "x$has_forbidden_chars" != x; then
38532     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38533     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38534     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38535     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38536       # Going to short mode and back again did indeed matter. Since short mode is
38537       # case insensitive, let's make it lowercase to improve readability.
38538       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38539       # Now convert it back to Unix-style (cygpath)
38540       input_path=`$CYGPATH -u "$shortmode_path"`
38541       new_path="$input_path"
38542     fi
38543   fi
38544 
38545   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38546   if test "x$test_cygdrive_prefix" = x; then
38547     # As a simple fix, exclude /usr/bin since it's not a real path.
38548     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38549       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38550       # a path prefixed by /cygdrive for fixpath to work.
38551       new_path="$CYGWIN_ROOT_PATH$input_path"
38552     fi
38553   fi
38554 
38555   # remove trailing .exe if any
38556   new_path="${new_path/%.exe/}"
38557 
38558     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38559 
38560   # First separate the path from the arguments. This will split at the first
38561   # space.
38562   complete="$RC"
38563   path="${complete%% *}"
38564   tmp="$complete EOL"
38565   arguments="${tmp#* }"
38566 
38567   # Input might be given as Windows format, start by converting to
38568   # unix format.
38569   new_path="$path"
38570 
38571   windows_path="$new_path"
38572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38573     unix_path=`$CYGPATH -u "$windows_path"`
38574     new_path="$unix_path"
38575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38576     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38577     new_path="$unix_path"
38578   fi
38579 
38580 
38581   # Now try to locate executable using which
38582   new_path=`$WHICH "$new_path" 2> /dev/null`
38583 
38584   if test "x$new_path" = x; then
38585     # Oops. Which didn't find the executable.
38586     # The splitting of arguments from the executable at a space might have been incorrect,
38587     # since paths with space are more likely in Windows. Give it another try with the whole
38588     # argument.
38589     path="$complete"
38590     arguments="EOL"
38591     new_path="$path"
38592 
38593   windows_path="$new_path"
38594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38595     unix_path=`$CYGPATH -u "$windows_path"`
38596     new_path="$unix_path"
38597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38598     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38599     new_path="$unix_path"
38600   fi
38601 
38602 
38603     new_path=`$WHICH "$new_path" 2> /dev/null`
38604     # bat and cmd files are not always considered executable in MSYS causing which
38605     # to not find them
38606     if test "x$new_path" = x \
38607         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38608         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38609       new_path="$path"
38610 
38611   windows_path="$new_path"
38612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38613     unix_path=`$CYGPATH -u "$windows_path"`
38614     new_path="$unix_path"
38615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38616     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38617     new_path="$unix_path"
38618   fi
38619 
38620     fi
38621 
38622     if test "x$new_path" = x; then
38623       # It's still not found. Now this is an unrecoverable error.
38624       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38625 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38626       has_space=`$ECHO "$complete" | $GREP " "`
38627       if test "x$has_space" != x; then
38628         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38629 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38630       fi
38631       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38632     fi
38633   fi
38634 
38635   # Now new_path has a complete unix path to the binary
38636   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38637     # Keep paths in /bin as-is, but remove trailing .exe if any
38638     new_path="${new_path/%.exe/}"
38639     # Do not save /bin paths to all_fixpath_prefixes!
38640   else
38641     # Not in mixed or Windows style, start by that.
38642     new_path=`cmd //c echo $new_path`
38643 
38644   input_path="$new_path"
38645   # Check if we need to convert this using DOS-style short mode. If the path
38646   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38647   # take no chances and rewrite it.
38648   # Note: m4 eats our [], so we need to use [ and ] instead.
38649   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38650   if test "x$has_forbidden_chars" != x; then
38651     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38652     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38653   fi
38654 
38655     # Output is in $new_path
38656 
38657   windows_path="$new_path"
38658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38659     unix_path=`$CYGPATH -u "$windows_path"`
38660     new_path="$unix_path"
38661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38663     new_path="$unix_path"
38664   fi
38665 
38666     # remove trailing .exe if any
38667     new_path="${new_path/%.exe/}"
38668 
38669     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38670     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38671   fi
38672 
38673     else
38674       # We're on a unix platform. Hooray! :)
38675       # First separate the path from the arguments. This will split at the first
38676       # space.
38677       complete="$RC"
38678       path="${complete%% *}"
38679       tmp="$complete EOL"
38680       arguments="${tmp#* }"
38681 
38682       # Cannot rely on the command "which" here since it doesn't always work.
38683       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38684       if test -z "$is_absolute_path"; then
38685         # Path to executable is not absolute. Find it.
38686         IFS_save="$IFS"
38687         IFS=:
38688         for p in $PATH; do
38689           if test -f "$p/$path" && test -x "$p/$path"; then
38690             new_path="$p/$path"
38691             break
38692           fi
38693         done
38694         IFS="$IFS_save"
38695       else
38696         # This is an absolute path, we can use it without further modifications.
38697         new_path="$path"
38698       fi
38699 
38700       if test "x$new_path" = x; then
38701         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38702 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38703         has_space=`$ECHO "$complete" | $GREP " "`
38704         if test "x$has_space" != x; then
38705           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38706 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38707         fi
38708         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38709       fi
38710     fi
38711 
38712     # Now join together the path and the arguments once again
38713     if test "x$arguments" != xEOL; then
38714       new_complete="$new_path ${arguments% *}"
38715     else
38716       new_complete="$new_path"
38717     fi
38718 
38719     if test "x$complete" != "x$new_complete"; then
38720       RC="$new_complete"
38721       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38722 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38723     fi
38724   fi
38725 
38726     # Extract the first word of "dumpbin", so it can be a program name with args.
38727 set dummy dumpbin; ac_word=$2
38728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38729 $as_echo_n "checking for $ac_word... " >&6; }
38730 if ${ac_cv_prog_DUMPBIN+:} false; then :
38731   $as_echo_n "(cached) " >&6
38732 else
38733   if test -n "$DUMPBIN"; then
38734   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38735 else
38736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38737 for as_dir in $PATH
38738 do
38739   IFS=$as_save_IFS
38740   test -z "$as_dir" && as_dir=.
38741     for ac_exec_ext in '' $ac_executable_extensions; do
38742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38743     ac_cv_prog_DUMPBIN="dumpbin"
38744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38745     break 2
38746   fi
38747 done
38748   done
38749 IFS=$as_save_IFS
38750 
38751 fi
38752 fi
38753 DUMPBIN=$ac_cv_prog_DUMPBIN
38754 if test -n "$DUMPBIN"; then
38755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38756 $as_echo "$DUMPBIN" >&6; }
38757 else
38758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38759 $as_echo "no" >&6; }
38760 fi
38761 
38762 
38763 
38764   # Only process if variable expands to non-empty
38765 
38766   if test "x$DUMPBIN" != x; then
38767     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38768 
38769   # First separate the path from the arguments. This will split at the first
38770   # space.
38771   complete="$DUMPBIN"
38772   path="${complete%% *}"
38773   tmp="$complete EOL"
38774   arguments="${tmp#* }"
38775 
38776   # Input might be given as Windows format, start by converting to
38777   # unix format.
38778   new_path=`$CYGPATH -u "$path"`
38779 
38780   # Now try to locate executable using which
38781   new_path=`$WHICH "$new_path" 2> /dev/null`
38782   # bat and cmd files are not always considered executable in cygwin causing which
38783   # to not find them
38784   if test "x$new_path" = x \
38785       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38786       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38787     new_path=`$CYGPATH -u "$path"`
38788   fi
38789   if test "x$new_path" = x; then
38790     # Oops. Which didn't find the executable.
38791     # The splitting of arguments from the executable at a space might have been incorrect,
38792     # since paths with space are more likely in Windows. Give it another try with the whole
38793     # argument.
38794     path="$complete"
38795     arguments="EOL"
38796     new_path=`$CYGPATH -u "$path"`
38797     new_path=`$WHICH "$new_path" 2> /dev/null`
38798     # bat and cmd files are not always considered executable in cygwin causing which
38799     # to not find them
38800     if test "x$new_path" = x \
38801         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38802         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38803       new_path=`$CYGPATH -u "$path"`
38804     fi
38805     if test "x$new_path" = x; then
38806       # It's still not found. Now this is an unrecoverable error.
38807       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38808 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38809       has_space=`$ECHO "$complete" | $GREP " "`
38810       if test "x$has_space" != x; then
38811         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38812 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38813       fi
38814       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38815     fi
38816   fi
38817 
38818   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38819   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38820   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38821   # "foo.exe" is OK but "foo" is an error.
38822   #
38823   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38824   # It is also a way to make sure we got the proper file name for the real test later on.
38825   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38826   if test "x$test_shortpath" = x; then
38827     # Short path failed, file does not exist as specified.
38828     # Try adding .exe or .cmd
38829     if test -f "${new_path}.exe"; then
38830       input_to_shortpath="${new_path}.exe"
38831     elif test -f "${new_path}.cmd"; then
38832       input_to_shortpath="${new_path}.cmd"
38833     else
38834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38835 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38836       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38837 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38838       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38839     fi
38840   else
38841     input_to_shortpath="$new_path"
38842   fi
38843 
38844   # Call helper function which possibly converts this using DOS-style short mode.
38845   # If so, the updated path is stored in $new_path.
38846   new_path="$input_to_shortpath"
38847 
38848   input_path="$input_to_shortpath"
38849   # Check if we need to convert this using DOS-style short mode. If the path
38850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38851   # take no chances and rewrite it.
38852   # Note: m4 eats our [], so we need to use [ and ] instead.
38853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38854   if test "x$has_forbidden_chars" != x; then
38855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38856     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38857     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38858     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38859       # Going to short mode and back again did indeed matter. Since short mode is
38860       # case insensitive, let's make it lowercase to improve readability.
38861       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38862       # Now convert it back to Unix-style (cygpath)
38863       input_path=`$CYGPATH -u "$shortmode_path"`
38864       new_path="$input_path"
38865     fi
38866   fi
38867 
38868   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38869   if test "x$test_cygdrive_prefix" = x; then
38870     # As a simple fix, exclude /usr/bin since it's not a real path.
38871     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38872       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38873       # a path prefixed by /cygdrive for fixpath to work.
38874       new_path="$CYGWIN_ROOT_PATH$input_path"
38875     fi
38876   fi
38877 
38878   # remove trailing .exe if any
38879   new_path="${new_path/%.exe/}"
38880 
38881     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38882 
38883   # First separate the path from the arguments. This will split at the first
38884   # space.
38885   complete="$DUMPBIN"
38886   path="${complete%% *}"
38887   tmp="$complete EOL"
38888   arguments="${tmp#* }"
38889 
38890   # Input might be given as Windows format, start by converting to
38891   # unix format.
38892   new_path="$path"
38893 
38894   windows_path="$new_path"
38895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38896     unix_path=`$CYGPATH -u "$windows_path"`
38897     new_path="$unix_path"
38898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38900     new_path="$unix_path"
38901   fi
38902 
38903 
38904   # Now try to locate executable using which
38905   new_path=`$WHICH "$new_path" 2> /dev/null`
38906 
38907   if test "x$new_path" = x; then
38908     # Oops. Which didn't find the executable.
38909     # The splitting of arguments from the executable at a space might have been incorrect,
38910     # since paths with space are more likely in Windows. Give it another try with the whole
38911     # argument.
38912     path="$complete"
38913     arguments="EOL"
38914     new_path="$path"
38915 
38916   windows_path="$new_path"
38917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38918     unix_path=`$CYGPATH -u "$windows_path"`
38919     new_path="$unix_path"
38920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38922     new_path="$unix_path"
38923   fi
38924 
38925 
38926     new_path=`$WHICH "$new_path" 2> /dev/null`
38927     # bat and cmd files are not always considered executable in MSYS causing which
38928     # to not find them
38929     if test "x$new_path" = x \
38930         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38931         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38932       new_path="$path"
38933 
38934   windows_path="$new_path"
38935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38936     unix_path=`$CYGPATH -u "$windows_path"`
38937     new_path="$unix_path"
38938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38940     new_path="$unix_path"
38941   fi
38942 
38943     fi
38944 
38945     if test "x$new_path" = x; then
38946       # It's still not found. Now this is an unrecoverable error.
38947       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38948 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38949       has_space=`$ECHO "$complete" | $GREP " "`
38950       if test "x$has_space" != x; then
38951         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38952 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38953       fi
38954       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38955     fi
38956   fi
38957 
38958   # Now new_path has a complete unix path to the binary
38959   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38960     # Keep paths in /bin as-is, but remove trailing .exe if any
38961     new_path="${new_path/%.exe/}"
38962     # Do not save /bin paths to all_fixpath_prefixes!
38963   else
38964     # Not in mixed or Windows style, start by that.
38965     new_path=`cmd //c echo $new_path`
38966 
38967   input_path="$new_path"
38968   # Check if we need to convert this using DOS-style short mode. If the path
38969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38970   # take no chances and rewrite it.
38971   # Note: m4 eats our [], so we need to use [ and ] instead.
38972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38973   if test "x$has_forbidden_chars" != x; then
38974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38975     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38976   fi
38977 
38978     # Output is in $new_path
38979 
38980   windows_path="$new_path"
38981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38982     unix_path=`$CYGPATH -u "$windows_path"`
38983     new_path="$unix_path"
38984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38986     new_path="$unix_path"
38987   fi
38988 
38989     # remove trailing .exe if any
38990     new_path="${new_path/%.exe/}"
38991 
38992     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38993     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38994   fi
38995 
38996     else
38997       # We're on a unix platform. Hooray! :)
38998       # First separate the path from the arguments. This will split at the first
38999       # space.
39000       complete="$DUMPBIN"
39001       path="${complete%% *}"
39002       tmp="$complete EOL"
39003       arguments="${tmp#* }"
39004 
39005       # Cannot rely on the command "which" here since it doesn't always work.
39006       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39007       if test -z "$is_absolute_path"; then
39008         # Path to executable is not absolute. Find it.
39009         IFS_save="$IFS"
39010         IFS=:
39011         for p in $PATH; do
39012           if test -f "$p/$path" && test -x "$p/$path"; then
39013             new_path="$p/$path"
39014             break
39015           fi
39016         done
39017         IFS="$IFS_save"
39018       else
39019         # This is an absolute path, we can use it without further modifications.
39020         new_path="$path"
39021       fi
39022 
39023       if test "x$new_path" = x; then
39024         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39025 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39026         has_space=`$ECHO "$complete" | $GREP " "`
39027         if test "x$has_space" != x; then
39028           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39029 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39030         fi
39031         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39032       fi
39033     fi
39034 
39035     # Now join together the path and the arguments once again
39036     if test "x$arguments" != xEOL; then
39037       new_complete="$new_path ${arguments% *}"
39038     else
39039       new_complete="$new_path"
39040     fi
39041 
39042     if test "x$complete" != "x$new_complete"; then
39043       DUMPBIN="$new_complete"
39044       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39045 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39046     fi
39047   fi
39048 
39049     # We need to check for 'msbuild.exe' because at the place where we expect to
39050     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39051     # won't find the 'msbuild.exe' executable in that case (and the
39052     # 'ac_executable_extensions' is unusable due to performance reasons).
39053     # Notice that we intentionally don't fix up the path to MSBUILD because we
39054     # will call it in a DOS shell during freetype detection on Windows (see
39055     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39056     # Extract the first word of "msbuild.exe", so it can be a program name with args.
39057 set dummy msbuild.exe; ac_word=$2
39058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39059 $as_echo_n "checking for $ac_word... " >&6; }
39060 if ${ac_cv_prog_MSBUILD+:} false; then :
39061   $as_echo_n "(cached) " >&6
39062 else
39063   if test -n "$MSBUILD"; then
39064   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39065 else
39066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39067 for as_dir in $PATH
39068 do
39069   IFS=$as_save_IFS
39070   test -z "$as_dir" && as_dir=.
39071     for ac_exec_ext in '' $ac_executable_extensions; do
39072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39073     ac_cv_prog_MSBUILD="msbuild.exe"
39074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39075     break 2
39076   fi
39077 done
39078   done
39079 IFS=$as_save_IFS
39080 
39081 fi
39082 fi
39083 MSBUILD=$ac_cv_prog_MSBUILD
39084 if test -n "$MSBUILD"; then
39085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39086 $as_echo "$MSBUILD" >&6; }
39087 else
39088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39089 $as_echo "no" >&6; }
39090 fi
39091 
39092 
39093   fi
39094 
39095   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39096 
39097 
39098   # Publish this variable in the help.
39099 
39100 
39101   if [ -z "${STRIP+x}" ]; then
39102     # The variable is not set by user, try to locate tool using the code snippet
39103     for ac_prog in strip
39104 do
39105   # Extract the first word of "$ac_prog", so it can be a program name with args.
39106 set dummy $ac_prog; ac_word=$2
39107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39108 $as_echo_n "checking for $ac_word... " >&6; }
39109 if ${ac_cv_path_STRIP+:} false; then :
39110   $as_echo_n "(cached) " >&6
39111 else
39112   case $STRIP in
39113   [\\/]* | ?:[\\/]*)
39114   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39115   ;;
39116   *)
39117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39118 for as_dir in $PATH
39119 do
39120   IFS=$as_save_IFS
39121   test -z "$as_dir" && as_dir=.
39122     for ac_exec_ext in '' $ac_executable_extensions; do
39123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39124     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39126     break 2
39127   fi
39128 done
39129   done
39130 IFS=$as_save_IFS
39131 
39132   ;;
39133 esac
39134 fi
39135 STRIP=$ac_cv_path_STRIP
39136 if test -n "$STRIP"; then
39137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39138 $as_echo "$STRIP" >&6; }
39139 else
39140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39141 $as_echo "no" >&6; }
39142 fi
39143 
39144 
39145   test -n "$STRIP" && break
39146 done
39147 
39148   else
39149     # The variable is set, but is it from the command line or the environment?
39150 
39151     # Try to remove the string !STRIP! from our list.
39152     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39153     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39154       # If it failed, the variable was not from the command line. Ignore it,
39155       # but warn the user (except for BASH, which is always set by the calling BASH).
39156       if test "xSTRIP" != xBASH; then
39157         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39158 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39159       fi
39160       # Try to locate tool using the code snippet
39161       for ac_prog in strip
39162 do
39163   # Extract the first word of "$ac_prog", so it can be a program name with args.
39164 set dummy $ac_prog; ac_word=$2
39165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39166 $as_echo_n "checking for $ac_word... " >&6; }
39167 if ${ac_cv_path_STRIP+:} false; then :
39168   $as_echo_n "(cached) " >&6
39169 else
39170   case $STRIP in
39171   [\\/]* | ?:[\\/]*)
39172   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39173   ;;
39174   *)
39175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39176 for as_dir in $PATH
39177 do
39178   IFS=$as_save_IFS
39179   test -z "$as_dir" && as_dir=.
39180     for ac_exec_ext in '' $ac_executable_extensions; do
39181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39182     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39184     break 2
39185   fi
39186 done
39187   done
39188 IFS=$as_save_IFS
39189 
39190   ;;
39191 esac
39192 fi
39193 STRIP=$ac_cv_path_STRIP
39194 if test -n "$STRIP"; then
39195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39196 $as_echo "$STRIP" >&6; }
39197 else
39198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39199 $as_echo "no" >&6; }
39200 fi
39201 
39202 
39203   test -n "$STRIP" && break
39204 done
39205 
39206     else
39207       # If it succeeded, then it was overridden by the user. We will use it
39208       # for the tool.
39209 
39210       # First remove it from the list of overridden variables, so we can test
39211       # for unknown variables in the end.
39212       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39213 
39214       # Check if we try to supply an empty value
39215       if test "x$STRIP" = x; then
39216         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39217 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39218         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39219 $as_echo_n "checking for STRIP... " >&6; }
39220         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39221 $as_echo "disabled" >&6; }
39222       else
39223         # Check if the provided tool contains a complete path.
39224         tool_specified="$STRIP"
39225         tool_basename="${tool_specified##*/}"
39226         if test "x$tool_basename" = "x$tool_specified"; then
39227           # A command without a complete path is provided, search $PATH.
39228           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39229 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39230           # Extract the first word of "$tool_basename", so it can be a program name with args.
39231 set dummy $tool_basename; ac_word=$2
39232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39233 $as_echo_n "checking for $ac_word... " >&6; }
39234 if ${ac_cv_path_STRIP+:} false; then :
39235   $as_echo_n "(cached) " >&6
39236 else
39237   case $STRIP in
39238   [\\/]* | ?:[\\/]*)
39239   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39240   ;;
39241   *)
39242   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39243 for as_dir in $PATH
39244 do
39245   IFS=$as_save_IFS
39246   test -z "$as_dir" && as_dir=.
39247     for ac_exec_ext in '' $ac_executable_extensions; do
39248   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39249     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39250     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39251     break 2
39252   fi
39253 done
39254   done
39255 IFS=$as_save_IFS
39256 
39257   ;;
39258 esac
39259 fi
39260 STRIP=$ac_cv_path_STRIP
39261 if test -n "$STRIP"; then
39262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39263 $as_echo "$STRIP" >&6; }
39264 else
39265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39266 $as_echo "no" >&6; }
39267 fi
39268 
39269 
39270           if test "x$STRIP" = x; then
39271             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39272           fi
39273         else
39274           # Otherwise we believe it is a complete path. Use it as it is.
39275           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39276 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39277           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39278 $as_echo_n "checking for STRIP... " >&6; }
39279           if test ! -x "$tool_specified"; then
39280             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39281 $as_echo "not found" >&6; }
39282             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39283           fi
39284           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39285 $as_echo "$tool_specified" >&6; }
39286         fi
39287       fi
39288     fi
39289 
39290   fi
39291 
39292 
39293 
39294   # Only process if variable expands to non-empty
39295 
39296   if test "x$STRIP" != x; then
39297     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39298 
39299   # First separate the path from the arguments. This will split at the first
39300   # space.
39301   complete="$STRIP"
39302   path="${complete%% *}"
39303   tmp="$complete EOL"
39304   arguments="${tmp#* }"
39305 
39306   # Input might be given as Windows format, start by converting to
39307   # unix format.
39308   new_path=`$CYGPATH -u "$path"`
39309 
39310   # Now try to locate executable using which
39311   new_path=`$WHICH "$new_path" 2> /dev/null`
39312   # bat and cmd files are not always considered executable in cygwin causing which
39313   # to not find them
39314   if test "x$new_path" = x \
39315       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39316       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39317     new_path=`$CYGPATH -u "$path"`
39318   fi
39319   if test "x$new_path" = x; then
39320     # Oops. Which didn't find the executable.
39321     # The splitting of arguments from the executable at a space might have been incorrect,
39322     # since paths with space are more likely in Windows. Give it another try with the whole
39323     # argument.
39324     path="$complete"
39325     arguments="EOL"
39326     new_path=`$CYGPATH -u "$path"`
39327     new_path=`$WHICH "$new_path" 2> /dev/null`
39328     # bat and cmd files are not always considered executable in cygwin causing which
39329     # to not find them
39330     if test "x$new_path" = x \
39331         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39332         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39333       new_path=`$CYGPATH -u "$path"`
39334     fi
39335     if test "x$new_path" = x; then
39336       # It's still not found. Now this is an unrecoverable error.
39337       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39338 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39339       has_space=`$ECHO "$complete" | $GREP " "`
39340       if test "x$has_space" != x; then
39341         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39342 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39343       fi
39344       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39345     fi
39346   fi
39347 
39348   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39349   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39350   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39351   # "foo.exe" is OK but "foo" is an error.
39352   #
39353   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39354   # It is also a way to make sure we got the proper file name for the real test later on.
39355   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39356   if test "x$test_shortpath" = x; then
39357     # Short path failed, file does not exist as specified.
39358     # Try adding .exe or .cmd
39359     if test -f "${new_path}.exe"; then
39360       input_to_shortpath="${new_path}.exe"
39361     elif test -f "${new_path}.cmd"; then
39362       input_to_shortpath="${new_path}.cmd"
39363     else
39364       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39365 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39366       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39367 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39368       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39369     fi
39370   else
39371     input_to_shortpath="$new_path"
39372   fi
39373 
39374   # Call helper function which possibly converts this using DOS-style short mode.
39375   # If so, the updated path is stored in $new_path.
39376   new_path="$input_to_shortpath"
39377 
39378   input_path="$input_to_shortpath"
39379   # Check if we need to convert this using DOS-style short mode. If the path
39380   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39381   # take no chances and rewrite it.
39382   # Note: m4 eats our [], so we need to use [ and ] instead.
39383   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39384   if test "x$has_forbidden_chars" != x; then
39385     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39386     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39387     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39388     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39389       # Going to short mode and back again did indeed matter. Since short mode is
39390       # case insensitive, let's make it lowercase to improve readability.
39391       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39392       # Now convert it back to Unix-style (cygpath)
39393       input_path=`$CYGPATH -u "$shortmode_path"`
39394       new_path="$input_path"
39395     fi
39396   fi
39397 
39398   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39399   if test "x$test_cygdrive_prefix" = x; then
39400     # As a simple fix, exclude /usr/bin since it's not a real path.
39401     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39402       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39403       # a path prefixed by /cygdrive for fixpath to work.
39404       new_path="$CYGWIN_ROOT_PATH$input_path"
39405     fi
39406   fi
39407 
39408   # remove trailing .exe if any
39409   new_path="${new_path/%.exe/}"
39410 
39411     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39412 
39413   # First separate the path from the arguments. This will split at the first
39414   # space.
39415   complete="$STRIP"
39416   path="${complete%% *}"
39417   tmp="$complete EOL"
39418   arguments="${tmp#* }"
39419 
39420   # Input might be given as Windows format, start by converting to
39421   # unix format.
39422   new_path="$path"
39423 
39424   windows_path="$new_path"
39425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39426     unix_path=`$CYGPATH -u "$windows_path"`
39427     new_path="$unix_path"
39428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39430     new_path="$unix_path"
39431   fi
39432 
39433 
39434   # Now try to locate executable using which
39435   new_path=`$WHICH "$new_path" 2> /dev/null`
39436 
39437   if test "x$new_path" = x; then
39438     # Oops. Which didn't find the executable.
39439     # The splitting of arguments from the executable at a space might have been incorrect,
39440     # since paths with space are more likely in Windows. Give it another try with the whole
39441     # argument.
39442     path="$complete"
39443     arguments="EOL"
39444     new_path="$path"
39445 
39446   windows_path="$new_path"
39447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39448     unix_path=`$CYGPATH -u "$windows_path"`
39449     new_path="$unix_path"
39450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39452     new_path="$unix_path"
39453   fi
39454 
39455 
39456     new_path=`$WHICH "$new_path" 2> /dev/null`
39457     # bat and cmd files are not always considered executable in MSYS causing which
39458     # to not find them
39459     if test "x$new_path" = x \
39460         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39461         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39462       new_path="$path"
39463 
39464   windows_path="$new_path"
39465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39466     unix_path=`$CYGPATH -u "$windows_path"`
39467     new_path="$unix_path"
39468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39470     new_path="$unix_path"
39471   fi
39472 
39473     fi
39474 
39475     if test "x$new_path" = x; then
39476       # It's still not found. Now this is an unrecoverable error.
39477       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39478 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39479       has_space=`$ECHO "$complete" | $GREP " "`
39480       if test "x$has_space" != x; then
39481         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39482 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39483       fi
39484       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39485     fi
39486   fi
39487 
39488   # Now new_path has a complete unix path to the binary
39489   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39490     # Keep paths in /bin as-is, but remove trailing .exe if any
39491     new_path="${new_path/%.exe/}"
39492     # Do not save /bin paths to all_fixpath_prefixes!
39493   else
39494     # Not in mixed or Windows style, start by that.
39495     new_path=`cmd //c echo $new_path`
39496 
39497   input_path="$new_path"
39498   # Check if we need to convert this using DOS-style short mode. If the path
39499   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39500   # take no chances and rewrite it.
39501   # Note: m4 eats our [], so we need to use [ and ] instead.
39502   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39503   if test "x$has_forbidden_chars" != x; then
39504     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39505     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39506   fi
39507 
39508     # Output is in $new_path
39509 
39510   windows_path="$new_path"
39511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39512     unix_path=`$CYGPATH -u "$windows_path"`
39513     new_path="$unix_path"
39514   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39515     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39516     new_path="$unix_path"
39517   fi
39518 
39519     # remove trailing .exe if any
39520     new_path="${new_path/%.exe/}"
39521 
39522     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39523     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39524   fi
39525 
39526     else
39527       # We're on a unix platform. Hooray! :)
39528       # First separate the path from the arguments. This will split at the first
39529       # space.
39530       complete="$STRIP"
39531       path="${complete%% *}"
39532       tmp="$complete EOL"
39533       arguments="${tmp#* }"
39534 
39535       # Cannot rely on the command "which" here since it doesn't always work.
39536       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39537       if test -z "$is_absolute_path"; then
39538         # Path to executable is not absolute. Find it.
39539         IFS_save="$IFS"
39540         IFS=:
39541         for p in $PATH; do
39542           if test -f "$p/$path" && test -x "$p/$path"; then
39543             new_path="$p/$path"
39544             break
39545           fi
39546         done
39547         IFS="$IFS_save"
39548       else
39549         # This is an absolute path, we can use it without further modifications.
39550         new_path="$path"
39551       fi
39552 
39553       if test "x$new_path" = x; then
39554         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39555 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39556         has_space=`$ECHO "$complete" | $GREP " "`
39557         if test "x$has_space" != x; then
39558           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39559 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39560         fi
39561         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39562       fi
39563     fi
39564 
39565     # Now join together the path and the arguments once again
39566     if test "x$arguments" != xEOL; then
39567       new_complete="$new_path ${arguments% *}"
39568     else
39569       new_complete="$new_path"
39570     fi
39571 
39572     if test "x$complete" != "x$new_complete"; then
39573       STRIP="$new_complete"
39574       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39575 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39576     fi
39577   fi
39578 
39579 
39580 
39581   # Publish this variable in the help.
39582 
39583 
39584   if [ -z "${NM+x}" ]; then
39585     # The variable is not set by user, try to locate tool using the code snippet
39586     for ac_prog in nm
39587 do
39588   # Extract the first word of "$ac_prog", so it can be a program name with args.
39589 set dummy $ac_prog; ac_word=$2
39590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39591 $as_echo_n "checking for $ac_word... " >&6; }
39592 if ${ac_cv_path_NM+:} false; then :
39593   $as_echo_n "(cached) " >&6
39594 else
39595   case $NM in
39596   [\\/]* | ?:[\\/]*)
39597   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39598   ;;
39599   *)
39600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39601 for as_dir in $PATH
39602 do
39603   IFS=$as_save_IFS
39604   test -z "$as_dir" && as_dir=.
39605     for ac_exec_ext in '' $ac_executable_extensions; do
39606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39607     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39609     break 2
39610   fi
39611 done
39612   done
39613 IFS=$as_save_IFS
39614 
39615   ;;
39616 esac
39617 fi
39618 NM=$ac_cv_path_NM
39619 if test -n "$NM"; then
39620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39621 $as_echo "$NM" >&6; }
39622 else
39623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39624 $as_echo "no" >&6; }
39625 fi
39626 
39627 
39628   test -n "$NM" && break
39629 done
39630 
39631   else
39632     # The variable is set, but is it from the command line or the environment?
39633 
39634     # Try to remove the string !NM! from our list.
39635     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39636     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39637       # If it failed, the variable was not from the command line. Ignore it,
39638       # but warn the user (except for BASH, which is always set by the calling BASH).
39639       if test "xNM" != xBASH; then
39640         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39641 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39642       fi
39643       # Try to locate tool using the code snippet
39644       for ac_prog in nm
39645 do
39646   # Extract the first word of "$ac_prog", so it can be a program name with args.
39647 set dummy $ac_prog; ac_word=$2
39648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39649 $as_echo_n "checking for $ac_word... " >&6; }
39650 if ${ac_cv_path_NM+:} false; then :
39651   $as_echo_n "(cached) " >&6
39652 else
39653   case $NM in
39654   [\\/]* | ?:[\\/]*)
39655   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39656   ;;
39657   *)
39658   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39659 for as_dir in $PATH
39660 do
39661   IFS=$as_save_IFS
39662   test -z "$as_dir" && as_dir=.
39663     for ac_exec_ext in '' $ac_executable_extensions; do
39664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39665     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39666     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39667     break 2
39668   fi
39669 done
39670   done
39671 IFS=$as_save_IFS
39672 
39673   ;;
39674 esac
39675 fi
39676 NM=$ac_cv_path_NM
39677 if test -n "$NM"; then
39678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39679 $as_echo "$NM" >&6; }
39680 else
39681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39682 $as_echo "no" >&6; }
39683 fi
39684 
39685 
39686   test -n "$NM" && break
39687 done
39688 
39689     else
39690       # If it succeeded, then it was overridden by the user. We will use it
39691       # for the tool.
39692 
39693       # First remove it from the list of overridden variables, so we can test
39694       # for unknown variables in the end.
39695       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39696 
39697       # Check if we try to supply an empty value
39698       if test "x$NM" = x; then
39699         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39700 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39701         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39702 $as_echo_n "checking for NM... " >&6; }
39703         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39704 $as_echo "disabled" >&6; }
39705       else
39706         # Check if the provided tool contains a complete path.
39707         tool_specified="$NM"
39708         tool_basename="${tool_specified##*/}"
39709         if test "x$tool_basename" = "x$tool_specified"; then
39710           # A command without a complete path is provided, search $PATH.
39711           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39712 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39713           # Extract the first word of "$tool_basename", so it can be a program name with args.
39714 set dummy $tool_basename; ac_word=$2
39715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39716 $as_echo_n "checking for $ac_word... " >&6; }
39717 if ${ac_cv_path_NM+:} false; then :
39718   $as_echo_n "(cached) " >&6
39719 else
39720   case $NM in
39721   [\\/]* | ?:[\\/]*)
39722   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39723   ;;
39724   *)
39725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39726 for as_dir in $PATH
39727 do
39728   IFS=$as_save_IFS
39729   test -z "$as_dir" && as_dir=.
39730     for ac_exec_ext in '' $ac_executable_extensions; do
39731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39732     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39734     break 2
39735   fi
39736 done
39737   done
39738 IFS=$as_save_IFS
39739 
39740   ;;
39741 esac
39742 fi
39743 NM=$ac_cv_path_NM
39744 if test -n "$NM"; then
39745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39746 $as_echo "$NM" >&6; }
39747 else
39748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39749 $as_echo "no" >&6; }
39750 fi
39751 
39752 
39753           if test "x$NM" = x; then
39754             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39755           fi
39756         else
39757           # Otherwise we believe it is a complete path. Use it as it is.
39758           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39759 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39760           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39761 $as_echo_n "checking for NM... " >&6; }
39762           if test ! -x "$tool_specified"; then
39763             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39764 $as_echo "not found" >&6; }
39765             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39766           fi
39767           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39768 $as_echo "$tool_specified" >&6; }
39769         fi
39770       fi
39771     fi
39772 
39773   fi
39774 
39775 
39776 
39777   # Only process if variable expands to non-empty
39778 
39779   if test "x$NM" != x; then
39780     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39781 
39782   # First separate the path from the arguments. This will split at the first
39783   # space.
39784   complete="$NM"
39785   path="${complete%% *}"
39786   tmp="$complete EOL"
39787   arguments="${tmp#* }"
39788 
39789   # Input might be given as Windows format, start by converting to
39790   # unix format.
39791   new_path=`$CYGPATH -u "$path"`
39792 
39793   # Now try to locate executable using which
39794   new_path=`$WHICH "$new_path" 2> /dev/null`
39795   # bat and cmd files are not always considered executable in cygwin causing which
39796   # to not find them
39797   if test "x$new_path" = x \
39798       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39799       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39800     new_path=`$CYGPATH -u "$path"`
39801   fi
39802   if test "x$new_path" = x; then
39803     # Oops. Which didn't find the executable.
39804     # The splitting of arguments from the executable at a space might have been incorrect,
39805     # since paths with space are more likely in Windows. Give it another try with the whole
39806     # argument.
39807     path="$complete"
39808     arguments="EOL"
39809     new_path=`$CYGPATH -u "$path"`
39810     new_path=`$WHICH "$new_path" 2> /dev/null`
39811     # bat and cmd files are not always considered executable in cygwin causing which
39812     # to not find them
39813     if test "x$new_path" = x \
39814         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39815         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39816       new_path=`$CYGPATH -u "$path"`
39817     fi
39818     if test "x$new_path" = x; then
39819       # It's still not found. Now this is an unrecoverable error.
39820       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39821 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39822       has_space=`$ECHO "$complete" | $GREP " "`
39823       if test "x$has_space" != x; then
39824         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39825 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39826       fi
39827       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39828     fi
39829   fi
39830 
39831   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39832   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39833   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39834   # "foo.exe" is OK but "foo" is an error.
39835   #
39836   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39837   # It is also a way to make sure we got the proper file name for the real test later on.
39838   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39839   if test "x$test_shortpath" = x; then
39840     # Short path failed, file does not exist as specified.
39841     # Try adding .exe or .cmd
39842     if test -f "${new_path}.exe"; then
39843       input_to_shortpath="${new_path}.exe"
39844     elif test -f "${new_path}.cmd"; then
39845       input_to_shortpath="${new_path}.cmd"
39846     else
39847       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39848 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39849       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39850 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39851       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39852     fi
39853   else
39854     input_to_shortpath="$new_path"
39855   fi
39856 
39857   # Call helper function which possibly converts this using DOS-style short mode.
39858   # If so, the updated path is stored in $new_path.
39859   new_path="$input_to_shortpath"
39860 
39861   input_path="$input_to_shortpath"
39862   # Check if we need to convert this using DOS-style short mode. If the path
39863   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39864   # take no chances and rewrite it.
39865   # Note: m4 eats our [], so we need to use [ and ] instead.
39866   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39867   if test "x$has_forbidden_chars" != x; then
39868     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39869     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39870     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39871     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39872       # Going to short mode and back again did indeed matter. Since short mode is
39873       # case insensitive, let's make it lowercase to improve readability.
39874       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39875       # Now convert it back to Unix-style (cygpath)
39876       input_path=`$CYGPATH -u "$shortmode_path"`
39877       new_path="$input_path"
39878     fi
39879   fi
39880 
39881   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39882   if test "x$test_cygdrive_prefix" = x; then
39883     # As a simple fix, exclude /usr/bin since it's not a real path.
39884     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39885       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39886       # a path prefixed by /cygdrive for fixpath to work.
39887       new_path="$CYGWIN_ROOT_PATH$input_path"
39888     fi
39889   fi
39890 
39891   # remove trailing .exe if any
39892   new_path="${new_path/%.exe/}"
39893 
39894     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39895 
39896   # First separate the path from the arguments. This will split at the first
39897   # space.
39898   complete="$NM"
39899   path="${complete%% *}"
39900   tmp="$complete EOL"
39901   arguments="${tmp#* }"
39902 
39903   # Input might be given as Windows format, start by converting to
39904   # unix format.
39905   new_path="$path"
39906 
39907   windows_path="$new_path"
39908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39909     unix_path=`$CYGPATH -u "$windows_path"`
39910     new_path="$unix_path"
39911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39913     new_path="$unix_path"
39914   fi
39915 
39916 
39917   # Now try to locate executable using which
39918   new_path=`$WHICH "$new_path" 2> /dev/null`
39919 
39920   if test "x$new_path" = x; then
39921     # Oops. Which didn't find the executable.
39922     # The splitting of arguments from the executable at a space might have been incorrect,
39923     # since paths with space are more likely in Windows. Give it another try with the whole
39924     # argument.
39925     path="$complete"
39926     arguments="EOL"
39927     new_path="$path"
39928 
39929   windows_path="$new_path"
39930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39931     unix_path=`$CYGPATH -u "$windows_path"`
39932     new_path="$unix_path"
39933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39935     new_path="$unix_path"
39936   fi
39937 
39938 
39939     new_path=`$WHICH "$new_path" 2> /dev/null`
39940     # bat and cmd files are not always considered executable in MSYS causing which
39941     # to not find them
39942     if test "x$new_path" = x \
39943         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39944         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39945       new_path="$path"
39946 
39947   windows_path="$new_path"
39948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39949     unix_path=`$CYGPATH -u "$windows_path"`
39950     new_path="$unix_path"
39951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39953     new_path="$unix_path"
39954   fi
39955 
39956     fi
39957 
39958     if test "x$new_path" = x; then
39959       # It's still not found. Now this is an unrecoverable error.
39960       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39961 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39962       has_space=`$ECHO "$complete" | $GREP " "`
39963       if test "x$has_space" != x; then
39964         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39965 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39966       fi
39967       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39968     fi
39969   fi
39970 
39971   # Now new_path has a complete unix path to the binary
39972   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39973     # Keep paths in /bin as-is, but remove trailing .exe if any
39974     new_path="${new_path/%.exe/}"
39975     # Do not save /bin paths to all_fixpath_prefixes!
39976   else
39977     # Not in mixed or Windows style, start by that.
39978     new_path=`cmd //c echo $new_path`
39979 
39980   input_path="$new_path"
39981   # Check if we need to convert this using DOS-style short mode. If the path
39982   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39983   # take no chances and rewrite it.
39984   # Note: m4 eats our [], so we need to use [ and ] instead.
39985   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39986   if test "x$has_forbidden_chars" != x; then
39987     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39988     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39989   fi
39990 
39991     # Output is in $new_path
39992 
39993   windows_path="$new_path"
39994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39995     unix_path=`$CYGPATH -u "$windows_path"`
39996     new_path="$unix_path"
39997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39999     new_path="$unix_path"
40000   fi
40001 
40002     # remove trailing .exe if any
40003     new_path="${new_path/%.exe/}"
40004 
40005     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40006     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40007   fi
40008 
40009     else
40010       # We're on a unix platform. Hooray! :)
40011       # First separate the path from the arguments. This will split at the first
40012       # space.
40013       complete="$NM"
40014       path="${complete%% *}"
40015       tmp="$complete EOL"
40016       arguments="${tmp#* }"
40017 
40018       # Cannot rely on the command "which" here since it doesn't always work.
40019       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40020       if test -z "$is_absolute_path"; then
40021         # Path to executable is not absolute. Find it.
40022         IFS_save="$IFS"
40023         IFS=:
40024         for p in $PATH; do
40025           if test -f "$p/$path" && test -x "$p/$path"; then
40026             new_path="$p/$path"
40027             break
40028           fi
40029         done
40030         IFS="$IFS_save"
40031       else
40032         # This is an absolute path, we can use it without further modifications.
40033         new_path="$path"
40034       fi
40035 
40036       if test "x$new_path" = x; then
40037         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40038 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40039         has_space=`$ECHO "$complete" | $GREP " "`
40040         if test "x$has_space" != x; then
40041           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40042 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40043         fi
40044         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40045       fi
40046     fi
40047 
40048     # Now join together the path and the arguments once again
40049     if test "x$arguments" != xEOL; then
40050       new_complete="$new_path ${arguments% *}"
40051     else
40052       new_complete="$new_path"
40053     fi
40054 
40055     if test "x$complete" != "x$new_complete"; then
40056       NM="$new_complete"
40057       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40058 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40059     fi
40060   fi
40061 
40062 
40063 
40064   # Publish this variable in the help.
40065 
40066 
40067   if [ -z "${GNM+x}" ]; then
40068     # The variable is not set by user, try to locate tool using the code snippet
40069     for ac_prog in gnm
40070 do
40071   # Extract the first word of "$ac_prog", so it can be a program name with args.
40072 set dummy $ac_prog; ac_word=$2
40073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40074 $as_echo_n "checking for $ac_word... " >&6; }
40075 if ${ac_cv_path_GNM+:} false; then :
40076   $as_echo_n "(cached) " >&6
40077 else
40078   case $GNM in
40079   [\\/]* | ?:[\\/]*)
40080   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40081   ;;
40082   *)
40083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40084 for as_dir in $PATH
40085 do
40086   IFS=$as_save_IFS
40087   test -z "$as_dir" && as_dir=.
40088     for ac_exec_ext in '' $ac_executable_extensions; do
40089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40090     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40092     break 2
40093   fi
40094 done
40095   done
40096 IFS=$as_save_IFS
40097 
40098   ;;
40099 esac
40100 fi
40101 GNM=$ac_cv_path_GNM
40102 if test -n "$GNM"; then
40103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40104 $as_echo "$GNM" >&6; }
40105 else
40106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40107 $as_echo "no" >&6; }
40108 fi
40109 
40110 
40111   test -n "$GNM" && break
40112 done
40113 
40114   else
40115     # The variable is set, but is it from the command line or the environment?
40116 
40117     # Try to remove the string !GNM! from our list.
40118     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40119     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40120       # If it failed, the variable was not from the command line. Ignore it,
40121       # but warn the user (except for BASH, which is always set by the calling BASH).
40122       if test "xGNM" != xBASH; then
40123         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40124 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40125       fi
40126       # Try to locate tool using the code snippet
40127       for ac_prog in gnm
40128 do
40129   # Extract the first word of "$ac_prog", so it can be a program name with args.
40130 set dummy $ac_prog; ac_word=$2
40131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40132 $as_echo_n "checking for $ac_word... " >&6; }
40133 if ${ac_cv_path_GNM+:} false; then :
40134   $as_echo_n "(cached) " >&6
40135 else
40136   case $GNM in
40137   [\\/]* | ?:[\\/]*)
40138   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40139   ;;
40140   *)
40141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40142 for as_dir in $PATH
40143 do
40144   IFS=$as_save_IFS
40145   test -z "$as_dir" && as_dir=.
40146     for ac_exec_ext in '' $ac_executable_extensions; do
40147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40148     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40150     break 2
40151   fi
40152 done
40153   done
40154 IFS=$as_save_IFS
40155 
40156   ;;
40157 esac
40158 fi
40159 GNM=$ac_cv_path_GNM
40160 if test -n "$GNM"; then
40161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40162 $as_echo "$GNM" >&6; }
40163 else
40164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40165 $as_echo "no" >&6; }
40166 fi
40167 
40168 
40169   test -n "$GNM" && break
40170 done
40171 
40172     else
40173       # If it succeeded, then it was overridden by the user. We will use it
40174       # for the tool.
40175 
40176       # First remove it from the list of overridden variables, so we can test
40177       # for unknown variables in the end.
40178       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40179 
40180       # Check if we try to supply an empty value
40181       if test "x$GNM" = x; then
40182         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40183 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40184         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40185 $as_echo_n "checking for GNM... " >&6; }
40186         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40187 $as_echo "disabled" >&6; }
40188       else
40189         # Check if the provided tool contains a complete path.
40190         tool_specified="$GNM"
40191         tool_basename="${tool_specified##*/}"
40192         if test "x$tool_basename" = "x$tool_specified"; then
40193           # A command without a complete path is provided, search $PATH.
40194           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40195 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40196           # Extract the first word of "$tool_basename", so it can be a program name with args.
40197 set dummy $tool_basename; ac_word=$2
40198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40199 $as_echo_n "checking for $ac_word... " >&6; }
40200 if ${ac_cv_path_GNM+:} false; then :
40201   $as_echo_n "(cached) " >&6
40202 else
40203   case $GNM in
40204   [\\/]* | ?:[\\/]*)
40205   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40206   ;;
40207   *)
40208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40209 for as_dir in $PATH
40210 do
40211   IFS=$as_save_IFS
40212   test -z "$as_dir" && as_dir=.
40213     for ac_exec_ext in '' $ac_executable_extensions; do
40214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40215     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40217     break 2
40218   fi
40219 done
40220   done
40221 IFS=$as_save_IFS
40222 
40223   ;;
40224 esac
40225 fi
40226 GNM=$ac_cv_path_GNM
40227 if test -n "$GNM"; then
40228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40229 $as_echo "$GNM" >&6; }
40230 else
40231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40232 $as_echo "no" >&6; }
40233 fi
40234 
40235 
40236           if test "x$GNM" = x; then
40237             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40238           fi
40239         else
40240           # Otherwise we believe it is a complete path. Use it as it is.
40241           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40242 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40243           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40244 $as_echo_n "checking for GNM... " >&6; }
40245           if test ! -x "$tool_specified"; then
40246             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40247 $as_echo "not found" >&6; }
40248             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40249           fi
40250           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40251 $as_echo "$tool_specified" >&6; }
40252         fi
40253       fi
40254     fi
40255 
40256   fi
40257 
40258 
40259 
40260   # Only process if variable expands to non-empty
40261 
40262   if test "x$GNM" != x; then
40263     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40264 
40265   # First separate the path from the arguments. This will split at the first
40266   # space.
40267   complete="$GNM"
40268   path="${complete%% *}"
40269   tmp="$complete EOL"
40270   arguments="${tmp#* }"
40271 
40272   # Input might be given as Windows format, start by converting to
40273   # unix format.
40274   new_path=`$CYGPATH -u "$path"`
40275 
40276   # Now try to locate executable using which
40277   new_path=`$WHICH "$new_path" 2> /dev/null`
40278   # bat and cmd files are not always considered executable in cygwin causing which
40279   # to not find them
40280   if test "x$new_path" = x \
40281       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40282       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40283     new_path=`$CYGPATH -u "$path"`
40284   fi
40285   if test "x$new_path" = x; then
40286     # Oops. Which didn't find the executable.
40287     # The splitting of arguments from the executable at a space might have been incorrect,
40288     # since paths with space are more likely in Windows. Give it another try with the whole
40289     # argument.
40290     path="$complete"
40291     arguments="EOL"
40292     new_path=`$CYGPATH -u "$path"`
40293     new_path=`$WHICH "$new_path" 2> /dev/null`
40294     # bat and cmd files are not always considered executable in cygwin causing which
40295     # to not find them
40296     if test "x$new_path" = x \
40297         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40298         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40299       new_path=`$CYGPATH -u "$path"`
40300     fi
40301     if test "x$new_path" = x; then
40302       # It's still not found. Now this is an unrecoverable error.
40303       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40304 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40305       has_space=`$ECHO "$complete" | $GREP " "`
40306       if test "x$has_space" != x; then
40307         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40308 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40309       fi
40310       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40311     fi
40312   fi
40313 
40314   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40315   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40316   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40317   # "foo.exe" is OK but "foo" is an error.
40318   #
40319   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40320   # It is also a way to make sure we got the proper file name for the real test later on.
40321   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40322   if test "x$test_shortpath" = x; then
40323     # Short path failed, file does not exist as specified.
40324     # Try adding .exe or .cmd
40325     if test -f "${new_path}.exe"; then
40326       input_to_shortpath="${new_path}.exe"
40327     elif test -f "${new_path}.cmd"; then
40328       input_to_shortpath="${new_path}.cmd"
40329     else
40330       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40331 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40332       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40333 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40334       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40335     fi
40336   else
40337     input_to_shortpath="$new_path"
40338   fi
40339 
40340   # Call helper function which possibly converts this using DOS-style short mode.
40341   # If so, the updated path is stored in $new_path.
40342   new_path="$input_to_shortpath"
40343 
40344   input_path="$input_to_shortpath"
40345   # Check if we need to convert this using DOS-style short mode. If the path
40346   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40347   # take no chances and rewrite it.
40348   # Note: m4 eats our [], so we need to use [ and ] instead.
40349   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40350   if test "x$has_forbidden_chars" != x; then
40351     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40352     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40353     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40354     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40355       # Going to short mode and back again did indeed matter. Since short mode is
40356       # case insensitive, let's make it lowercase to improve readability.
40357       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40358       # Now convert it back to Unix-style (cygpath)
40359       input_path=`$CYGPATH -u "$shortmode_path"`
40360       new_path="$input_path"
40361     fi
40362   fi
40363 
40364   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40365   if test "x$test_cygdrive_prefix" = x; then
40366     # As a simple fix, exclude /usr/bin since it's not a real path.
40367     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40368       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40369       # a path prefixed by /cygdrive for fixpath to work.
40370       new_path="$CYGWIN_ROOT_PATH$input_path"
40371     fi
40372   fi
40373 
40374   # remove trailing .exe if any
40375   new_path="${new_path/%.exe/}"
40376 
40377     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40378 
40379   # First separate the path from the arguments. This will split at the first
40380   # space.
40381   complete="$GNM"
40382   path="${complete%% *}"
40383   tmp="$complete EOL"
40384   arguments="${tmp#* }"
40385 
40386   # Input might be given as Windows format, start by converting to
40387   # unix format.
40388   new_path="$path"
40389 
40390   windows_path="$new_path"
40391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40392     unix_path=`$CYGPATH -u "$windows_path"`
40393     new_path="$unix_path"
40394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40396     new_path="$unix_path"
40397   fi
40398 
40399 
40400   # Now try to locate executable using which
40401   new_path=`$WHICH "$new_path" 2> /dev/null`
40402 
40403   if test "x$new_path" = x; then
40404     # Oops. Which didn't find the executable.
40405     # The splitting of arguments from the executable at a space might have been incorrect,
40406     # since paths with space are more likely in Windows. Give it another try with the whole
40407     # argument.
40408     path="$complete"
40409     arguments="EOL"
40410     new_path="$path"
40411 
40412   windows_path="$new_path"
40413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40414     unix_path=`$CYGPATH -u "$windows_path"`
40415     new_path="$unix_path"
40416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40418     new_path="$unix_path"
40419   fi
40420 
40421 
40422     new_path=`$WHICH "$new_path" 2> /dev/null`
40423     # bat and cmd files are not always considered executable in MSYS causing which
40424     # to not find them
40425     if test "x$new_path" = x \
40426         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40427         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40428       new_path="$path"
40429 
40430   windows_path="$new_path"
40431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40432     unix_path=`$CYGPATH -u "$windows_path"`
40433     new_path="$unix_path"
40434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40436     new_path="$unix_path"
40437   fi
40438 
40439     fi
40440 
40441     if test "x$new_path" = x; then
40442       # It's still not found. Now this is an unrecoverable error.
40443       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40444 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40445       has_space=`$ECHO "$complete" | $GREP " "`
40446       if test "x$has_space" != x; then
40447         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40448 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40449       fi
40450       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40451     fi
40452   fi
40453 
40454   # Now new_path has a complete unix path to the binary
40455   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40456     # Keep paths in /bin as-is, but remove trailing .exe if any
40457     new_path="${new_path/%.exe/}"
40458     # Do not save /bin paths to all_fixpath_prefixes!
40459   else
40460     # Not in mixed or Windows style, start by that.
40461     new_path=`cmd //c echo $new_path`
40462 
40463   input_path="$new_path"
40464   # Check if we need to convert this using DOS-style short mode. If the path
40465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40466   # take no chances and rewrite it.
40467   # Note: m4 eats our [], so we need to use [ and ] instead.
40468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40469   if test "x$has_forbidden_chars" != x; then
40470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40471     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40472   fi
40473 
40474     # Output is in $new_path
40475 
40476   windows_path="$new_path"
40477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40478     unix_path=`$CYGPATH -u "$windows_path"`
40479     new_path="$unix_path"
40480   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40481     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40482     new_path="$unix_path"
40483   fi
40484 
40485     # remove trailing .exe if any
40486     new_path="${new_path/%.exe/}"
40487 
40488     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40489     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40490   fi
40491 
40492     else
40493       # We're on a unix platform. Hooray! :)
40494       # First separate the path from the arguments. This will split at the first
40495       # space.
40496       complete="$GNM"
40497       path="${complete%% *}"
40498       tmp="$complete EOL"
40499       arguments="${tmp#* }"
40500 
40501       # Cannot rely on the command "which" here since it doesn't always work.
40502       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40503       if test -z "$is_absolute_path"; then
40504         # Path to executable is not absolute. Find it.
40505         IFS_save="$IFS"
40506         IFS=:
40507         for p in $PATH; do
40508           if test -f "$p/$path" && test -x "$p/$path"; then
40509             new_path="$p/$path"
40510             break
40511           fi
40512         done
40513         IFS="$IFS_save"
40514       else
40515         # This is an absolute path, we can use it without further modifications.
40516         new_path="$path"
40517       fi
40518 
40519       if test "x$new_path" = x; then
40520         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40521 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40522         has_space=`$ECHO "$complete" | $GREP " "`
40523         if test "x$has_space" != x; then
40524           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40525 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40526         fi
40527         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40528       fi
40529     fi
40530 
40531     # Now join together the path and the arguments once again
40532     if test "x$arguments" != xEOL; then
40533       new_complete="$new_path ${arguments% *}"
40534     else
40535       new_complete="$new_path"
40536     fi
40537 
40538     if test "x$complete" != "x$new_complete"; then
40539       GNM="$new_complete"
40540       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40541 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40542     fi
40543   fi
40544 
40545   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40546     # FIXME: we should unify this with the solaris case above.
40547 
40548 
40549   # Publish this variable in the help.
40550 
40551 
40552   if [ -z "${STRIP+x}" ]; then
40553     # The variable is not set by user, try to locate tool using the code snippet
40554     if test -n "$ac_tool_prefix"; then
40555   for ac_prog in strip
40556   do
40557     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40558 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40560 $as_echo_n "checking for $ac_word... " >&6; }
40561 if ${ac_cv_prog_STRIP+:} false; then :
40562   $as_echo_n "(cached) " >&6
40563 else
40564   if test -n "$STRIP"; then
40565   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40566 else
40567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40568 for as_dir in $PATH
40569 do
40570   IFS=$as_save_IFS
40571   test -z "$as_dir" && as_dir=.
40572     for ac_exec_ext in '' $ac_executable_extensions; do
40573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40574     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40576     break 2
40577   fi
40578 done
40579   done
40580 IFS=$as_save_IFS
40581 
40582 fi
40583 fi
40584 STRIP=$ac_cv_prog_STRIP
40585 if test -n "$STRIP"; then
40586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40587 $as_echo "$STRIP" >&6; }
40588 else
40589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40590 $as_echo "no" >&6; }
40591 fi
40592 
40593 
40594     test -n "$STRIP" && break
40595   done
40596 fi
40597 if test -z "$STRIP"; then
40598   ac_ct_STRIP=$STRIP
40599   for ac_prog in strip
40600 do
40601   # Extract the first word of "$ac_prog", so it can be a program name with args.
40602 set dummy $ac_prog; ac_word=$2
40603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40604 $as_echo_n "checking for $ac_word... " >&6; }
40605 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40606   $as_echo_n "(cached) " >&6
40607 else
40608   if test -n "$ac_ct_STRIP"; then
40609   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40610 else
40611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40612 for as_dir in $PATH
40613 do
40614   IFS=$as_save_IFS
40615   test -z "$as_dir" && as_dir=.
40616     for ac_exec_ext in '' $ac_executable_extensions; do
40617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40618     ac_cv_prog_ac_ct_STRIP="$ac_prog"
40619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40620     break 2
40621   fi
40622 done
40623   done
40624 IFS=$as_save_IFS
40625 
40626 fi
40627 fi
40628 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40629 if test -n "$ac_ct_STRIP"; then
40630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40631 $as_echo "$ac_ct_STRIP" >&6; }
40632 else
40633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40634 $as_echo "no" >&6; }
40635 fi
40636 
40637 
40638   test -n "$ac_ct_STRIP" && break
40639 done
40640 
40641   if test "x$ac_ct_STRIP" = x; then
40642     STRIP=""
40643   else
40644     case $cross_compiling:$ac_tool_warned in
40645 yes:)
40646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40647 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40648 ac_tool_warned=yes ;;
40649 esac
40650     STRIP=$ac_ct_STRIP
40651   fi
40652 fi
40653 
40654   else
40655     # The variable is set, but is it from the command line or the environment?
40656 
40657     # Try to remove the string !STRIP! from our list.
40658     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40659     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40660       # If it failed, the variable was not from the command line. Ignore it,
40661       # but warn the user (except for BASH, which is always set by the calling BASH).
40662       if test "xSTRIP" != xBASH; then
40663         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40664 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40665       fi
40666       # Try to locate tool using the code snippet
40667       if test -n "$ac_tool_prefix"; then
40668   for ac_prog in strip
40669   do
40670     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40671 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40673 $as_echo_n "checking for $ac_word... " >&6; }
40674 if ${ac_cv_prog_STRIP+:} false; then :
40675   $as_echo_n "(cached) " >&6
40676 else
40677   if test -n "$STRIP"; then
40678   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40679 else
40680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40681 for as_dir in $PATH
40682 do
40683   IFS=$as_save_IFS
40684   test -z "$as_dir" && as_dir=.
40685     for ac_exec_ext in '' $ac_executable_extensions; do
40686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40687     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40689     break 2
40690   fi
40691 done
40692   done
40693 IFS=$as_save_IFS
40694 
40695 fi
40696 fi
40697 STRIP=$ac_cv_prog_STRIP
40698 if test -n "$STRIP"; then
40699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40700 $as_echo "$STRIP" >&6; }
40701 else
40702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40703 $as_echo "no" >&6; }
40704 fi
40705 
40706 
40707     test -n "$STRIP" && break
40708   done
40709 fi
40710 if test -z "$STRIP"; then
40711   ac_ct_STRIP=$STRIP
40712   for ac_prog in strip
40713 do
40714   # Extract the first word of "$ac_prog", so it can be a program name with args.
40715 set dummy $ac_prog; ac_word=$2
40716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40717 $as_echo_n "checking for $ac_word... " >&6; }
40718 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40719   $as_echo_n "(cached) " >&6
40720 else
40721   if test -n "$ac_ct_STRIP"; then
40722   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40723 else
40724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40725 for as_dir in $PATH
40726 do
40727   IFS=$as_save_IFS
40728   test -z "$as_dir" && as_dir=.
40729     for ac_exec_ext in '' $ac_executable_extensions; do
40730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40731     ac_cv_prog_ac_ct_STRIP="$ac_prog"
40732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40733     break 2
40734   fi
40735 done
40736   done
40737 IFS=$as_save_IFS
40738 
40739 fi
40740 fi
40741 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40742 if test -n "$ac_ct_STRIP"; then
40743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40744 $as_echo "$ac_ct_STRIP" >&6; }
40745 else
40746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40747 $as_echo "no" >&6; }
40748 fi
40749 
40750 
40751   test -n "$ac_ct_STRIP" && break
40752 done
40753 
40754   if test "x$ac_ct_STRIP" = x; then
40755     STRIP=""
40756   else
40757     case $cross_compiling:$ac_tool_warned in
40758 yes:)
40759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40760 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40761 ac_tool_warned=yes ;;
40762 esac
40763     STRIP=$ac_ct_STRIP
40764   fi
40765 fi
40766 
40767     else
40768       # If it succeeded, then it was overridden by the user. We will use it
40769       # for the tool.
40770 
40771       # First remove it from the list of overridden variables, so we can test
40772       # for unknown variables in the end.
40773       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40774 
40775       # Check if we try to supply an empty value
40776       if test "x$STRIP" = x; then
40777         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40778 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40779         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40780 $as_echo_n "checking for STRIP... " >&6; }
40781         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40782 $as_echo "disabled" >&6; }
40783       else
40784         # Check if the provided tool contains a complete path.
40785         tool_specified="$STRIP"
40786         tool_basename="${tool_specified##*/}"
40787         if test "x$tool_basename" = "x$tool_specified"; then
40788           # A command without a complete path is provided, search $PATH.
40789           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40790 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40791           # Extract the first word of "$tool_basename", so it can be a program name with args.
40792 set dummy $tool_basename; ac_word=$2
40793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40794 $as_echo_n "checking for $ac_word... " >&6; }
40795 if ${ac_cv_path_STRIP+:} false; then :
40796   $as_echo_n "(cached) " >&6
40797 else
40798   case $STRIP in
40799   [\\/]* | ?:[\\/]*)
40800   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40801   ;;
40802   *)
40803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40804 for as_dir in $PATH
40805 do
40806   IFS=$as_save_IFS
40807   test -z "$as_dir" && as_dir=.
40808     for ac_exec_ext in '' $ac_executable_extensions; do
40809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40810     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40812     break 2
40813   fi
40814 done
40815   done
40816 IFS=$as_save_IFS
40817 
40818   ;;
40819 esac
40820 fi
40821 STRIP=$ac_cv_path_STRIP
40822 if test -n "$STRIP"; then
40823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40824 $as_echo "$STRIP" >&6; }
40825 else
40826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40827 $as_echo "no" >&6; }
40828 fi
40829 
40830 
40831           if test "x$STRIP" = x; then
40832             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40833           fi
40834         else
40835           # Otherwise we believe it is a complete path. Use it as it is.
40836           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40837 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40838           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40839 $as_echo_n "checking for STRIP... " >&6; }
40840           if test ! -x "$tool_specified"; then
40841             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40842 $as_echo "not found" >&6; }
40843             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40844           fi
40845           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40846 $as_echo "$tool_specified" >&6; }
40847         fi
40848       fi
40849     fi
40850 
40851   fi
40852 
40853 
40854 
40855   # Only process if variable expands to non-empty
40856 
40857   if test "x$STRIP" != x; then
40858     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40859 
40860   # First separate the path from the arguments. This will split at the first
40861   # space.
40862   complete="$STRIP"
40863   path="${complete%% *}"
40864   tmp="$complete EOL"
40865   arguments="${tmp#* }"
40866 
40867   # Input might be given as Windows format, start by converting to
40868   # unix format.
40869   new_path=`$CYGPATH -u "$path"`
40870 
40871   # Now try to locate executable using which
40872   new_path=`$WHICH "$new_path" 2> /dev/null`
40873   # bat and cmd files are not always considered executable in cygwin causing which
40874   # to not find them
40875   if test "x$new_path" = x \
40876       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40877       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40878     new_path=`$CYGPATH -u "$path"`
40879   fi
40880   if test "x$new_path" = x; then
40881     # Oops. Which didn't find the executable.
40882     # The splitting of arguments from the executable at a space might have been incorrect,
40883     # since paths with space are more likely in Windows. Give it another try with the whole
40884     # argument.
40885     path="$complete"
40886     arguments="EOL"
40887     new_path=`$CYGPATH -u "$path"`
40888     new_path=`$WHICH "$new_path" 2> /dev/null`
40889     # bat and cmd files are not always considered executable in cygwin causing which
40890     # to not find them
40891     if test "x$new_path" = x \
40892         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40893         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40894       new_path=`$CYGPATH -u "$path"`
40895     fi
40896     if test "x$new_path" = x; then
40897       # It's still not found. Now this is an unrecoverable error.
40898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40899 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40900       has_space=`$ECHO "$complete" | $GREP " "`
40901       if test "x$has_space" != x; then
40902         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40903 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40904       fi
40905       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40906     fi
40907   fi
40908 
40909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40912   # "foo.exe" is OK but "foo" is an error.
40913   #
40914   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40915   # It is also a way to make sure we got the proper file name for the real test later on.
40916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40917   if test "x$test_shortpath" = x; then
40918     # Short path failed, file does not exist as specified.
40919     # Try adding .exe or .cmd
40920     if test -f "${new_path}.exe"; then
40921       input_to_shortpath="${new_path}.exe"
40922     elif test -f "${new_path}.cmd"; then
40923       input_to_shortpath="${new_path}.cmd"
40924     else
40925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40926 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40927       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40928 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40929       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40930     fi
40931   else
40932     input_to_shortpath="$new_path"
40933   fi
40934 
40935   # Call helper function which possibly converts this using DOS-style short mode.
40936   # If so, the updated path is stored in $new_path.
40937   new_path="$input_to_shortpath"
40938 
40939   input_path="$input_to_shortpath"
40940   # Check if we need to convert this using DOS-style short mode. If the path
40941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40942   # take no chances and rewrite it.
40943   # Note: m4 eats our [], so we need to use [ and ] instead.
40944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40945   if test "x$has_forbidden_chars" != x; then
40946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40947     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40948     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40949     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40950       # Going to short mode and back again did indeed matter. Since short mode is
40951       # case insensitive, let's make it lowercase to improve readability.
40952       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40953       # Now convert it back to Unix-style (cygpath)
40954       input_path=`$CYGPATH -u "$shortmode_path"`
40955       new_path="$input_path"
40956     fi
40957   fi
40958 
40959   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40960   if test "x$test_cygdrive_prefix" = x; then
40961     # As a simple fix, exclude /usr/bin since it's not a real path.
40962     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40963       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40964       # a path prefixed by /cygdrive for fixpath to work.
40965       new_path="$CYGWIN_ROOT_PATH$input_path"
40966     fi
40967   fi
40968 
40969   # remove trailing .exe if any
40970   new_path="${new_path/%.exe/}"
40971 
40972     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40973 
40974   # First separate the path from the arguments. This will split at the first
40975   # space.
40976   complete="$STRIP"
40977   path="${complete%% *}"
40978   tmp="$complete EOL"
40979   arguments="${tmp#* }"
40980 
40981   # Input might be given as Windows format, start by converting to
40982   # unix format.
40983   new_path="$path"
40984 
40985   windows_path="$new_path"
40986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40987     unix_path=`$CYGPATH -u "$windows_path"`
40988     new_path="$unix_path"
40989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40990     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40991     new_path="$unix_path"
40992   fi
40993 
40994 
40995   # Now try to locate executable using which
40996   new_path=`$WHICH "$new_path" 2> /dev/null`
40997 
40998   if test "x$new_path" = x; then
40999     # Oops. Which didn't find the executable.
41000     # The splitting of arguments from the executable at a space might have been incorrect,
41001     # since paths with space are more likely in Windows. Give it another try with the whole
41002     # argument.
41003     path="$complete"
41004     arguments="EOL"
41005     new_path="$path"
41006 
41007   windows_path="$new_path"
41008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41009     unix_path=`$CYGPATH -u "$windows_path"`
41010     new_path="$unix_path"
41011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41013     new_path="$unix_path"
41014   fi
41015 
41016 
41017     new_path=`$WHICH "$new_path" 2> /dev/null`
41018     # bat and cmd files are not always considered executable in MSYS causing which
41019     # to not find them
41020     if test "x$new_path" = x \
41021         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41022         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41023       new_path="$path"
41024 
41025   windows_path="$new_path"
41026   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41027     unix_path=`$CYGPATH -u "$windows_path"`
41028     new_path="$unix_path"
41029   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41030     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41031     new_path="$unix_path"
41032   fi
41033 
41034     fi
41035 
41036     if test "x$new_path" = x; then
41037       # It's still not found. Now this is an unrecoverable error.
41038       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41039 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41040       has_space=`$ECHO "$complete" | $GREP " "`
41041       if test "x$has_space" != x; then
41042         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41043 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41044       fi
41045       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41046     fi
41047   fi
41048 
41049   # Now new_path has a complete unix path to the binary
41050   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41051     # Keep paths in /bin as-is, but remove trailing .exe if any
41052     new_path="${new_path/%.exe/}"
41053     # Do not save /bin paths to all_fixpath_prefixes!
41054   else
41055     # Not in mixed or Windows style, start by that.
41056     new_path=`cmd //c echo $new_path`
41057 
41058   input_path="$new_path"
41059   # Check if we need to convert this using DOS-style short mode. If the path
41060   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41061   # take no chances and rewrite it.
41062   # Note: m4 eats our [], so we need to use [ and ] instead.
41063   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41064   if test "x$has_forbidden_chars" != x; then
41065     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41066     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41067   fi
41068 
41069     # Output is in $new_path
41070 
41071   windows_path="$new_path"
41072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41073     unix_path=`$CYGPATH -u "$windows_path"`
41074     new_path="$unix_path"
41075   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41076     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41077     new_path="$unix_path"
41078   fi
41079 
41080     # remove trailing .exe if any
41081     new_path="${new_path/%.exe/}"
41082 
41083     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41084     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41085   fi
41086 
41087     else
41088       # We're on a unix platform. Hooray! :)
41089       # First separate the path from the arguments. This will split at the first
41090       # space.
41091       complete="$STRIP"
41092       path="${complete%% *}"
41093       tmp="$complete EOL"
41094       arguments="${tmp#* }"
41095 
41096       # Cannot rely on the command "which" here since it doesn't always work.
41097       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41098       if test -z "$is_absolute_path"; then
41099         # Path to executable is not absolute. Find it.
41100         IFS_save="$IFS"
41101         IFS=:
41102         for p in $PATH; do
41103           if test -f "$p/$path" && test -x "$p/$path"; then
41104             new_path="$p/$path"
41105             break
41106           fi
41107         done
41108         IFS="$IFS_save"
41109       else
41110         # This is an absolute path, we can use it without further modifications.
41111         new_path="$path"
41112       fi
41113 
41114       if test "x$new_path" = x; then
41115         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41116 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41117         has_space=`$ECHO "$complete" | $GREP " "`
41118         if test "x$has_space" != x; then
41119           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41120 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41121         fi
41122         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41123       fi
41124     fi
41125 
41126     # Now join together the path and the arguments once again
41127     if test "x$arguments" != xEOL; then
41128       new_complete="$new_path ${arguments% *}"
41129     else
41130       new_complete="$new_path"
41131     fi
41132 
41133     if test "x$complete" != "x$new_complete"; then
41134       STRIP="$new_complete"
41135       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41136 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41137     fi
41138   fi
41139 
41140     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41141 
41142 
41143   # Publish this variable in the help.
41144 
41145 
41146   if [ -z "${NM+x}" ]; then
41147     # The variable is not set by user, try to locate tool using the code snippet
41148     if test -n "$ac_tool_prefix"; then
41149   for ac_prog in nm gcc-nm
41150   do
41151     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41152 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41154 $as_echo_n "checking for $ac_word... " >&6; }
41155 if ${ac_cv_prog_NM+:} false; then :
41156   $as_echo_n "(cached) " >&6
41157 else
41158   if test -n "$NM"; then
41159   ac_cv_prog_NM="$NM" # Let the user override the test.
41160 else
41161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41162 for as_dir in $PATH
41163 do
41164   IFS=$as_save_IFS
41165   test -z "$as_dir" && as_dir=.
41166     for ac_exec_ext in '' $ac_executable_extensions; do
41167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41168     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41170     break 2
41171   fi
41172 done
41173   done
41174 IFS=$as_save_IFS
41175 
41176 fi
41177 fi
41178 NM=$ac_cv_prog_NM
41179 if test -n "$NM"; then
41180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41181 $as_echo "$NM" >&6; }
41182 else
41183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41184 $as_echo "no" >&6; }
41185 fi
41186 
41187 
41188     test -n "$NM" && break
41189   done
41190 fi
41191 if test -z "$NM"; then
41192   ac_ct_NM=$NM
41193   for ac_prog in nm gcc-nm
41194 do
41195   # Extract the first word of "$ac_prog", so it can be a program name with args.
41196 set dummy $ac_prog; ac_word=$2
41197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41198 $as_echo_n "checking for $ac_word... " >&6; }
41199 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41200   $as_echo_n "(cached) " >&6
41201 else
41202   if test -n "$ac_ct_NM"; then
41203   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41204 else
41205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41206 for as_dir in $PATH
41207 do
41208   IFS=$as_save_IFS
41209   test -z "$as_dir" && as_dir=.
41210     for ac_exec_ext in '' $ac_executable_extensions; do
41211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41212     ac_cv_prog_ac_ct_NM="$ac_prog"
41213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41214     break 2
41215   fi
41216 done
41217   done
41218 IFS=$as_save_IFS
41219 
41220 fi
41221 fi
41222 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41223 if test -n "$ac_ct_NM"; then
41224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41225 $as_echo "$ac_ct_NM" >&6; }
41226 else
41227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41228 $as_echo "no" >&6; }
41229 fi
41230 
41231 
41232   test -n "$ac_ct_NM" && break
41233 done
41234 
41235   if test "x$ac_ct_NM" = x; then
41236     NM=""
41237   else
41238     case $cross_compiling:$ac_tool_warned in
41239 yes:)
41240 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41241 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41242 ac_tool_warned=yes ;;
41243 esac
41244     NM=$ac_ct_NM
41245   fi
41246 fi
41247 
41248   else
41249     # The variable is set, but is it from the command line or the environment?
41250 
41251     # Try to remove the string !NM! from our list.
41252     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41253     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41254       # If it failed, the variable was not from the command line. Ignore it,
41255       # but warn the user (except for BASH, which is always set by the calling BASH).
41256       if test "xNM" != xBASH; then
41257         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41258 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41259       fi
41260       # Try to locate tool using the code snippet
41261       if test -n "$ac_tool_prefix"; then
41262   for ac_prog in nm gcc-nm
41263   do
41264     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41265 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41267 $as_echo_n "checking for $ac_word... " >&6; }
41268 if ${ac_cv_prog_NM+:} false; then :
41269   $as_echo_n "(cached) " >&6
41270 else
41271   if test -n "$NM"; then
41272   ac_cv_prog_NM="$NM" # Let the user override the test.
41273 else
41274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41275 for as_dir in $PATH
41276 do
41277   IFS=$as_save_IFS
41278   test -z "$as_dir" && as_dir=.
41279     for ac_exec_ext in '' $ac_executable_extensions; do
41280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41281     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41283     break 2
41284   fi
41285 done
41286   done
41287 IFS=$as_save_IFS
41288 
41289 fi
41290 fi
41291 NM=$ac_cv_prog_NM
41292 if test -n "$NM"; then
41293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41294 $as_echo "$NM" >&6; }
41295 else
41296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41297 $as_echo "no" >&6; }
41298 fi
41299 
41300 
41301     test -n "$NM" && break
41302   done
41303 fi
41304 if test -z "$NM"; then
41305   ac_ct_NM=$NM
41306   for ac_prog in nm gcc-nm
41307 do
41308   # Extract the first word of "$ac_prog", so it can be a program name with args.
41309 set dummy $ac_prog; ac_word=$2
41310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41311 $as_echo_n "checking for $ac_word... " >&6; }
41312 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41313   $as_echo_n "(cached) " >&6
41314 else
41315   if test -n "$ac_ct_NM"; then
41316   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41317 else
41318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41319 for as_dir in $PATH
41320 do
41321   IFS=$as_save_IFS
41322   test -z "$as_dir" && as_dir=.
41323     for ac_exec_ext in '' $ac_executable_extensions; do
41324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41325     ac_cv_prog_ac_ct_NM="$ac_prog"
41326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41327     break 2
41328   fi
41329 done
41330   done
41331 IFS=$as_save_IFS
41332 
41333 fi
41334 fi
41335 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41336 if test -n "$ac_ct_NM"; then
41337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41338 $as_echo "$ac_ct_NM" >&6; }
41339 else
41340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41341 $as_echo "no" >&6; }
41342 fi
41343 
41344 
41345   test -n "$ac_ct_NM" && break
41346 done
41347 
41348   if test "x$ac_ct_NM" = x; then
41349     NM=""
41350   else
41351     case $cross_compiling:$ac_tool_warned in
41352 yes:)
41353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41354 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41355 ac_tool_warned=yes ;;
41356 esac
41357     NM=$ac_ct_NM
41358   fi
41359 fi
41360 
41361     else
41362       # If it succeeded, then it was overridden by the user. We will use it
41363       # for the tool.
41364 
41365       # First remove it from the list of overridden variables, so we can test
41366       # for unknown variables in the end.
41367       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41368 
41369       # Check if we try to supply an empty value
41370       if test "x$NM" = x; then
41371         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41372 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41373         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41374 $as_echo_n "checking for NM... " >&6; }
41375         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41376 $as_echo "disabled" >&6; }
41377       else
41378         # Check if the provided tool contains a complete path.
41379         tool_specified="$NM"
41380         tool_basename="${tool_specified##*/}"
41381         if test "x$tool_basename" = "x$tool_specified"; then
41382           # A command without a complete path is provided, search $PATH.
41383           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41384 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41385           # Extract the first word of "$tool_basename", so it can be a program name with args.
41386 set dummy $tool_basename; ac_word=$2
41387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41388 $as_echo_n "checking for $ac_word... " >&6; }
41389 if ${ac_cv_path_NM+:} false; then :
41390   $as_echo_n "(cached) " >&6
41391 else
41392   case $NM in
41393   [\\/]* | ?:[\\/]*)
41394   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41395   ;;
41396   *)
41397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41398 for as_dir in $PATH
41399 do
41400   IFS=$as_save_IFS
41401   test -z "$as_dir" && as_dir=.
41402     for ac_exec_ext in '' $ac_executable_extensions; do
41403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41404     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41406     break 2
41407   fi
41408 done
41409   done
41410 IFS=$as_save_IFS
41411 
41412   ;;
41413 esac
41414 fi
41415 NM=$ac_cv_path_NM
41416 if test -n "$NM"; then
41417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41418 $as_echo "$NM" >&6; }
41419 else
41420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41421 $as_echo "no" >&6; }
41422 fi
41423 
41424 
41425           if test "x$NM" = x; then
41426             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41427           fi
41428         else
41429           # Otherwise we believe it is a complete path. Use it as it is.
41430           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41431 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41432           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41433 $as_echo_n "checking for NM... " >&6; }
41434           if test ! -x "$tool_specified"; then
41435             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41436 $as_echo "not found" >&6; }
41437             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41438           fi
41439           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41440 $as_echo "$tool_specified" >&6; }
41441         fi
41442       fi
41443     fi
41444 
41445   fi
41446 
41447 
41448     else
41449 
41450 
41451   # Publish this variable in the help.
41452 
41453 
41454   if [ -z "${NM+x}" ]; then
41455     # The variable is not set by user, try to locate tool using the code snippet
41456     if test -n "$ac_tool_prefix"; then
41457   for ac_prog in nm
41458   do
41459     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41460 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41462 $as_echo_n "checking for $ac_word... " >&6; }
41463 if ${ac_cv_prog_NM+:} false; then :
41464   $as_echo_n "(cached) " >&6
41465 else
41466   if test -n "$NM"; then
41467   ac_cv_prog_NM="$NM" # Let the user override the test.
41468 else
41469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41470 for as_dir in $PATH
41471 do
41472   IFS=$as_save_IFS
41473   test -z "$as_dir" && as_dir=.
41474     for ac_exec_ext in '' $ac_executable_extensions; do
41475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41476     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41478     break 2
41479   fi
41480 done
41481   done
41482 IFS=$as_save_IFS
41483 
41484 fi
41485 fi
41486 NM=$ac_cv_prog_NM
41487 if test -n "$NM"; then
41488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41489 $as_echo "$NM" >&6; }
41490 else
41491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41492 $as_echo "no" >&6; }
41493 fi
41494 
41495 
41496     test -n "$NM" && break
41497   done
41498 fi
41499 if test -z "$NM"; then
41500   ac_ct_NM=$NM
41501   for ac_prog in nm
41502 do
41503   # Extract the first word of "$ac_prog", so it can be a program name with args.
41504 set dummy $ac_prog; ac_word=$2
41505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41506 $as_echo_n "checking for $ac_word... " >&6; }
41507 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41508   $as_echo_n "(cached) " >&6
41509 else
41510   if test -n "$ac_ct_NM"; then
41511   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41512 else
41513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41514 for as_dir in $PATH
41515 do
41516   IFS=$as_save_IFS
41517   test -z "$as_dir" && as_dir=.
41518     for ac_exec_ext in '' $ac_executable_extensions; do
41519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41520     ac_cv_prog_ac_ct_NM="$ac_prog"
41521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41522     break 2
41523   fi
41524 done
41525   done
41526 IFS=$as_save_IFS
41527 
41528 fi
41529 fi
41530 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41531 if test -n "$ac_ct_NM"; then
41532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41533 $as_echo "$ac_ct_NM" >&6; }
41534 else
41535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41536 $as_echo "no" >&6; }
41537 fi
41538 
41539 
41540   test -n "$ac_ct_NM" && break
41541 done
41542 
41543   if test "x$ac_ct_NM" = x; then
41544     NM=""
41545   else
41546     case $cross_compiling:$ac_tool_warned in
41547 yes:)
41548 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41549 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41550 ac_tool_warned=yes ;;
41551 esac
41552     NM=$ac_ct_NM
41553   fi
41554 fi
41555 
41556   else
41557     # The variable is set, but is it from the command line or the environment?
41558 
41559     # Try to remove the string !NM! from our list.
41560     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41561     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41562       # If it failed, the variable was not from the command line. Ignore it,
41563       # but warn the user (except for BASH, which is always set by the calling BASH).
41564       if test "xNM" != xBASH; then
41565         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41566 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41567       fi
41568       # Try to locate tool using the code snippet
41569       if test -n "$ac_tool_prefix"; then
41570   for ac_prog in nm
41571   do
41572     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41573 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41575 $as_echo_n "checking for $ac_word... " >&6; }
41576 if ${ac_cv_prog_NM+:} false; then :
41577   $as_echo_n "(cached) " >&6
41578 else
41579   if test -n "$NM"; then
41580   ac_cv_prog_NM="$NM" # Let the user override the test.
41581 else
41582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41583 for as_dir in $PATH
41584 do
41585   IFS=$as_save_IFS
41586   test -z "$as_dir" && as_dir=.
41587     for ac_exec_ext in '' $ac_executable_extensions; do
41588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41589     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41591     break 2
41592   fi
41593 done
41594   done
41595 IFS=$as_save_IFS
41596 
41597 fi
41598 fi
41599 NM=$ac_cv_prog_NM
41600 if test -n "$NM"; then
41601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41602 $as_echo "$NM" >&6; }
41603 else
41604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41605 $as_echo "no" >&6; }
41606 fi
41607 
41608 
41609     test -n "$NM" && break
41610   done
41611 fi
41612 if test -z "$NM"; then
41613   ac_ct_NM=$NM
41614   for ac_prog in nm
41615 do
41616   # Extract the first word of "$ac_prog", so it can be a program name with args.
41617 set dummy $ac_prog; ac_word=$2
41618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41619 $as_echo_n "checking for $ac_word... " >&6; }
41620 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41621   $as_echo_n "(cached) " >&6
41622 else
41623   if test -n "$ac_ct_NM"; then
41624   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41625 else
41626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41627 for as_dir in $PATH
41628 do
41629   IFS=$as_save_IFS
41630   test -z "$as_dir" && as_dir=.
41631     for ac_exec_ext in '' $ac_executable_extensions; do
41632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41633     ac_cv_prog_ac_ct_NM="$ac_prog"
41634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41635     break 2
41636   fi
41637 done
41638   done
41639 IFS=$as_save_IFS
41640 
41641 fi
41642 fi
41643 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41644 if test -n "$ac_ct_NM"; then
41645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41646 $as_echo "$ac_ct_NM" >&6; }
41647 else
41648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41649 $as_echo "no" >&6; }
41650 fi
41651 
41652 
41653   test -n "$ac_ct_NM" && break
41654 done
41655 
41656   if test "x$ac_ct_NM" = x; then
41657     NM=""
41658   else
41659     case $cross_compiling:$ac_tool_warned in
41660 yes:)
41661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41662 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41663 ac_tool_warned=yes ;;
41664 esac
41665     NM=$ac_ct_NM
41666   fi
41667 fi
41668 
41669     else
41670       # If it succeeded, then it was overridden by the user. We will use it
41671       # for the tool.
41672 
41673       # First remove it from the list of overridden variables, so we can test
41674       # for unknown variables in the end.
41675       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41676 
41677       # Check if we try to supply an empty value
41678       if test "x$NM" = x; then
41679         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41680 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41681         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41682 $as_echo_n "checking for NM... " >&6; }
41683         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41684 $as_echo "disabled" >&6; }
41685       else
41686         # Check if the provided tool contains a complete path.
41687         tool_specified="$NM"
41688         tool_basename="${tool_specified##*/}"
41689         if test "x$tool_basename" = "x$tool_specified"; then
41690           # A command without a complete path is provided, search $PATH.
41691           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41692 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41693           # Extract the first word of "$tool_basename", so it can be a program name with args.
41694 set dummy $tool_basename; ac_word=$2
41695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41696 $as_echo_n "checking for $ac_word... " >&6; }
41697 if ${ac_cv_path_NM+:} false; then :
41698   $as_echo_n "(cached) " >&6
41699 else
41700   case $NM in
41701   [\\/]* | ?:[\\/]*)
41702   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41703   ;;
41704   *)
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_path_NM="$as_dir/$ac_word$ac_exec_ext"
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   ;;
41721 esac
41722 fi
41723 NM=$ac_cv_path_NM
41724 if test -n "$NM"; then
41725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41726 $as_echo "$NM" >&6; }
41727 else
41728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41729 $as_echo "no" >&6; }
41730 fi
41731 
41732 
41733           if test "x$NM" = x; then
41734             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41735           fi
41736         else
41737           # Otherwise we believe it is a complete path. Use it as it is.
41738           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41739 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41740           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41741 $as_echo_n "checking for NM... " >&6; }
41742           if test ! -x "$tool_specified"; then
41743             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41744 $as_echo "not found" >&6; }
41745             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41746           fi
41747           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41748 $as_echo "$tool_specified" >&6; }
41749         fi
41750       fi
41751     fi
41752 
41753   fi
41754 
41755 
41756     fi
41757 
41758   # Only process if variable expands to non-empty
41759 
41760   if test "x$NM" != x; then
41761     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41762 
41763   # First separate the path from the arguments. This will split at the first
41764   # space.
41765   complete="$NM"
41766   path="${complete%% *}"
41767   tmp="$complete EOL"
41768   arguments="${tmp#* }"
41769 
41770   # Input might be given as Windows format, start by converting to
41771   # unix format.
41772   new_path=`$CYGPATH -u "$path"`
41773 
41774   # Now try to locate executable using which
41775   new_path=`$WHICH "$new_path" 2> /dev/null`
41776   # bat and cmd files are not always considered executable in cygwin causing which
41777   # to not find them
41778   if test "x$new_path" = x \
41779       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41780       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41781     new_path=`$CYGPATH -u "$path"`
41782   fi
41783   if test "x$new_path" = x; then
41784     # Oops. Which didn't find the executable.
41785     # The splitting of arguments from the executable at a space might have been incorrect,
41786     # since paths with space are more likely in Windows. Give it another try with the whole
41787     # argument.
41788     path="$complete"
41789     arguments="EOL"
41790     new_path=`$CYGPATH -u "$path"`
41791     new_path=`$WHICH "$new_path" 2> /dev/null`
41792     # bat and cmd files are not always considered executable in cygwin causing which
41793     # to not find them
41794     if test "x$new_path" = x \
41795         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41796         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41797       new_path=`$CYGPATH -u "$path"`
41798     fi
41799     if test "x$new_path" = x; then
41800       # It's still not found. Now this is an unrecoverable error.
41801       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41802 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41803       has_space=`$ECHO "$complete" | $GREP " "`
41804       if test "x$has_space" != x; then
41805         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41806 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41807       fi
41808       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41809     fi
41810   fi
41811 
41812   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41813   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41814   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41815   # "foo.exe" is OK but "foo" is an error.
41816   #
41817   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41818   # It is also a way to make sure we got the proper file name for the real test later on.
41819   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41820   if test "x$test_shortpath" = x; then
41821     # Short path failed, file does not exist as specified.
41822     # Try adding .exe or .cmd
41823     if test -f "${new_path}.exe"; then
41824       input_to_shortpath="${new_path}.exe"
41825     elif test -f "${new_path}.cmd"; then
41826       input_to_shortpath="${new_path}.cmd"
41827     else
41828       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41829 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41830       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41831 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41832       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41833     fi
41834   else
41835     input_to_shortpath="$new_path"
41836   fi
41837 
41838   # Call helper function which possibly converts this using DOS-style short mode.
41839   # If so, the updated path is stored in $new_path.
41840   new_path="$input_to_shortpath"
41841 
41842   input_path="$input_to_shortpath"
41843   # Check if we need to convert this using DOS-style short mode. If the path
41844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41845   # take no chances and rewrite it.
41846   # Note: m4 eats our [], so we need to use [ and ] instead.
41847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41848   if test "x$has_forbidden_chars" != x; then
41849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41850     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41851     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41852     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41853       # Going to short mode and back again did indeed matter. Since short mode is
41854       # case insensitive, let's make it lowercase to improve readability.
41855       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41856       # Now convert it back to Unix-style (cygpath)
41857       input_path=`$CYGPATH -u "$shortmode_path"`
41858       new_path="$input_path"
41859     fi
41860   fi
41861 
41862   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41863   if test "x$test_cygdrive_prefix" = x; then
41864     # As a simple fix, exclude /usr/bin since it's not a real path.
41865     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41866       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41867       # a path prefixed by /cygdrive for fixpath to work.
41868       new_path="$CYGWIN_ROOT_PATH$input_path"
41869     fi
41870   fi
41871 
41872   # remove trailing .exe if any
41873   new_path="${new_path/%.exe/}"
41874 
41875     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41876 
41877   # First separate the path from the arguments. This will split at the first
41878   # space.
41879   complete="$NM"
41880   path="${complete%% *}"
41881   tmp="$complete EOL"
41882   arguments="${tmp#* }"
41883 
41884   # Input might be given as Windows format, start by converting to
41885   # unix format.
41886   new_path="$path"
41887 
41888   windows_path="$new_path"
41889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41890     unix_path=`$CYGPATH -u "$windows_path"`
41891     new_path="$unix_path"
41892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41894     new_path="$unix_path"
41895   fi
41896 
41897 
41898   # Now try to locate executable using which
41899   new_path=`$WHICH "$new_path" 2> /dev/null`
41900 
41901   if test "x$new_path" = x; then
41902     # Oops. Which didn't find the executable.
41903     # The splitting of arguments from the executable at a space might have been incorrect,
41904     # since paths with space are more likely in Windows. Give it another try with the whole
41905     # argument.
41906     path="$complete"
41907     arguments="EOL"
41908     new_path="$path"
41909 
41910   windows_path="$new_path"
41911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41912     unix_path=`$CYGPATH -u "$windows_path"`
41913     new_path="$unix_path"
41914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41916     new_path="$unix_path"
41917   fi
41918 
41919 
41920     new_path=`$WHICH "$new_path" 2> /dev/null`
41921     # bat and cmd files are not always considered executable in MSYS causing which
41922     # to not find them
41923     if test "x$new_path" = x \
41924         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41925         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41926       new_path="$path"
41927 
41928   windows_path="$new_path"
41929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41930     unix_path=`$CYGPATH -u "$windows_path"`
41931     new_path="$unix_path"
41932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41934     new_path="$unix_path"
41935   fi
41936 
41937     fi
41938 
41939     if test "x$new_path" = x; then
41940       # It's still not found. Now this is an unrecoverable error.
41941       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41942 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41943       has_space=`$ECHO "$complete" | $GREP " "`
41944       if test "x$has_space" != x; then
41945         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41946 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41947       fi
41948       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41949     fi
41950   fi
41951 
41952   # Now new_path has a complete unix path to the binary
41953   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41954     # Keep paths in /bin as-is, but remove trailing .exe if any
41955     new_path="${new_path/%.exe/}"
41956     # Do not save /bin paths to all_fixpath_prefixes!
41957   else
41958     # Not in mixed or Windows style, start by that.
41959     new_path=`cmd //c echo $new_path`
41960 
41961   input_path="$new_path"
41962   # Check if we need to convert this using DOS-style short mode. If the path
41963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41964   # take no chances and rewrite it.
41965   # Note: m4 eats our [], so we need to use [ and ] instead.
41966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41967   if test "x$has_forbidden_chars" != x; then
41968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41970   fi
41971 
41972     # Output is in $new_path
41973 
41974   windows_path="$new_path"
41975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41976     unix_path=`$CYGPATH -u "$windows_path"`
41977     new_path="$unix_path"
41978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41980     new_path="$unix_path"
41981   fi
41982 
41983     # remove trailing .exe if any
41984     new_path="${new_path/%.exe/}"
41985 
41986     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41987     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41988   fi
41989 
41990     else
41991       # We're on a unix platform. Hooray! :)
41992       # First separate the path from the arguments. This will split at the first
41993       # space.
41994       complete="$NM"
41995       path="${complete%% *}"
41996       tmp="$complete EOL"
41997       arguments="${tmp#* }"
41998 
41999       # Cannot rely on the command "which" here since it doesn't always work.
42000       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42001       if test -z "$is_absolute_path"; then
42002         # Path to executable is not absolute. Find it.
42003         IFS_save="$IFS"
42004         IFS=:
42005         for p in $PATH; do
42006           if test -f "$p/$path" && test -x "$p/$path"; then
42007             new_path="$p/$path"
42008             break
42009           fi
42010         done
42011         IFS="$IFS_save"
42012       else
42013         # This is an absolute path, we can use it without further modifications.
42014         new_path="$path"
42015       fi
42016 
42017       if test "x$new_path" = x; then
42018         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42019 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42020         has_space=`$ECHO "$complete" | $GREP " "`
42021         if test "x$has_space" != x; then
42022           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42023 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42024         fi
42025         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42026       fi
42027     fi
42028 
42029     # Now join together the path and the arguments once again
42030     if test "x$arguments" != xEOL; then
42031       new_complete="$new_path ${arguments% *}"
42032     else
42033       new_complete="$new_path"
42034     fi
42035 
42036     if test "x$complete" != "x$new_complete"; then
42037       NM="$new_complete"
42038       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42039 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42040     fi
42041   fi
42042 
42043     GNM="$NM"
42044 
42045   fi
42046 
42047   # objcopy is used for moving debug symbols to separate files when
42048   # full debug symbols are enabled.
42049   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42050 
42051 
42052   # Publish this variable in the help.
42053 
42054 
42055   if [ -z "${OBJCOPY+x}" ]; then
42056     # The variable is not set by user, try to locate tool using the code snippet
42057     if test -n "$ac_tool_prefix"; then
42058   for ac_prog in gobjcopy objcopy
42059   do
42060     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42061 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42063 $as_echo_n "checking for $ac_word... " >&6; }
42064 if ${ac_cv_prog_OBJCOPY+:} false; then :
42065   $as_echo_n "(cached) " >&6
42066 else
42067   if test -n "$OBJCOPY"; then
42068   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42069 else
42070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42071 for as_dir in $PATH
42072 do
42073   IFS=$as_save_IFS
42074   test -z "$as_dir" && as_dir=.
42075     for ac_exec_ext in '' $ac_executable_extensions; do
42076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42077     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42079     break 2
42080   fi
42081 done
42082   done
42083 IFS=$as_save_IFS
42084 
42085 fi
42086 fi
42087 OBJCOPY=$ac_cv_prog_OBJCOPY
42088 if test -n "$OBJCOPY"; then
42089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42090 $as_echo "$OBJCOPY" >&6; }
42091 else
42092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42093 $as_echo "no" >&6; }
42094 fi
42095 
42096 
42097     test -n "$OBJCOPY" && break
42098   done
42099 fi
42100 if test -z "$OBJCOPY"; then
42101   ac_ct_OBJCOPY=$OBJCOPY
42102   for ac_prog in gobjcopy objcopy
42103 do
42104   # Extract the first word of "$ac_prog", so it can be a program name with args.
42105 set dummy $ac_prog; ac_word=$2
42106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42107 $as_echo_n "checking for $ac_word... " >&6; }
42108 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42109   $as_echo_n "(cached) " >&6
42110 else
42111   if test -n "$ac_ct_OBJCOPY"; then
42112   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42113 else
42114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42115 for as_dir in $PATH
42116 do
42117   IFS=$as_save_IFS
42118   test -z "$as_dir" && as_dir=.
42119     for ac_exec_ext in '' $ac_executable_extensions; do
42120   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42121     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42122     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42123     break 2
42124   fi
42125 done
42126   done
42127 IFS=$as_save_IFS
42128 
42129 fi
42130 fi
42131 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42132 if test -n "$ac_ct_OBJCOPY"; then
42133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42134 $as_echo "$ac_ct_OBJCOPY" >&6; }
42135 else
42136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42137 $as_echo "no" >&6; }
42138 fi
42139 
42140 
42141   test -n "$ac_ct_OBJCOPY" && break
42142 done
42143 
42144   if test "x$ac_ct_OBJCOPY" = x; then
42145     OBJCOPY=""
42146   else
42147     case $cross_compiling:$ac_tool_warned in
42148 yes:)
42149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42150 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42151 ac_tool_warned=yes ;;
42152 esac
42153     OBJCOPY=$ac_ct_OBJCOPY
42154   fi
42155 fi
42156 
42157   else
42158     # The variable is set, but is it from the command line or the environment?
42159 
42160     # Try to remove the string !OBJCOPY! from our list.
42161     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42162     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42163       # If it failed, the variable was not from the command line. Ignore it,
42164       # but warn the user (except for BASH, which is always set by the calling BASH).
42165       if test "xOBJCOPY" != xBASH; then
42166         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42167 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42168       fi
42169       # Try to locate tool using the code snippet
42170       if test -n "$ac_tool_prefix"; then
42171   for ac_prog in gobjcopy objcopy
42172   do
42173     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42174 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42176 $as_echo_n "checking for $ac_word... " >&6; }
42177 if ${ac_cv_prog_OBJCOPY+:} false; then :
42178   $as_echo_n "(cached) " >&6
42179 else
42180   if test -n "$OBJCOPY"; then
42181   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42182 else
42183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42184 for as_dir in $PATH
42185 do
42186   IFS=$as_save_IFS
42187   test -z "$as_dir" && as_dir=.
42188     for ac_exec_ext in '' $ac_executable_extensions; do
42189   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42190     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42192     break 2
42193   fi
42194 done
42195   done
42196 IFS=$as_save_IFS
42197 
42198 fi
42199 fi
42200 OBJCOPY=$ac_cv_prog_OBJCOPY
42201 if test -n "$OBJCOPY"; then
42202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42203 $as_echo "$OBJCOPY" >&6; }
42204 else
42205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42206 $as_echo "no" >&6; }
42207 fi
42208 
42209 
42210     test -n "$OBJCOPY" && break
42211   done
42212 fi
42213 if test -z "$OBJCOPY"; then
42214   ac_ct_OBJCOPY=$OBJCOPY
42215   for ac_prog in gobjcopy objcopy
42216 do
42217   # Extract the first word of "$ac_prog", so it can be a program name with args.
42218 set dummy $ac_prog; ac_word=$2
42219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42220 $as_echo_n "checking for $ac_word... " >&6; }
42221 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42222   $as_echo_n "(cached) " >&6
42223 else
42224   if test -n "$ac_ct_OBJCOPY"; then
42225   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42226 else
42227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42228 for as_dir in $PATH
42229 do
42230   IFS=$as_save_IFS
42231   test -z "$as_dir" && as_dir=.
42232     for ac_exec_ext in '' $ac_executable_extensions; do
42233   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42234     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42235     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42236     break 2
42237   fi
42238 done
42239   done
42240 IFS=$as_save_IFS
42241 
42242 fi
42243 fi
42244 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42245 if test -n "$ac_ct_OBJCOPY"; then
42246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42247 $as_echo "$ac_ct_OBJCOPY" >&6; }
42248 else
42249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42250 $as_echo "no" >&6; }
42251 fi
42252 
42253 
42254   test -n "$ac_ct_OBJCOPY" && break
42255 done
42256 
42257   if test "x$ac_ct_OBJCOPY" = x; then
42258     OBJCOPY=""
42259   else
42260     case $cross_compiling:$ac_tool_warned in
42261 yes:)
42262 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42263 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42264 ac_tool_warned=yes ;;
42265 esac
42266     OBJCOPY=$ac_ct_OBJCOPY
42267   fi
42268 fi
42269 
42270     else
42271       # If it succeeded, then it was overridden by the user. We will use it
42272       # for the tool.
42273 
42274       # First remove it from the list of overridden variables, so we can test
42275       # for unknown variables in the end.
42276       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42277 
42278       # Check if we try to supply an empty value
42279       if test "x$OBJCOPY" = x; then
42280         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42281 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42282         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42283 $as_echo_n "checking for OBJCOPY... " >&6; }
42284         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42285 $as_echo "disabled" >&6; }
42286       else
42287         # Check if the provided tool contains a complete path.
42288         tool_specified="$OBJCOPY"
42289         tool_basename="${tool_specified##*/}"
42290         if test "x$tool_basename" = "x$tool_specified"; then
42291           # A command without a complete path is provided, search $PATH.
42292           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42293 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42294           # Extract the first word of "$tool_basename", so it can be a program name with args.
42295 set dummy $tool_basename; ac_word=$2
42296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42297 $as_echo_n "checking for $ac_word... " >&6; }
42298 if ${ac_cv_path_OBJCOPY+:} false; then :
42299   $as_echo_n "(cached) " >&6
42300 else
42301   case $OBJCOPY in
42302   [\\/]* | ?:[\\/]*)
42303   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42304   ;;
42305   *)
42306   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42307 for as_dir in $PATH
42308 do
42309   IFS=$as_save_IFS
42310   test -z "$as_dir" && as_dir=.
42311     for ac_exec_ext in '' $ac_executable_extensions; do
42312   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42313     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42315     break 2
42316   fi
42317 done
42318   done
42319 IFS=$as_save_IFS
42320 
42321   ;;
42322 esac
42323 fi
42324 OBJCOPY=$ac_cv_path_OBJCOPY
42325 if test -n "$OBJCOPY"; then
42326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42327 $as_echo "$OBJCOPY" >&6; }
42328 else
42329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42330 $as_echo "no" >&6; }
42331 fi
42332 
42333 
42334           if test "x$OBJCOPY" = x; then
42335             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42336           fi
42337         else
42338           # Otherwise we believe it is a complete path. Use it as it is.
42339           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42340 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42341           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42342 $as_echo_n "checking for OBJCOPY... " >&6; }
42343           if test ! -x "$tool_specified"; then
42344             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42345 $as_echo "not found" >&6; }
42346             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42347           fi
42348           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42349 $as_echo "$tool_specified" >&6; }
42350         fi
42351       fi
42352     fi
42353 
42354   fi
42355 
42356 
42357     # Only call fixup if objcopy was found.
42358     if test -n "$OBJCOPY"; then
42359 
42360   # Only process if variable expands to non-empty
42361 
42362   if test "x$OBJCOPY" != x; then
42363     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42364 
42365   # First separate the path from the arguments. This will split at the first
42366   # space.
42367   complete="$OBJCOPY"
42368   path="${complete%% *}"
42369   tmp="$complete EOL"
42370   arguments="${tmp#* }"
42371 
42372   # Input might be given as Windows format, start by converting to
42373   # unix format.
42374   new_path=`$CYGPATH -u "$path"`
42375 
42376   # Now try to locate executable using which
42377   new_path=`$WHICH "$new_path" 2> /dev/null`
42378   # bat and cmd files are not always considered executable in cygwin causing which
42379   # to not find them
42380   if test "x$new_path" = x \
42381       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42382       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42383     new_path=`$CYGPATH -u "$path"`
42384   fi
42385   if test "x$new_path" = x; then
42386     # Oops. Which didn't find the executable.
42387     # The splitting of arguments from the executable at a space might have been incorrect,
42388     # since paths with space are more likely in Windows. Give it another try with the whole
42389     # argument.
42390     path="$complete"
42391     arguments="EOL"
42392     new_path=`$CYGPATH -u "$path"`
42393     new_path=`$WHICH "$new_path" 2> /dev/null`
42394     # bat and cmd files are not always considered executable in cygwin causing which
42395     # to not find them
42396     if test "x$new_path" = x \
42397         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42398         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42399       new_path=`$CYGPATH -u "$path"`
42400     fi
42401     if test "x$new_path" = x; then
42402       # It's still not found. Now this is an unrecoverable error.
42403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42404 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42405       has_space=`$ECHO "$complete" | $GREP " "`
42406       if test "x$has_space" != x; then
42407         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42408 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42409       fi
42410       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42411     fi
42412   fi
42413 
42414   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42415   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42416   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42417   # "foo.exe" is OK but "foo" is an error.
42418   #
42419   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42420   # It is also a way to make sure we got the proper file name for the real test later on.
42421   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42422   if test "x$test_shortpath" = x; then
42423     # Short path failed, file does not exist as specified.
42424     # Try adding .exe or .cmd
42425     if test -f "${new_path}.exe"; then
42426       input_to_shortpath="${new_path}.exe"
42427     elif test -f "${new_path}.cmd"; then
42428       input_to_shortpath="${new_path}.cmd"
42429     else
42430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42431 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42432       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42433 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42434       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42435     fi
42436   else
42437     input_to_shortpath="$new_path"
42438   fi
42439 
42440   # Call helper function which possibly converts this using DOS-style short mode.
42441   # If so, the updated path is stored in $new_path.
42442   new_path="$input_to_shortpath"
42443 
42444   input_path="$input_to_shortpath"
42445   # Check if we need to convert this using DOS-style short mode. If the path
42446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42447   # take no chances and rewrite it.
42448   # Note: m4 eats our [], so we need to use [ and ] instead.
42449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42450   if test "x$has_forbidden_chars" != x; then
42451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42455       # Going to short mode and back again did indeed matter. Since short mode is
42456       # case insensitive, let's make it lowercase to improve readability.
42457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42458       # Now convert it back to Unix-style (cygpath)
42459       input_path=`$CYGPATH -u "$shortmode_path"`
42460       new_path="$input_path"
42461     fi
42462   fi
42463 
42464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42465   if test "x$test_cygdrive_prefix" = x; then
42466     # As a simple fix, exclude /usr/bin since it's not a real path.
42467     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42469       # a path prefixed by /cygdrive for fixpath to work.
42470       new_path="$CYGWIN_ROOT_PATH$input_path"
42471     fi
42472   fi
42473 
42474   # remove trailing .exe if any
42475   new_path="${new_path/%.exe/}"
42476 
42477     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42478 
42479   # First separate the path from the arguments. This will split at the first
42480   # space.
42481   complete="$OBJCOPY"
42482   path="${complete%% *}"
42483   tmp="$complete EOL"
42484   arguments="${tmp#* }"
42485 
42486   # Input might be given as Windows format, start by converting to
42487   # unix format.
42488   new_path="$path"
42489 
42490   windows_path="$new_path"
42491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42492     unix_path=`$CYGPATH -u "$windows_path"`
42493     new_path="$unix_path"
42494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42496     new_path="$unix_path"
42497   fi
42498 
42499 
42500   # Now try to locate executable using which
42501   new_path=`$WHICH "$new_path" 2> /dev/null`
42502 
42503   if test "x$new_path" = x; then
42504     # Oops. Which didn't find the executable.
42505     # The splitting of arguments from the executable at a space might have been incorrect,
42506     # since paths with space are more likely in Windows. Give it another try with the whole
42507     # argument.
42508     path="$complete"
42509     arguments="EOL"
42510     new_path="$path"
42511 
42512   windows_path="$new_path"
42513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42514     unix_path=`$CYGPATH -u "$windows_path"`
42515     new_path="$unix_path"
42516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42518     new_path="$unix_path"
42519   fi
42520 
42521 
42522     new_path=`$WHICH "$new_path" 2> /dev/null`
42523     # bat and cmd files are not always considered executable in MSYS causing which
42524     # to not find them
42525     if test "x$new_path" = x \
42526         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42527         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42528       new_path="$path"
42529 
42530   windows_path="$new_path"
42531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42532     unix_path=`$CYGPATH -u "$windows_path"`
42533     new_path="$unix_path"
42534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42536     new_path="$unix_path"
42537   fi
42538 
42539     fi
42540 
42541     if test "x$new_path" = x; then
42542       # It's still not found. Now this is an unrecoverable error.
42543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42544 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42545       has_space=`$ECHO "$complete" | $GREP " "`
42546       if test "x$has_space" != x; then
42547         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42548 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42549       fi
42550       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42551     fi
42552   fi
42553 
42554   # Now new_path has a complete unix path to the binary
42555   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42556     # Keep paths in /bin as-is, but remove trailing .exe if any
42557     new_path="${new_path/%.exe/}"
42558     # Do not save /bin paths to all_fixpath_prefixes!
42559   else
42560     # Not in mixed or Windows style, start by that.
42561     new_path=`cmd //c echo $new_path`
42562 
42563   input_path="$new_path"
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42572   fi
42573 
42574     # Output is in $new_path
42575 
42576   windows_path="$new_path"
42577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42578     unix_path=`$CYGPATH -u "$windows_path"`
42579     new_path="$unix_path"
42580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42582     new_path="$unix_path"
42583   fi
42584 
42585     # remove trailing .exe if any
42586     new_path="${new_path/%.exe/}"
42587 
42588     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42589     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42590   fi
42591 
42592     else
42593       # We're on a unix platform. Hooray! :)
42594       # First separate the path from the arguments. This will split at the first
42595       # space.
42596       complete="$OBJCOPY"
42597       path="${complete%% *}"
42598       tmp="$complete EOL"
42599       arguments="${tmp#* }"
42600 
42601       # Cannot rely on the command "which" here since it doesn't always work.
42602       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42603       if test -z "$is_absolute_path"; then
42604         # Path to executable is not absolute. Find it.
42605         IFS_save="$IFS"
42606         IFS=:
42607         for p in $PATH; do
42608           if test -f "$p/$path" && test -x "$p/$path"; then
42609             new_path="$p/$path"
42610             break
42611           fi
42612         done
42613         IFS="$IFS_save"
42614       else
42615         # This is an absolute path, we can use it without further modifications.
42616         new_path="$path"
42617       fi
42618 
42619       if test "x$new_path" = x; then
42620         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42621 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42622         has_space=`$ECHO "$complete" | $GREP " "`
42623         if test "x$has_space" != x; then
42624           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42625 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42626         fi
42627         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42628       fi
42629     fi
42630 
42631     # Now join together the path and the arguments once again
42632     if test "x$arguments" != xEOL; then
42633       new_complete="$new_path ${arguments% *}"
42634     else
42635       new_complete="$new_path"
42636     fi
42637 
42638     if test "x$complete" != "x$new_complete"; then
42639       OBJCOPY="$new_complete"
42640       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42641 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42642     fi
42643   fi
42644 
42645       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42646         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42647         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42648         # - version number is last blank separate word on first line
42649         # - version number formats that have been seen:
42650         #   - <major>.<minor>
42651         #   - <major>.<minor>.<micro>
42652         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42653         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42654          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42655               -e 's/.* //' \
42656               -e '/^[01]\./b bad' \
42657               -e '/^2\./{' \
42658               -e '  s/^2\.//' \
42659               -e '  /^[0-9]$/b bad' \
42660               -e '  /^[0-9]\./b bad' \
42661               -e '  /^1[0-9]$/b bad' \
42662               -e '  /^1[0-9]\./b bad' \
42663               -e '  /^20\./b bad' \
42664               -e '  /^21\.0$/b bad' \
42665               -e '  /^21\.0\./b bad' \
42666               -e '}' \
42667               -e ':good' \
42668               -e 's/.*/VALID_VERSION/p' \
42669               -e 'q' \
42670               -e ':bad' \
42671               -e 's/.*/BAD_VERSION/p' \
42672               -e 'q'`
42673         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42674           OBJCOPY=
42675           { $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
42676 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42677           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42678 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42679           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42680 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42681           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42682 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42683           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42684 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42685         fi
42686       fi
42687     fi
42688   fi
42689 
42690 
42691 
42692   # Publish this variable in the help.
42693 
42694 
42695   if [ -z "${OBJDUMP+x}" ]; then
42696     # The variable is not set by user, try to locate tool using the code snippet
42697     if test -n "$ac_tool_prefix"; then
42698   for ac_prog in gobjdump objdump
42699   do
42700     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42701 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42703 $as_echo_n "checking for $ac_word... " >&6; }
42704 if ${ac_cv_prog_OBJDUMP+:} false; then :
42705   $as_echo_n "(cached) " >&6
42706 else
42707   if test -n "$OBJDUMP"; then
42708   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42709 else
42710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42711 for as_dir in $PATH
42712 do
42713   IFS=$as_save_IFS
42714   test -z "$as_dir" && as_dir=.
42715     for ac_exec_ext in '' $ac_executable_extensions; do
42716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42717     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42719     break 2
42720   fi
42721 done
42722   done
42723 IFS=$as_save_IFS
42724 
42725 fi
42726 fi
42727 OBJDUMP=$ac_cv_prog_OBJDUMP
42728 if test -n "$OBJDUMP"; then
42729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42730 $as_echo "$OBJDUMP" >&6; }
42731 else
42732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42733 $as_echo "no" >&6; }
42734 fi
42735 
42736 
42737     test -n "$OBJDUMP" && break
42738   done
42739 fi
42740 if test -z "$OBJDUMP"; then
42741   ac_ct_OBJDUMP=$OBJDUMP
42742   for ac_prog in gobjdump objdump
42743 do
42744   # Extract the first word of "$ac_prog", so it can be a program name with args.
42745 set dummy $ac_prog; ac_word=$2
42746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42747 $as_echo_n "checking for $ac_word... " >&6; }
42748 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42749   $as_echo_n "(cached) " >&6
42750 else
42751   if test -n "$ac_ct_OBJDUMP"; then
42752   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42753 else
42754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42755 for as_dir in $PATH
42756 do
42757   IFS=$as_save_IFS
42758   test -z "$as_dir" && as_dir=.
42759     for ac_exec_ext in '' $ac_executable_extensions; do
42760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42761     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42763     break 2
42764   fi
42765 done
42766   done
42767 IFS=$as_save_IFS
42768 
42769 fi
42770 fi
42771 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42772 if test -n "$ac_ct_OBJDUMP"; then
42773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42774 $as_echo "$ac_ct_OBJDUMP" >&6; }
42775 else
42776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42777 $as_echo "no" >&6; }
42778 fi
42779 
42780 
42781   test -n "$ac_ct_OBJDUMP" && break
42782 done
42783 
42784   if test "x$ac_ct_OBJDUMP" = x; then
42785     OBJDUMP=""
42786   else
42787     case $cross_compiling:$ac_tool_warned in
42788 yes:)
42789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42790 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42791 ac_tool_warned=yes ;;
42792 esac
42793     OBJDUMP=$ac_ct_OBJDUMP
42794   fi
42795 fi
42796 
42797   else
42798     # The variable is set, but is it from the command line or the environment?
42799 
42800     # Try to remove the string !OBJDUMP! from our list.
42801     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42802     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42803       # If it failed, the variable was not from the command line. Ignore it,
42804       # but warn the user (except for BASH, which is always set by the calling BASH).
42805       if test "xOBJDUMP" != xBASH; then
42806         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42807 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42808       fi
42809       # Try to locate tool using the code snippet
42810       if test -n "$ac_tool_prefix"; then
42811   for ac_prog in gobjdump objdump
42812   do
42813     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42814 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42816 $as_echo_n "checking for $ac_word... " >&6; }
42817 if ${ac_cv_prog_OBJDUMP+:} false; then :
42818   $as_echo_n "(cached) " >&6
42819 else
42820   if test -n "$OBJDUMP"; then
42821   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42822 else
42823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42824 for as_dir in $PATH
42825 do
42826   IFS=$as_save_IFS
42827   test -z "$as_dir" && as_dir=.
42828     for ac_exec_ext in '' $ac_executable_extensions; do
42829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42830     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42832     break 2
42833   fi
42834 done
42835   done
42836 IFS=$as_save_IFS
42837 
42838 fi
42839 fi
42840 OBJDUMP=$ac_cv_prog_OBJDUMP
42841 if test -n "$OBJDUMP"; then
42842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42843 $as_echo "$OBJDUMP" >&6; }
42844 else
42845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42846 $as_echo "no" >&6; }
42847 fi
42848 
42849 
42850     test -n "$OBJDUMP" && break
42851   done
42852 fi
42853 if test -z "$OBJDUMP"; then
42854   ac_ct_OBJDUMP=$OBJDUMP
42855   for ac_prog in gobjdump objdump
42856 do
42857   # Extract the first word of "$ac_prog", so it can be a program name with args.
42858 set dummy $ac_prog; ac_word=$2
42859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42860 $as_echo_n "checking for $ac_word... " >&6; }
42861 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42862   $as_echo_n "(cached) " >&6
42863 else
42864   if test -n "$ac_ct_OBJDUMP"; then
42865   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42866 else
42867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42868 for as_dir in $PATH
42869 do
42870   IFS=$as_save_IFS
42871   test -z "$as_dir" && as_dir=.
42872     for ac_exec_ext in '' $ac_executable_extensions; do
42873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42874     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42876     break 2
42877   fi
42878 done
42879   done
42880 IFS=$as_save_IFS
42881 
42882 fi
42883 fi
42884 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42885 if test -n "$ac_ct_OBJDUMP"; then
42886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42887 $as_echo "$ac_ct_OBJDUMP" >&6; }
42888 else
42889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42890 $as_echo "no" >&6; }
42891 fi
42892 
42893 
42894   test -n "$ac_ct_OBJDUMP" && break
42895 done
42896 
42897   if test "x$ac_ct_OBJDUMP" = x; then
42898     OBJDUMP=""
42899   else
42900     case $cross_compiling:$ac_tool_warned in
42901 yes:)
42902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42903 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42904 ac_tool_warned=yes ;;
42905 esac
42906     OBJDUMP=$ac_ct_OBJDUMP
42907   fi
42908 fi
42909 
42910     else
42911       # If it succeeded, then it was overridden by the user. We will use it
42912       # for the tool.
42913 
42914       # First remove it from the list of overridden variables, so we can test
42915       # for unknown variables in the end.
42916       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42917 
42918       # Check if we try to supply an empty value
42919       if test "x$OBJDUMP" = x; then
42920         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42921 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42922         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42923 $as_echo_n "checking for OBJDUMP... " >&6; }
42924         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42925 $as_echo "disabled" >&6; }
42926       else
42927         # Check if the provided tool contains a complete path.
42928         tool_specified="$OBJDUMP"
42929         tool_basename="${tool_specified##*/}"
42930         if test "x$tool_basename" = "x$tool_specified"; then
42931           # A command without a complete path is provided, search $PATH.
42932           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42933 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42934           # Extract the first word of "$tool_basename", so it can be a program name with args.
42935 set dummy $tool_basename; ac_word=$2
42936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42937 $as_echo_n "checking for $ac_word... " >&6; }
42938 if ${ac_cv_path_OBJDUMP+:} false; then :
42939   $as_echo_n "(cached) " >&6
42940 else
42941   case $OBJDUMP in
42942   [\\/]* | ?:[\\/]*)
42943   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42944   ;;
42945   *)
42946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42947 for as_dir in $PATH
42948 do
42949   IFS=$as_save_IFS
42950   test -z "$as_dir" && as_dir=.
42951     for ac_exec_ext in '' $ac_executable_extensions; do
42952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42953     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42955     break 2
42956   fi
42957 done
42958   done
42959 IFS=$as_save_IFS
42960 
42961   ;;
42962 esac
42963 fi
42964 OBJDUMP=$ac_cv_path_OBJDUMP
42965 if test -n "$OBJDUMP"; then
42966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42967 $as_echo "$OBJDUMP" >&6; }
42968 else
42969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42970 $as_echo "no" >&6; }
42971 fi
42972 
42973 
42974           if test "x$OBJDUMP" = x; then
42975             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42976           fi
42977         else
42978           # Otherwise we believe it is a complete path. Use it as it is.
42979           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42980 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42981           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42982 $as_echo_n "checking for OBJDUMP... " >&6; }
42983           if test ! -x "$tool_specified"; then
42984             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42985 $as_echo "not found" >&6; }
42986             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42987           fi
42988           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42989 $as_echo "$tool_specified" >&6; }
42990         fi
42991       fi
42992     fi
42993 
42994   fi
42995 
42996 
42997   if test "x$OBJDUMP" != x; then
42998     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42999     # bails if argument is missing.
43000 
43001   # Only process if variable expands to non-empty
43002 
43003   if test "x$OBJDUMP" != x; then
43004     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43005 
43006   # First separate the path from the arguments. This will split at the first
43007   # space.
43008   complete="$OBJDUMP"
43009   path="${complete%% *}"
43010   tmp="$complete EOL"
43011   arguments="${tmp#* }"
43012 
43013   # Input might be given as Windows format, start by converting to
43014   # unix format.
43015   new_path=`$CYGPATH -u "$path"`
43016 
43017   # Now try to locate executable using which
43018   new_path=`$WHICH "$new_path" 2> /dev/null`
43019   # bat and cmd files are not always considered executable in cygwin causing which
43020   # to not find them
43021   if test "x$new_path" = x \
43022       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43023       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43024     new_path=`$CYGPATH -u "$path"`
43025   fi
43026   if test "x$new_path" = x; then
43027     # Oops. Which didn't find the executable.
43028     # The splitting of arguments from the executable at a space might have been incorrect,
43029     # since paths with space are more likely in Windows. Give it another try with the whole
43030     # argument.
43031     path="$complete"
43032     arguments="EOL"
43033     new_path=`$CYGPATH -u "$path"`
43034     new_path=`$WHICH "$new_path" 2> /dev/null`
43035     # bat and cmd files are not always considered executable in cygwin causing which
43036     # to not find them
43037     if test "x$new_path" = x \
43038         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43039         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43040       new_path=`$CYGPATH -u "$path"`
43041     fi
43042     if test "x$new_path" = x; then
43043       # It's still not found. Now this is an unrecoverable error.
43044       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43045 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43046       has_space=`$ECHO "$complete" | $GREP " "`
43047       if test "x$has_space" != x; then
43048         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43049 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43050       fi
43051       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43052     fi
43053   fi
43054 
43055   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43056   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43057   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43058   # "foo.exe" is OK but "foo" is an error.
43059   #
43060   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43061   # It is also a way to make sure we got the proper file name for the real test later on.
43062   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43063   if test "x$test_shortpath" = x; then
43064     # Short path failed, file does not exist as specified.
43065     # Try adding .exe or .cmd
43066     if test -f "${new_path}.exe"; then
43067       input_to_shortpath="${new_path}.exe"
43068     elif test -f "${new_path}.cmd"; then
43069       input_to_shortpath="${new_path}.cmd"
43070     else
43071       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43072 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43073       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43074 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43075       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43076     fi
43077   else
43078     input_to_shortpath="$new_path"
43079   fi
43080 
43081   # Call helper function which possibly converts this using DOS-style short mode.
43082   # If so, the updated path is stored in $new_path.
43083   new_path="$input_to_shortpath"
43084 
43085   input_path="$input_to_shortpath"
43086   # Check if we need to convert this using DOS-style short mode. If the path
43087   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43088   # take no chances and rewrite it.
43089   # Note: m4 eats our [], so we need to use [ and ] instead.
43090   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43091   if test "x$has_forbidden_chars" != x; then
43092     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43093     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43094     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43095     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43096       # Going to short mode and back again did indeed matter. Since short mode is
43097       # case insensitive, let's make it lowercase to improve readability.
43098       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43099       # Now convert it back to Unix-style (cygpath)
43100       input_path=`$CYGPATH -u "$shortmode_path"`
43101       new_path="$input_path"
43102     fi
43103   fi
43104 
43105   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43106   if test "x$test_cygdrive_prefix" = x; then
43107     # As a simple fix, exclude /usr/bin since it's not a real path.
43108     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43109       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43110       # a path prefixed by /cygdrive for fixpath to work.
43111       new_path="$CYGWIN_ROOT_PATH$input_path"
43112     fi
43113   fi
43114 
43115   # remove trailing .exe if any
43116   new_path="${new_path/%.exe/}"
43117 
43118     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43119 
43120   # First separate the path from the arguments. This will split at the first
43121   # space.
43122   complete="$OBJDUMP"
43123   path="${complete%% *}"
43124   tmp="$complete EOL"
43125   arguments="${tmp#* }"
43126 
43127   # Input might be given as Windows format, start by converting to
43128   # unix format.
43129   new_path="$path"
43130 
43131   windows_path="$new_path"
43132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43133     unix_path=`$CYGPATH -u "$windows_path"`
43134     new_path="$unix_path"
43135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43136     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43137     new_path="$unix_path"
43138   fi
43139 
43140 
43141   # Now try to locate executable using which
43142   new_path=`$WHICH "$new_path" 2> /dev/null`
43143 
43144   if test "x$new_path" = x; then
43145     # Oops. Which didn't find the executable.
43146     # The splitting of arguments from the executable at a space might have been incorrect,
43147     # since paths with space are more likely in Windows. Give it another try with the whole
43148     # argument.
43149     path="$complete"
43150     arguments="EOL"
43151     new_path="$path"
43152 
43153   windows_path="$new_path"
43154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43155     unix_path=`$CYGPATH -u "$windows_path"`
43156     new_path="$unix_path"
43157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43158     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43159     new_path="$unix_path"
43160   fi
43161 
43162 
43163     new_path=`$WHICH "$new_path" 2> /dev/null`
43164     # bat and cmd files are not always considered executable in MSYS causing which
43165     # to not find them
43166     if test "x$new_path" = x \
43167         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43168         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43169       new_path="$path"
43170 
43171   windows_path="$new_path"
43172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43173     unix_path=`$CYGPATH -u "$windows_path"`
43174     new_path="$unix_path"
43175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43177     new_path="$unix_path"
43178   fi
43179 
43180     fi
43181 
43182     if test "x$new_path" = x; then
43183       # It's still not found. Now this is an unrecoverable error.
43184       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43185 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43186       has_space=`$ECHO "$complete" | $GREP " "`
43187       if test "x$has_space" != x; then
43188         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43189 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43190       fi
43191       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43192     fi
43193   fi
43194 
43195   # Now new_path has a complete unix path to the binary
43196   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43197     # Keep paths in /bin as-is, but remove trailing .exe if any
43198     new_path="${new_path/%.exe/}"
43199     # Do not save /bin paths to all_fixpath_prefixes!
43200   else
43201     # Not in mixed or Windows style, start by that.
43202     new_path=`cmd //c echo $new_path`
43203 
43204   input_path="$new_path"
43205   # Check if we need to convert this using DOS-style short mode. If the path
43206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43207   # take no chances and rewrite it.
43208   # Note: m4 eats our [], so we need to use [ and ] instead.
43209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43210   if test "x$has_forbidden_chars" != x; then
43211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43212     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43213   fi
43214 
43215     # Output is in $new_path
43216 
43217   windows_path="$new_path"
43218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43219     unix_path=`$CYGPATH -u "$windows_path"`
43220     new_path="$unix_path"
43221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43223     new_path="$unix_path"
43224   fi
43225 
43226     # remove trailing .exe if any
43227     new_path="${new_path/%.exe/}"
43228 
43229     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43230     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43231   fi
43232 
43233     else
43234       # We're on a unix platform. Hooray! :)
43235       # First separate the path from the arguments. This will split at the first
43236       # space.
43237       complete="$OBJDUMP"
43238       path="${complete%% *}"
43239       tmp="$complete EOL"
43240       arguments="${tmp#* }"
43241 
43242       # Cannot rely on the command "which" here since it doesn't always work.
43243       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43244       if test -z "$is_absolute_path"; then
43245         # Path to executable is not absolute. Find it.
43246         IFS_save="$IFS"
43247         IFS=:
43248         for p in $PATH; do
43249           if test -f "$p/$path" && test -x "$p/$path"; then
43250             new_path="$p/$path"
43251             break
43252           fi
43253         done
43254         IFS="$IFS_save"
43255       else
43256         # This is an absolute path, we can use it without further modifications.
43257         new_path="$path"
43258       fi
43259 
43260       if test "x$new_path" = x; then
43261         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43262 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43263         has_space=`$ECHO "$complete" | $GREP " "`
43264         if test "x$has_space" != x; then
43265           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43266 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43267         fi
43268         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43269       fi
43270     fi
43271 
43272     # Now join together the path and the arguments once again
43273     if test "x$arguments" != xEOL; then
43274       new_complete="$new_path ${arguments% *}"
43275     else
43276       new_complete="$new_path"
43277     fi
43278 
43279     if test "x$complete" != "x$new_complete"; then
43280       OBJDUMP="$new_complete"
43281       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43282 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43283     fi
43284   fi
43285 
43286   fi
43287 
43288 
43289   # Restore old path.
43290   PATH="$OLD_PATH"
43291 
43292   # Restore the flags to the user specified values.
43293   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43294   CFLAGS="$ORG_CFLAGS"
43295   CXXFLAGS="$ORG_CXXFLAGS"
43296 
43297 
43298 # Finally do some processing after the detection phase
43299 
43300   if test "x$COMPILE_TYPE" = "xcross"; then
43301     # Now we need to find a C/C++ compiler that can build executables for the
43302     # build platform. We can't use the AC_PROG_CC macro, since it can only be
43303     # used once. Also, we need to do this without adding a tools dir to the
43304     # path, otherwise we might pick up cross-compilers which don't use standard
43305     # naming.
43306 
43307     OLDPATH="$PATH"
43308 
43309 
43310 # Check whether --with-build-devkit was given.
43311 if test "${with_build_devkit+set}" = set; then :
43312   withval=$with_build_devkit;
43313 fi
43314 
43315     if test "x$with_build_devkit" = "xyes"; then
43316       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43317     elif test -n "$with_build_devkit"; then
43318       if test ! -d "$with_build_devkit"; then
43319         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43320       else
43321 
43322   # Only process if variable expands to non-empty
43323 
43324   if test "x$with_build_devkit" != x; then
43325     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43326 
43327   # Input might be given as Windows format, start by converting to
43328   # unix format.
43329   path="$with_build_devkit"
43330   new_path=`$CYGPATH -u "$path"`
43331 
43332   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43333   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43334   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43335   # "foo.exe" is OK but "foo" is an error.
43336   #
43337   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43338   # It is also a way to make sure we got the proper file name for the real test later on.
43339   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43340   if test "x$test_shortpath" = x; then
43341     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43342 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43343     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43344   fi
43345 
43346   # Call helper function which possibly converts this using DOS-style short mode.
43347   # If so, the updated path is stored in $new_path.
43348 
43349   input_path="$new_path"
43350   # Check if we need to convert this using DOS-style short mode. If the path
43351   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43352   # take no chances and rewrite it.
43353   # Note: m4 eats our [], so we need to use [ and ] instead.
43354   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43355   if test "x$has_forbidden_chars" != x; then
43356     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43357     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43358     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43359     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43360       # Going to short mode and back again did indeed matter. Since short mode is
43361       # case insensitive, let's make it lowercase to improve readability.
43362       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43363       # Now convert it back to Unix-style (cygpath)
43364       input_path=`$CYGPATH -u "$shortmode_path"`
43365       new_path="$input_path"
43366     fi
43367   fi
43368 
43369   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43370   if test "x$test_cygdrive_prefix" = x; then
43371     # As a simple fix, exclude /usr/bin since it's not a real path.
43372     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43373       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43374       # a path prefixed by /cygdrive for fixpath to work.
43375       new_path="$CYGWIN_ROOT_PATH$input_path"
43376     fi
43377   fi
43378 
43379 
43380   if test "x$path" != "x$new_path"; then
43381     with_build_devkit="$new_path"
43382     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43383 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43384   fi
43385 
43386     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43387 
43388   path="$with_build_devkit"
43389   has_colon=`$ECHO $path | $GREP ^.:`
43390   new_path="$path"
43391   if test "x$has_colon" = x; then
43392     # Not in mixed or Windows style, start by that.
43393     new_path=`cmd //c echo $path`
43394   fi
43395 
43396 
43397   input_path="$new_path"
43398   # Check if we need to convert this using DOS-style short mode. If the path
43399   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43400   # take no chances and rewrite it.
43401   # Note: m4 eats our [], so we need to use [ and ] instead.
43402   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43403   if test "x$has_forbidden_chars" != x; then
43404     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43405     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43406   fi
43407 
43408 
43409   windows_path="$new_path"
43410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43411     unix_path=`$CYGPATH -u "$windows_path"`
43412     new_path="$unix_path"
43413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43414     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43415     new_path="$unix_path"
43416   fi
43417 
43418   if test "x$path" != "x$new_path"; then
43419     with_build_devkit="$new_path"
43420     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43421 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43422   fi
43423 
43424   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43425   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43426 
43427     else
43428       # We're on a unix platform. Hooray! :)
43429       path="$with_build_devkit"
43430       has_space=`$ECHO "$path" | $GREP " "`
43431       if test "x$has_space" != x; then
43432         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43433 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43434         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43435       fi
43436 
43437       # Use eval to expand a potential ~
43438       eval path="$path"
43439       if test ! -f "$path" && test ! -d "$path"; then
43440         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43441       fi
43442 
43443       if test -d "$path"; then
43444         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43445       else
43446         dir="`$DIRNAME "$path"`"
43447         base="`$BASENAME "$path"`"
43448         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43449       fi
43450     fi
43451   fi
43452 
43453         BUILD_DEVKIT_ROOT="$with_build_devkit"
43454         # Check for a meta data info file in the root of the devkit
43455         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43456           # Process devkit.info so that existing devkit variables are not
43457           # modified by this
43458           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43459               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43460               -e "s/\$host/\$build/g" \
43461               $BUILD_DEVKIT_ROOT/devkit.info \
43462               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43463           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43464           # This potentially sets the following:
43465           # A descriptive name of the devkit
43466 
43467   if test "x$BUILD_DEVKIT_NAME" = x; then
43468     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43469   fi
43470 
43471           # Corresponds to --with-extra-path
43472 
43473   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43474     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43475   fi
43476 
43477           # Corresponds to --with-toolchain-path
43478 
43479   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43480     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43481   fi
43482 
43483           # Corresponds to --with-sysroot
43484 
43485   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43486     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43487   fi
43488 
43489           # Skip the Window specific parts
43490         fi
43491 
43492         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43493 $as_echo_n "checking for build platform devkit... " >&6; }
43494         if test "x$BUILD_DEVKIT_NAME" != x; then
43495           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43496 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43497         else
43498           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43499 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43500         fi
43501 
43502         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43503 
43504   if test "x$BUILD_SYSROOT" != "x"; then
43505     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43506       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43507         # Solaris Studio does not have a concept of sysroot. Instead we must
43508         # make sure the default include and lib dirs are appended to each
43509         # compile and link command line. Must also add -I-xbuiltin to enable
43510         # inlining of system functions and intrinsics.
43511         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43512         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43513             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43514             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43515       fi
43516     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43517       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43518       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43519     elif test "x$TOOLCHAIN_TYPE" = xclang; then
43520       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43521       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43522     fi
43523     # Propagate the sysroot args to hotspot
43524     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43525     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43526     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43527     # The global CFLAGS and LDFLAGS variables need these for configure to function
43528     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43529     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43530     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43531     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43532   fi
43533 
43534   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43535     # We also need -iframework<path>/System/Library/Frameworks
43536     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43537     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43538     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43539     # set this here so it doesn't have to be peppered throughout the forest
43540     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43541     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43542   fi
43543 
43544 
43545 
43546 
43547 
43548          # Fallback default of just /bin if DEVKIT_PATH is not defined
43549         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43550           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43551         fi
43552         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43553       fi
43554     fi
43555 
43556     # FIXME: we should list the discovered compilers as an exclude pattern!
43557     # If we do that, we can do this detection before POST_DETECTION, and still
43558     # find the build compilers in the tools dir, if needed.
43559 
43560 
43561 
43562   # Publish this variable in the help.
43563 
43564 
43565   if [ -z "${BUILD_CC+x}" ]; then
43566     # The variable is not set by user, try to locate tool using the code snippet
43567     for ac_prog in cl cc gcc
43568 do
43569   # Extract the first word of "$ac_prog", so it can be a program name with args.
43570 set dummy $ac_prog; ac_word=$2
43571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43572 $as_echo_n "checking for $ac_word... " >&6; }
43573 if ${ac_cv_path_BUILD_CC+:} false; then :
43574   $as_echo_n "(cached) " >&6
43575 else
43576   case $BUILD_CC in
43577   [\\/]* | ?:[\\/]*)
43578   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43579   ;;
43580   *)
43581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43582 for as_dir in $PATH
43583 do
43584   IFS=$as_save_IFS
43585   test -z "$as_dir" && as_dir=.
43586     for ac_exec_ext in '' $ac_executable_extensions; do
43587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43588     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43590     break 2
43591   fi
43592 done
43593   done
43594 IFS=$as_save_IFS
43595 
43596   ;;
43597 esac
43598 fi
43599 BUILD_CC=$ac_cv_path_BUILD_CC
43600 if test -n "$BUILD_CC"; then
43601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43602 $as_echo "$BUILD_CC" >&6; }
43603 else
43604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43605 $as_echo "no" >&6; }
43606 fi
43607 
43608 
43609   test -n "$BUILD_CC" && break
43610 done
43611 
43612   else
43613     # The variable is set, but is it from the command line or the environment?
43614 
43615     # Try to remove the string !BUILD_CC! from our list.
43616     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43617     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43618       # If it failed, the variable was not from the command line. Ignore it,
43619       # but warn the user (except for BASH, which is always set by the calling BASH).
43620       if test "xBUILD_CC" != xBASH; then
43621         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43622 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43623       fi
43624       # Try to locate tool using the code snippet
43625       for ac_prog in cl cc gcc
43626 do
43627   # Extract the first word of "$ac_prog", so it can be a program name with args.
43628 set dummy $ac_prog; ac_word=$2
43629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43630 $as_echo_n "checking for $ac_word... " >&6; }
43631 if ${ac_cv_path_BUILD_CC+:} false; then :
43632   $as_echo_n "(cached) " >&6
43633 else
43634   case $BUILD_CC in
43635   [\\/]* | ?:[\\/]*)
43636   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43637   ;;
43638   *)
43639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43640 for as_dir in $PATH
43641 do
43642   IFS=$as_save_IFS
43643   test -z "$as_dir" && as_dir=.
43644     for ac_exec_ext in '' $ac_executable_extensions; do
43645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43646     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43648     break 2
43649   fi
43650 done
43651   done
43652 IFS=$as_save_IFS
43653 
43654   ;;
43655 esac
43656 fi
43657 BUILD_CC=$ac_cv_path_BUILD_CC
43658 if test -n "$BUILD_CC"; then
43659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43660 $as_echo "$BUILD_CC" >&6; }
43661 else
43662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43663 $as_echo "no" >&6; }
43664 fi
43665 
43666 
43667   test -n "$BUILD_CC" && break
43668 done
43669 
43670     else
43671       # If it succeeded, then it was overridden by the user. We will use it
43672       # for the tool.
43673 
43674       # First remove it from the list of overridden variables, so we can test
43675       # for unknown variables in the end.
43676       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43677 
43678       # Check if we try to supply an empty value
43679       if test "x$BUILD_CC" = x; then
43680         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43681 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43682         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43683 $as_echo_n "checking for BUILD_CC... " >&6; }
43684         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43685 $as_echo "disabled" >&6; }
43686       else
43687         # Check if the provided tool contains a complete path.
43688         tool_specified="$BUILD_CC"
43689         tool_basename="${tool_specified##*/}"
43690         if test "x$tool_basename" = "x$tool_specified"; then
43691           # A command without a complete path is provided, search $PATH.
43692           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43693 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43694           # Extract the first word of "$tool_basename", so it can be a program name with args.
43695 set dummy $tool_basename; ac_word=$2
43696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43697 $as_echo_n "checking for $ac_word... " >&6; }
43698 if ${ac_cv_path_BUILD_CC+:} false; then :
43699   $as_echo_n "(cached) " >&6
43700 else
43701   case $BUILD_CC in
43702   [\\/]* | ?:[\\/]*)
43703   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43704   ;;
43705   *)
43706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43707 for as_dir in $PATH
43708 do
43709   IFS=$as_save_IFS
43710   test -z "$as_dir" && as_dir=.
43711     for ac_exec_ext in '' $ac_executable_extensions; do
43712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43713     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43715     break 2
43716   fi
43717 done
43718   done
43719 IFS=$as_save_IFS
43720 
43721   ;;
43722 esac
43723 fi
43724 BUILD_CC=$ac_cv_path_BUILD_CC
43725 if test -n "$BUILD_CC"; then
43726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43727 $as_echo "$BUILD_CC" >&6; }
43728 else
43729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43730 $as_echo "no" >&6; }
43731 fi
43732 
43733 
43734           if test "x$BUILD_CC" = x; then
43735             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43736           fi
43737         else
43738           # Otherwise we believe it is a complete path. Use it as it is.
43739           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43740 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43741           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43742 $as_echo_n "checking for BUILD_CC... " >&6; }
43743           if test ! -x "$tool_specified"; then
43744             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43745 $as_echo "not found" >&6; }
43746             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43747           fi
43748           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43749 $as_echo "$tool_specified" >&6; }
43750         fi
43751       fi
43752     fi
43753 
43754   fi
43755 
43756 
43757 
43758   if test "x$BUILD_CC" = x; then
43759     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43760   fi
43761 
43762 
43763 
43764   # Only process if variable expands to non-empty
43765 
43766   if test "x$BUILD_CC" != x; then
43767     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43768 
43769   # First separate the path from the arguments. This will split at the first
43770   # space.
43771   complete="$BUILD_CC"
43772   path="${complete%% *}"
43773   tmp="$complete EOL"
43774   arguments="${tmp#* }"
43775 
43776   # Input might be given as Windows format, start by converting to
43777   # unix format.
43778   new_path=`$CYGPATH -u "$path"`
43779 
43780   # Now try to locate executable using which
43781   new_path=`$WHICH "$new_path" 2> /dev/null`
43782   # bat and cmd files are not always considered executable in cygwin causing which
43783   # to not find them
43784   if test "x$new_path" = x \
43785       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43786       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43787     new_path=`$CYGPATH -u "$path"`
43788   fi
43789   if test "x$new_path" = x; then
43790     # Oops. Which didn't find the executable.
43791     # The splitting of arguments from the executable at a space might have been incorrect,
43792     # since paths with space are more likely in Windows. Give it another try with the whole
43793     # argument.
43794     path="$complete"
43795     arguments="EOL"
43796     new_path=`$CYGPATH -u "$path"`
43797     new_path=`$WHICH "$new_path" 2> /dev/null`
43798     # bat and cmd files are not always considered executable in cygwin causing which
43799     # to not find them
43800     if test "x$new_path" = x \
43801         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43802         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43803       new_path=`$CYGPATH -u "$path"`
43804     fi
43805     if test "x$new_path" = x; then
43806       # It's still not found. Now this is an unrecoverable error.
43807       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43808 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43809       has_space=`$ECHO "$complete" | $GREP " "`
43810       if test "x$has_space" != x; then
43811         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43812 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43813       fi
43814       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43815     fi
43816   fi
43817 
43818   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43819   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43820   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43821   # "foo.exe" is OK but "foo" is an error.
43822   #
43823   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43824   # It is also a way to make sure we got the proper file name for the real test later on.
43825   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43826   if test "x$test_shortpath" = x; then
43827     # Short path failed, file does not exist as specified.
43828     # Try adding .exe or .cmd
43829     if test -f "${new_path}.exe"; then
43830       input_to_shortpath="${new_path}.exe"
43831     elif test -f "${new_path}.cmd"; then
43832       input_to_shortpath="${new_path}.cmd"
43833     else
43834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43835 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43836       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43837 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43838       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43839     fi
43840   else
43841     input_to_shortpath="$new_path"
43842   fi
43843 
43844   # Call helper function which possibly converts this using DOS-style short mode.
43845   # If so, the updated path is stored in $new_path.
43846   new_path="$input_to_shortpath"
43847 
43848   input_path="$input_to_shortpath"
43849   # Check if we need to convert this using DOS-style short mode. If the path
43850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43851   # take no chances and rewrite it.
43852   # Note: m4 eats our [], so we need to use [ and ] instead.
43853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43854   if test "x$has_forbidden_chars" != x; then
43855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43856     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43857     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43858     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43859       # Going to short mode and back again did indeed matter. Since short mode is
43860       # case insensitive, let's make it lowercase to improve readability.
43861       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43862       # Now convert it back to Unix-style (cygpath)
43863       input_path=`$CYGPATH -u "$shortmode_path"`
43864       new_path="$input_path"
43865     fi
43866   fi
43867 
43868   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43869   if test "x$test_cygdrive_prefix" = x; then
43870     # As a simple fix, exclude /usr/bin since it's not a real path.
43871     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43872       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43873       # a path prefixed by /cygdrive for fixpath to work.
43874       new_path="$CYGWIN_ROOT_PATH$input_path"
43875     fi
43876   fi
43877 
43878   # remove trailing .exe if any
43879   new_path="${new_path/%.exe/}"
43880 
43881     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43882 
43883   # First separate the path from the arguments. This will split at the first
43884   # space.
43885   complete="$BUILD_CC"
43886   path="${complete%% *}"
43887   tmp="$complete EOL"
43888   arguments="${tmp#* }"
43889 
43890   # Input might be given as Windows format, start by converting to
43891   # unix format.
43892   new_path="$path"
43893 
43894   windows_path="$new_path"
43895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43896     unix_path=`$CYGPATH -u "$windows_path"`
43897     new_path="$unix_path"
43898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43900     new_path="$unix_path"
43901   fi
43902 
43903 
43904   # Now try to locate executable using which
43905   new_path=`$WHICH "$new_path" 2> /dev/null`
43906 
43907   if test "x$new_path" = x; then
43908     # Oops. Which didn't find the executable.
43909     # The splitting of arguments from the executable at a space might have been incorrect,
43910     # since paths with space are more likely in Windows. Give it another try with the whole
43911     # argument.
43912     path="$complete"
43913     arguments="EOL"
43914     new_path="$path"
43915 
43916   windows_path="$new_path"
43917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43918     unix_path=`$CYGPATH -u "$windows_path"`
43919     new_path="$unix_path"
43920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43922     new_path="$unix_path"
43923   fi
43924 
43925 
43926     new_path=`$WHICH "$new_path" 2> /dev/null`
43927     # bat and cmd files are not always considered executable in MSYS causing which
43928     # to not find them
43929     if test "x$new_path" = x \
43930         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43931         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43932       new_path="$path"
43933 
43934   windows_path="$new_path"
43935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43936     unix_path=`$CYGPATH -u "$windows_path"`
43937     new_path="$unix_path"
43938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43940     new_path="$unix_path"
43941   fi
43942 
43943     fi
43944 
43945     if test "x$new_path" = x; then
43946       # It's still not found. Now this is an unrecoverable error.
43947       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43948 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43949       has_space=`$ECHO "$complete" | $GREP " "`
43950       if test "x$has_space" != x; then
43951         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43952 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43953       fi
43954       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43955     fi
43956   fi
43957 
43958   # Now new_path has a complete unix path to the binary
43959   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43960     # Keep paths in /bin as-is, but remove trailing .exe if any
43961     new_path="${new_path/%.exe/}"
43962     # Do not save /bin paths to all_fixpath_prefixes!
43963   else
43964     # Not in mixed or Windows style, start by that.
43965     new_path=`cmd //c echo $new_path`
43966 
43967   input_path="$new_path"
43968   # Check if we need to convert this using DOS-style short mode. If the path
43969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43970   # take no chances and rewrite it.
43971   # Note: m4 eats our [], so we need to use [ and ] instead.
43972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43973   if test "x$has_forbidden_chars" != x; then
43974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43975     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43976   fi
43977 
43978     # Output is in $new_path
43979 
43980   windows_path="$new_path"
43981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43982     unix_path=`$CYGPATH -u "$windows_path"`
43983     new_path="$unix_path"
43984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43986     new_path="$unix_path"
43987   fi
43988 
43989     # remove trailing .exe if any
43990     new_path="${new_path/%.exe/}"
43991 
43992     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43993     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43994   fi
43995 
43996     else
43997       # We're on a unix platform. Hooray! :)
43998       # First separate the path from the arguments. This will split at the first
43999       # space.
44000       complete="$BUILD_CC"
44001       path="${complete%% *}"
44002       tmp="$complete EOL"
44003       arguments="${tmp#* }"
44004 
44005       # Cannot rely on the command "which" here since it doesn't always work.
44006       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44007       if test -z "$is_absolute_path"; then
44008         # Path to executable is not absolute. Find it.
44009         IFS_save="$IFS"
44010         IFS=:
44011         for p in $PATH; do
44012           if test -f "$p/$path" && test -x "$p/$path"; then
44013             new_path="$p/$path"
44014             break
44015           fi
44016         done
44017         IFS="$IFS_save"
44018       else
44019         # This is an absolute path, we can use it without further modifications.
44020         new_path="$path"
44021       fi
44022 
44023       if test "x$new_path" = x; then
44024         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44025 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44026         has_space=`$ECHO "$complete" | $GREP " "`
44027         if test "x$has_space" != x; then
44028           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44029 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44030         fi
44031         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44032       fi
44033     fi
44034 
44035     # Now join together the path and the arguments once again
44036     if test "x$arguments" != xEOL; then
44037       new_complete="$new_path ${arguments% *}"
44038     else
44039       new_complete="$new_path"
44040     fi
44041 
44042     if test "x$complete" != "x$new_complete"; then
44043       BUILD_CC="$new_complete"
44044       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44045 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44046     fi
44047   fi
44048 
44049 
44050 
44051 
44052   # Publish this variable in the help.
44053 
44054 
44055   if [ -z "${BUILD_CXX+x}" ]; then
44056     # The variable is not set by user, try to locate tool using the code snippet
44057     for ac_prog in cl CC g++
44058 do
44059   # Extract the first word of "$ac_prog", so it can be a program name with args.
44060 set dummy $ac_prog; ac_word=$2
44061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44062 $as_echo_n "checking for $ac_word... " >&6; }
44063 if ${ac_cv_path_BUILD_CXX+:} false; then :
44064   $as_echo_n "(cached) " >&6
44065 else
44066   case $BUILD_CXX in
44067   [\\/]* | ?:[\\/]*)
44068   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44069   ;;
44070   *)
44071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44072 for as_dir in $PATH
44073 do
44074   IFS=$as_save_IFS
44075   test -z "$as_dir" && as_dir=.
44076     for ac_exec_ext in '' $ac_executable_extensions; do
44077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44078     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44080     break 2
44081   fi
44082 done
44083   done
44084 IFS=$as_save_IFS
44085 
44086   ;;
44087 esac
44088 fi
44089 BUILD_CXX=$ac_cv_path_BUILD_CXX
44090 if test -n "$BUILD_CXX"; then
44091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44092 $as_echo "$BUILD_CXX" >&6; }
44093 else
44094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44095 $as_echo "no" >&6; }
44096 fi
44097 
44098 
44099   test -n "$BUILD_CXX" && break
44100 done
44101 
44102   else
44103     # The variable is set, but is it from the command line or the environment?
44104 
44105     # Try to remove the string !BUILD_CXX! from our list.
44106     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44107     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44108       # If it failed, the variable was not from the command line. Ignore it,
44109       # but warn the user (except for BASH, which is always set by the calling BASH).
44110       if test "xBUILD_CXX" != xBASH; then
44111         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44112 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44113       fi
44114       # Try to locate tool using the code snippet
44115       for ac_prog in cl CC g++
44116 do
44117   # Extract the first word of "$ac_prog", so it can be a program name with args.
44118 set dummy $ac_prog; ac_word=$2
44119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44120 $as_echo_n "checking for $ac_word... " >&6; }
44121 if ${ac_cv_path_BUILD_CXX+:} false; then :
44122   $as_echo_n "(cached) " >&6
44123 else
44124   case $BUILD_CXX in
44125   [\\/]* | ?:[\\/]*)
44126   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44127   ;;
44128   *)
44129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44130 for as_dir in $PATH
44131 do
44132   IFS=$as_save_IFS
44133   test -z "$as_dir" && as_dir=.
44134     for ac_exec_ext in '' $ac_executable_extensions; do
44135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44136     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44138     break 2
44139   fi
44140 done
44141   done
44142 IFS=$as_save_IFS
44143 
44144   ;;
44145 esac
44146 fi
44147 BUILD_CXX=$ac_cv_path_BUILD_CXX
44148 if test -n "$BUILD_CXX"; then
44149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44150 $as_echo "$BUILD_CXX" >&6; }
44151 else
44152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44153 $as_echo "no" >&6; }
44154 fi
44155 
44156 
44157   test -n "$BUILD_CXX" && break
44158 done
44159 
44160     else
44161       # If it succeeded, then it was overridden by the user. We will use it
44162       # for the tool.
44163 
44164       # First remove it from the list of overridden variables, so we can test
44165       # for unknown variables in the end.
44166       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44167 
44168       # Check if we try to supply an empty value
44169       if test "x$BUILD_CXX" = x; then
44170         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44171 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44172         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44173 $as_echo_n "checking for BUILD_CXX... " >&6; }
44174         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44175 $as_echo "disabled" >&6; }
44176       else
44177         # Check if the provided tool contains a complete path.
44178         tool_specified="$BUILD_CXX"
44179         tool_basename="${tool_specified##*/}"
44180         if test "x$tool_basename" = "x$tool_specified"; then
44181           # A command without a complete path is provided, search $PATH.
44182           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44183 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44184           # Extract the first word of "$tool_basename", so it can be a program name with args.
44185 set dummy $tool_basename; ac_word=$2
44186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44187 $as_echo_n "checking for $ac_word... " >&6; }
44188 if ${ac_cv_path_BUILD_CXX+:} false; then :
44189   $as_echo_n "(cached) " >&6
44190 else
44191   case $BUILD_CXX in
44192   [\\/]* | ?:[\\/]*)
44193   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44194   ;;
44195   *)
44196   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44197 for as_dir in $PATH
44198 do
44199   IFS=$as_save_IFS
44200   test -z "$as_dir" && as_dir=.
44201     for ac_exec_ext in '' $ac_executable_extensions; do
44202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44203     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44205     break 2
44206   fi
44207 done
44208   done
44209 IFS=$as_save_IFS
44210 
44211   ;;
44212 esac
44213 fi
44214 BUILD_CXX=$ac_cv_path_BUILD_CXX
44215 if test -n "$BUILD_CXX"; then
44216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44217 $as_echo "$BUILD_CXX" >&6; }
44218 else
44219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44220 $as_echo "no" >&6; }
44221 fi
44222 
44223 
44224           if test "x$BUILD_CXX" = x; then
44225             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44226           fi
44227         else
44228           # Otherwise we believe it is a complete path. Use it as it is.
44229           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44230 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44231           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44232 $as_echo_n "checking for BUILD_CXX... " >&6; }
44233           if test ! -x "$tool_specified"; then
44234             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44235 $as_echo "not found" >&6; }
44236             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44237           fi
44238           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44239 $as_echo "$tool_specified" >&6; }
44240         fi
44241       fi
44242     fi
44243 
44244   fi
44245 
44246 
44247 
44248   if test "x$BUILD_CXX" = x; then
44249     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44250   fi
44251 
44252 
44253 
44254   # Only process if variable expands to non-empty
44255 
44256   if test "x$BUILD_CXX" != x; then
44257     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44258 
44259   # First separate the path from the arguments. This will split at the first
44260   # space.
44261   complete="$BUILD_CXX"
44262   path="${complete%% *}"
44263   tmp="$complete EOL"
44264   arguments="${tmp#* }"
44265 
44266   # Input might be given as Windows format, start by converting to
44267   # unix format.
44268   new_path=`$CYGPATH -u "$path"`
44269 
44270   # Now try to locate executable using which
44271   new_path=`$WHICH "$new_path" 2> /dev/null`
44272   # bat and cmd files are not always considered executable in cygwin causing which
44273   # to not find them
44274   if test "x$new_path" = x \
44275       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44276       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44277     new_path=`$CYGPATH -u "$path"`
44278   fi
44279   if test "x$new_path" = x; then
44280     # Oops. Which didn't find the executable.
44281     # The splitting of arguments from the executable at a space might have been incorrect,
44282     # since paths with space are more likely in Windows. Give it another try with the whole
44283     # argument.
44284     path="$complete"
44285     arguments="EOL"
44286     new_path=`$CYGPATH -u "$path"`
44287     new_path=`$WHICH "$new_path" 2> /dev/null`
44288     # bat and cmd files are not always considered executable in cygwin causing which
44289     # to not find them
44290     if test "x$new_path" = x \
44291         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44292         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44293       new_path=`$CYGPATH -u "$path"`
44294     fi
44295     if test "x$new_path" = x; then
44296       # It's still not found. Now this is an unrecoverable error.
44297       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44298 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44299       has_space=`$ECHO "$complete" | $GREP " "`
44300       if test "x$has_space" != x; then
44301         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44302 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44303       fi
44304       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44305     fi
44306   fi
44307 
44308   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44309   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44310   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44311   # "foo.exe" is OK but "foo" is an error.
44312   #
44313   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44314   # It is also a way to make sure we got the proper file name for the real test later on.
44315   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44316   if test "x$test_shortpath" = x; then
44317     # Short path failed, file does not exist as specified.
44318     # Try adding .exe or .cmd
44319     if test -f "${new_path}.exe"; then
44320       input_to_shortpath="${new_path}.exe"
44321     elif test -f "${new_path}.cmd"; then
44322       input_to_shortpath="${new_path}.cmd"
44323     else
44324       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44325 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44326       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44327 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44328       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44329     fi
44330   else
44331     input_to_shortpath="$new_path"
44332   fi
44333 
44334   # Call helper function which possibly converts this using DOS-style short mode.
44335   # If so, the updated path is stored in $new_path.
44336   new_path="$input_to_shortpath"
44337 
44338   input_path="$input_to_shortpath"
44339   # Check if we need to convert this using DOS-style short mode. If the path
44340   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44341   # take no chances and rewrite it.
44342   # Note: m4 eats our [], so we need to use [ and ] instead.
44343   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44344   if test "x$has_forbidden_chars" != x; then
44345     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44346     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44347     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44348     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44349       # Going to short mode and back again did indeed matter. Since short mode is
44350       # case insensitive, let's make it lowercase to improve readability.
44351       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44352       # Now convert it back to Unix-style (cygpath)
44353       input_path=`$CYGPATH -u "$shortmode_path"`
44354       new_path="$input_path"
44355     fi
44356   fi
44357 
44358   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44359   if test "x$test_cygdrive_prefix" = x; then
44360     # As a simple fix, exclude /usr/bin since it's not a real path.
44361     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44362       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44363       # a path prefixed by /cygdrive for fixpath to work.
44364       new_path="$CYGWIN_ROOT_PATH$input_path"
44365     fi
44366   fi
44367 
44368   # remove trailing .exe if any
44369   new_path="${new_path/%.exe/}"
44370 
44371     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44372 
44373   # First separate the path from the arguments. This will split at the first
44374   # space.
44375   complete="$BUILD_CXX"
44376   path="${complete%% *}"
44377   tmp="$complete EOL"
44378   arguments="${tmp#* }"
44379 
44380   # Input might be given as Windows format, start by converting to
44381   # unix format.
44382   new_path="$path"
44383 
44384   windows_path="$new_path"
44385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44386     unix_path=`$CYGPATH -u "$windows_path"`
44387     new_path="$unix_path"
44388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44390     new_path="$unix_path"
44391   fi
44392 
44393 
44394   # Now try to locate executable using which
44395   new_path=`$WHICH "$new_path" 2> /dev/null`
44396 
44397   if test "x$new_path" = x; then
44398     # Oops. Which didn't find the executable.
44399     # The splitting of arguments from the executable at a space might have been incorrect,
44400     # since paths with space are more likely in Windows. Give it another try with the whole
44401     # argument.
44402     path="$complete"
44403     arguments="EOL"
44404     new_path="$path"
44405 
44406   windows_path="$new_path"
44407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44408     unix_path=`$CYGPATH -u "$windows_path"`
44409     new_path="$unix_path"
44410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44412     new_path="$unix_path"
44413   fi
44414 
44415 
44416     new_path=`$WHICH "$new_path" 2> /dev/null`
44417     # bat and cmd files are not always considered executable in MSYS causing which
44418     # to not find them
44419     if test "x$new_path" = x \
44420         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44421         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44422       new_path="$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     fi
44434 
44435     if test "x$new_path" = x; then
44436       # It's still not found. Now this is an unrecoverable error.
44437       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44438 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44439       has_space=`$ECHO "$complete" | $GREP " "`
44440       if test "x$has_space" != x; then
44441         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44442 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44443       fi
44444       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44445     fi
44446   fi
44447 
44448   # Now new_path has a complete unix path to the binary
44449   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44450     # Keep paths in /bin as-is, but remove trailing .exe if any
44451     new_path="${new_path/%.exe/}"
44452     # Do not save /bin paths to all_fixpath_prefixes!
44453   else
44454     # Not in mixed or Windows style, start by that.
44455     new_path=`cmd //c echo $new_path`
44456 
44457   input_path="$new_path"
44458   # Check if we need to convert this using DOS-style short mode. If the path
44459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44460   # take no chances and rewrite it.
44461   # Note: m4 eats our [], so we need to use [ and ] instead.
44462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44463   if test "x$has_forbidden_chars" != x; then
44464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44466   fi
44467 
44468     # Output is in $new_path
44469 
44470   windows_path="$new_path"
44471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44472     unix_path=`$CYGPATH -u "$windows_path"`
44473     new_path="$unix_path"
44474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44476     new_path="$unix_path"
44477   fi
44478 
44479     # remove trailing .exe if any
44480     new_path="${new_path/%.exe/}"
44481 
44482     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44483     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44484   fi
44485 
44486     else
44487       # We're on a unix platform. Hooray! :)
44488       # First separate the path from the arguments. This will split at the first
44489       # space.
44490       complete="$BUILD_CXX"
44491       path="${complete%% *}"
44492       tmp="$complete EOL"
44493       arguments="${tmp#* }"
44494 
44495       # Cannot rely on the command "which" here since it doesn't always work.
44496       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44497       if test -z "$is_absolute_path"; then
44498         # Path to executable is not absolute. Find it.
44499         IFS_save="$IFS"
44500         IFS=:
44501         for p in $PATH; do
44502           if test -f "$p/$path" && test -x "$p/$path"; then
44503             new_path="$p/$path"
44504             break
44505           fi
44506         done
44507         IFS="$IFS_save"
44508       else
44509         # This is an absolute path, we can use it without further modifications.
44510         new_path="$path"
44511       fi
44512 
44513       if test "x$new_path" = x; then
44514         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44515 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44516         has_space=`$ECHO "$complete" | $GREP " "`
44517         if test "x$has_space" != x; then
44518           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44519 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44520         fi
44521         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44522       fi
44523     fi
44524 
44525     # Now join together the path and the arguments once again
44526     if test "x$arguments" != xEOL; then
44527       new_complete="$new_path ${arguments% *}"
44528     else
44529       new_complete="$new_path"
44530     fi
44531 
44532     if test "x$complete" != "x$new_complete"; then
44533       BUILD_CXX="$new_complete"
44534       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44535 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44536     fi
44537   fi
44538 
44539 
44540 
44541   # Publish this variable in the help.
44542 
44543 
44544   if [ -z "${BUILD_NM+x}" ]; then
44545     # The variable is not set by user, try to locate tool using the code snippet
44546     for ac_prog in nm gcc-nm
44547 do
44548   # Extract the first word of "$ac_prog", so it can be a program name with args.
44549 set dummy $ac_prog; ac_word=$2
44550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44551 $as_echo_n "checking for $ac_word... " >&6; }
44552 if ${ac_cv_path_BUILD_NM+:} false; then :
44553   $as_echo_n "(cached) " >&6
44554 else
44555   case $BUILD_NM in
44556   [\\/]* | ?:[\\/]*)
44557   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44558   ;;
44559   *)
44560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44561 for as_dir in $PATH
44562 do
44563   IFS=$as_save_IFS
44564   test -z "$as_dir" && as_dir=.
44565     for ac_exec_ext in '' $ac_executable_extensions; do
44566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44567     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44569     break 2
44570   fi
44571 done
44572   done
44573 IFS=$as_save_IFS
44574 
44575   ;;
44576 esac
44577 fi
44578 BUILD_NM=$ac_cv_path_BUILD_NM
44579 if test -n "$BUILD_NM"; then
44580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44581 $as_echo "$BUILD_NM" >&6; }
44582 else
44583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44584 $as_echo "no" >&6; }
44585 fi
44586 
44587 
44588   test -n "$BUILD_NM" && break
44589 done
44590 
44591   else
44592     # The variable is set, but is it from the command line or the environment?
44593 
44594     # Try to remove the string !BUILD_NM! from our list.
44595     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44596     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44597       # If it failed, the variable was not from the command line. Ignore it,
44598       # but warn the user (except for BASH, which is always set by the calling BASH).
44599       if test "xBUILD_NM" != xBASH; then
44600         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44601 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44602       fi
44603       # Try to locate tool using the code snippet
44604       for ac_prog in nm gcc-nm
44605 do
44606   # Extract the first word of "$ac_prog", so it can be a program name with args.
44607 set dummy $ac_prog; ac_word=$2
44608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44609 $as_echo_n "checking for $ac_word... " >&6; }
44610 if ${ac_cv_path_BUILD_NM+:} false; then :
44611   $as_echo_n "(cached) " >&6
44612 else
44613   case $BUILD_NM in
44614   [\\/]* | ?:[\\/]*)
44615   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44616   ;;
44617   *)
44618   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44619 for as_dir in $PATH
44620 do
44621   IFS=$as_save_IFS
44622   test -z "$as_dir" && as_dir=.
44623     for ac_exec_ext in '' $ac_executable_extensions; do
44624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44625     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44627     break 2
44628   fi
44629 done
44630   done
44631 IFS=$as_save_IFS
44632 
44633   ;;
44634 esac
44635 fi
44636 BUILD_NM=$ac_cv_path_BUILD_NM
44637 if test -n "$BUILD_NM"; then
44638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44639 $as_echo "$BUILD_NM" >&6; }
44640 else
44641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44642 $as_echo "no" >&6; }
44643 fi
44644 
44645 
44646   test -n "$BUILD_NM" && break
44647 done
44648 
44649     else
44650       # If it succeeded, then it was overridden by the user. We will use it
44651       # for the tool.
44652 
44653       # First remove it from the list of overridden variables, so we can test
44654       # for unknown variables in the end.
44655       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44656 
44657       # Check if we try to supply an empty value
44658       if test "x$BUILD_NM" = x; then
44659         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44660 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44661         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44662 $as_echo_n "checking for BUILD_NM... " >&6; }
44663         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44664 $as_echo "disabled" >&6; }
44665       else
44666         # Check if the provided tool contains a complete path.
44667         tool_specified="$BUILD_NM"
44668         tool_basename="${tool_specified##*/}"
44669         if test "x$tool_basename" = "x$tool_specified"; then
44670           # A command without a complete path is provided, search $PATH.
44671           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44672 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44673           # Extract the first word of "$tool_basename", so it can be a program name with args.
44674 set dummy $tool_basename; ac_word=$2
44675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44676 $as_echo_n "checking for $ac_word... " >&6; }
44677 if ${ac_cv_path_BUILD_NM+:} false; then :
44678   $as_echo_n "(cached) " >&6
44679 else
44680   case $BUILD_NM in
44681   [\\/]* | ?:[\\/]*)
44682   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44683   ;;
44684   *)
44685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44686 for as_dir in $PATH
44687 do
44688   IFS=$as_save_IFS
44689   test -z "$as_dir" && as_dir=.
44690     for ac_exec_ext in '' $ac_executable_extensions; do
44691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44692     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44694     break 2
44695   fi
44696 done
44697   done
44698 IFS=$as_save_IFS
44699 
44700   ;;
44701 esac
44702 fi
44703 BUILD_NM=$ac_cv_path_BUILD_NM
44704 if test -n "$BUILD_NM"; then
44705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44706 $as_echo "$BUILD_NM" >&6; }
44707 else
44708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44709 $as_echo "no" >&6; }
44710 fi
44711 
44712 
44713           if test "x$BUILD_NM" = x; then
44714             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44715           fi
44716         else
44717           # Otherwise we believe it is a complete path. Use it as it is.
44718           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44719 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44720           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44721 $as_echo_n "checking for BUILD_NM... " >&6; }
44722           if test ! -x "$tool_specified"; then
44723             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44724 $as_echo "not found" >&6; }
44725             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44726           fi
44727           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44728 $as_echo "$tool_specified" >&6; }
44729         fi
44730       fi
44731     fi
44732 
44733   fi
44734 
44735 
44736 
44737   # Only process if variable expands to non-empty
44738 
44739   if test "x$BUILD_NM" != x; then
44740     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44741 
44742   # First separate the path from the arguments. This will split at the first
44743   # space.
44744   complete="$BUILD_NM"
44745   path="${complete%% *}"
44746   tmp="$complete EOL"
44747   arguments="${tmp#* }"
44748 
44749   # Input might be given as Windows format, start by converting to
44750   # unix format.
44751   new_path=`$CYGPATH -u "$path"`
44752 
44753   # Now try to locate executable using which
44754   new_path=`$WHICH "$new_path" 2> /dev/null`
44755   # bat and cmd files are not always considered executable in cygwin causing which
44756   # to not find them
44757   if test "x$new_path" = x \
44758       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44759       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44760     new_path=`$CYGPATH -u "$path"`
44761   fi
44762   if test "x$new_path" = x; then
44763     # Oops. Which didn't find the executable.
44764     # The splitting of arguments from the executable at a space might have been incorrect,
44765     # since paths with space are more likely in Windows. Give it another try with the whole
44766     # argument.
44767     path="$complete"
44768     arguments="EOL"
44769     new_path=`$CYGPATH -u "$path"`
44770     new_path=`$WHICH "$new_path" 2> /dev/null`
44771     # bat and cmd files are not always considered executable in cygwin causing which
44772     # to not find them
44773     if test "x$new_path" = x \
44774         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44775         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44776       new_path=`$CYGPATH -u "$path"`
44777     fi
44778     if test "x$new_path" = x; then
44779       # It's still not found. Now this is an unrecoverable error.
44780       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44781 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44782       has_space=`$ECHO "$complete" | $GREP " "`
44783       if test "x$has_space" != x; then
44784         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44785 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44786       fi
44787       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44788     fi
44789   fi
44790 
44791   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44792   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44793   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44794   # "foo.exe" is OK but "foo" is an error.
44795   #
44796   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44797   # It is also a way to make sure we got the proper file name for the real test later on.
44798   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44799   if test "x$test_shortpath" = x; then
44800     # Short path failed, file does not exist as specified.
44801     # Try adding .exe or .cmd
44802     if test -f "${new_path}.exe"; then
44803       input_to_shortpath="${new_path}.exe"
44804     elif test -f "${new_path}.cmd"; then
44805       input_to_shortpath="${new_path}.cmd"
44806     else
44807       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44808 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44809       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44810 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44811       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44812     fi
44813   else
44814     input_to_shortpath="$new_path"
44815   fi
44816 
44817   # Call helper function which possibly converts this using DOS-style short mode.
44818   # If so, the updated path is stored in $new_path.
44819   new_path="$input_to_shortpath"
44820 
44821   input_path="$input_to_shortpath"
44822   # Check if we need to convert this using DOS-style short mode. If the path
44823   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44824   # take no chances and rewrite it.
44825   # Note: m4 eats our [], so we need to use [ and ] instead.
44826   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44827   if test "x$has_forbidden_chars" != x; then
44828     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44829     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44830     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44831     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44832       # Going to short mode and back again did indeed matter. Since short mode is
44833       # case insensitive, let's make it lowercase to improve readability.
44834       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44835       # Now convert it back to Unix-style (cygpath)
44836       input_path=`$CYGPATH -u "$shortmode_path"`
44837       new_path="$input_path"
44838     fi
44839   fi
44840 
44841   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44842   if test "x$test_cygdrive_prefix" = x; then
44843     # As a simple fix, exclude /usr/bin since it's not a real path.
44844     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44845       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44846       # a path prefixed by /cygdrive for fixpath to work.
44847       new_path="$CYGWIN_ROOT_PATH$input_path"
44848     fi
44849   fi
44850 
44851   # remove trailing .exe if any
44852   new_path="${new_path/%.exe/}"
44853 
44854     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44855 
44856   # First separate the path from the arguments. This will split at the first
44857   # space.
44858   complete="$BUILD_NM"
44859   path="${complete%% *}"
44860   tmp="$complete EOL"
44861   arguments="${tmp#* }"
44862 
44863   # Input might be given as Windows format, start by converting to
44864   # unix format.
44865   new_path="$path"
44866 
44867   windows_path="$new_path"
44868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44869     unix_path=`$CYGPATH -u "$windows_path"`
44870     new_path="$unix_path"
44871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44873     new_path="$unix_path"
44874   fi
44875 
44876 
44877   # Now try to locate executable using which
44878   new_path=`$WHICH "$new_path" 2> /dev/null`
44879 
44880   if test "x$new_path" = x; then
44881     # Oops. Which didn't find the executable.
44882     # The splitting of arguments from the executable at a space might have been incorrect,
44883     # since paths with space are more likely in Windows. Give it another try with the whole
44884     # argument.
44885     path="$complete"
44886     arguments="EOL"
44887     new_path="$path"
44888 
44889   windows_path="$new_path"
44890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44891     unix_path=`$CYGPATH -u "$windows_path"`
44892     new_path="$unix_path"
44893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44894     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44895     new_path="$unix_path"
44896   fi
44897 
44898 
44899     new_path=`$WHICH "$new_path" 2> /dev/null`
44900     # bat and cmd files are not always considered executable in MSYS causing which
44901     # to not find them
44902     if test "x$new_path" = x \
44903         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44904         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44905       new_path="$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     fi
44917 
44918     if test "x$new_path" = x; then
44919       # It's still not found. Now this is an unrecoverable error.
44920       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44921 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44922       has_space=`$ECHO "$complete" | $GREP " "`
44923       if test "x$has_space" != x; then
44924         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44925 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44926       fi
44927       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44928     fi
44929   fi
44930 
44931   # Now new_path has a complete unix path to the binary
44932   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44933     # Keep paths in /bin as-is, but remove trailing .exe if any
44934     new_path="${new_path/%.exe/}"
44935     # Do not save /bin paths to all_fixpath_prefixes!
44936   else
44937     # Not in mixed or Windows style, start by that.
44938     new_path=`cmd //c echo $new_path`
44939 
44940   input_path="$new_path"
44941   # Check if we need to convert this using DOS-style short mode. If the path
44942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44943   # take no chances and rewrite it.
44944   # Note: m4 eats our [], so we need to use [ and ] instead.
44945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44946   if test "x$has_forbidden_chars" != x; then
44947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44948     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44949   fi
44950 
44951     # Output is in $new_path
44952 
44953   windows_path="$new_path"
44954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44955     unix_path=`$CYGPATH -u "$windows_path"`
44956     new_path="$unix_path"
44957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44959     new_path="$unix_path"
44960   fi
44961 
44962     # remove trailing .exe if any
44963     new_path="${new_path/%.exe/}"
44964 
44965     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44966     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44967   fi
44968 
44969     else
44970       # We're on a unix platform. Hooray! :)
44971       # First separate the path from the arguments. This will split at the first
44972       # space.
44973       complete="$BUILD_NM"
44974       path="${complete%% *}"
44975       tmp="$complete EOL"
44976       arguments="${tmp#* }"
44977 
44978       # Cannot rely on the command "which" here since it doesn't always work.
44979       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44980       if test -z "$is_absolute_path"; then
44981         # Path to executable is not absolute. Find it.
44982         IFS_save="$IFS"
44983         IFS=:
44984         for p in $PATH; do
44985           if test -f "$p/$path" && test -x "$p/$path"; then
44986             new_path="$p/$path"
44987             break
44988           fi
44989         done
44990         IFS="$IFS_save"
44991       else
44992         # This is an absolute path, we can use it without further modifications.
44993         new_path="$path"
44994       fi
44995 
44996       if test "x$new_path" = x; then
44997         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44998 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44999         has_space=`$ECHO "$complete" | $GREP " "`
45000         if test "x$has_space" != x; then
45001           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45002 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45003         fi
45004         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45005       fi
45006     fi
45007 
45008     # Now join together the path and the arguments once again
45009     if test "x$arguments" != xEOL; then
45010       new_complete="$new_path ${arguments% *}"
45011     else
45012       new_complete="$new_path"
45013     fi
45014 
45015     if test "x$complete" != "x$new_complete"; then
45016       BUILD_NM="$new_complete"
45017       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45018 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45019     fi
45020   fi
45021 
45022 
45023 
45024   # Publish this variable in the help.
45025 
45026 
45027   if [ -z "${BUILD_AR+x}" ]; then
45028     # The variable is not set by user, try to locate tool using the code snippet
45029     for ac_prog in ar gcc-ar
45030 do
45031   # Extract the first word of "$ac_prog", so it can be a program name with args.
45032 set dummy $ac_prog; ac_word=$2
45033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45034 $as_echo_n "checking for $ac_word... " >&6; }
45035 if ${ac_cv_path_BUILD_AR+:} false; then :
45036   $as_echo_n "(cached) " >&6
45037 else
45038   case $BUILD_AR in
45039   [\\/]* | ?:[\\/]*)
45040   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45041   ;;
45042   *)
45043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45044 for as_dir in $PATH
45045 do
45046   IFS=$as_save_IFS
45047   test -z "$as_dir" && as_dir=.
45048     for ac_exec_ext in '' $ac_executable_extensions; do
45049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45050     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45052     break 2
45053   fi
45054 done
45055   done
45056 IFS=$as_save_IFS
45057 
45058   ;;
45059 esac
45060 fi
45061 BUILD_AR=$ac_cv_path_BUILD_AR
45062 if test -n "$BUILD_AR"; then
45063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45064 $as_echo "$BUILD_AR" >&6; }
45065 else
45066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45067 $as_echo "no" >&6; }
45068 fi
45069 
45070 
45071   test -n "$BUILD_AR" && break
45072 done
45073 
45074   else
45075     # The variable is set, but is it from the command line or the environment?
45076 
45077     # Try to remove the string !BUILD_AR! from our list.
45078     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45079     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45080       # If it failed, the variable was not from the command line. Ignore it,
45081       # but warn the user (except for BASH, which is always set by the calling BASH).
45082       if test "xBUILD_AR" != xBASH; then
45083         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45084 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45085       fi
45086       # Try to locate tool using the code snippet
45087       for ac_prog in ar gcc-ar
45088 do
45089   # Extract the first word of "$ac_prog", so it can be a program name with args.
45090 set dummy $ac_prog; ac_word=$2
45091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45092 $as_echo_n "checking for $ac_word... " >&6; }
45093 if ${ac_cv_path_BUILD_AR+:} false; then :
45094   $as_echo_n "(cached) " >&6
45095 else
45096   case $BUILD_AR in
45097   [\\/]* | ?:[\\/]*)
45098   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45099   ;;
45100   *)
45101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45102 for as_dir in $PATH
45103 do
45104   IFS=$as_save_IFS
45105   test -z "$as_dir" && as_dir=.
45106     for ac_exec_ext in '' $ac_executable_extensions; do
45107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45108     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45110     break 2
45111   fi
45112 done
45113   done
45114 IFS=$as_save_IFS
45115 
45116   ;;
45117 esac
45118 fi
45119 BUILD_AR=$ac_cv_path_BUILD_AR
45120 if test -n "$BUILD_AR"; then
45121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45122 $as_echo "$BUILD_AR" >&6; }
45123 else
45124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45125 $as_echo "no" >&6; }
45126 fi
45127 
45128 
45129   test -n "$BUILD_AR" && break
45130 done
45131 
45132     else
45133       # If it succeeded, then it was overridden by the user. We will use it
45134       # for the tool.
45135 
45136       # First remove it from the list of overridden variables, so we can test
45137       # for unknown variables in the end.
45138       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45139 
45140       # Check if we try to supply an empty value
45141       if test "x$BUILD_AR" = x; then
45142         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45143 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45144         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45145 $as_echo_n "checking for BUILD_AR... " >&6; }
45146         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45147 $as_echo "disabled" >&6; }
45148       else
45149         # Check if the provided tool contains a complete path.
45150         tool_specified="$BUILD_AR"
45151         tool_basename="${tool_specified##*/}"
45152         if test "x$tool_basename" = "x$tool_specified"; then
45153           # A command without a complete path is provided, search $PATH.
45154           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45155 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45156           # Extract the first word of "$tool_basename", so it can be a program name with args.
45157 set dummy $tool_basename; ac_word=$2
45158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45159 $as_echo_n "checking for $ac_word... " >&6; }
45160 if ${ac_cv_path_BUILD_AR+:} false; then :
45161   $as_echo_n "(cached) " >&6
45162 else
45163   case $BUILD_AR in
45164   [\\/]* | ?:[\\/]*)
45165   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45166   ;;
45167   *)
45168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45169 for as_dir in $PATH
45170 do
45171   IFS=$as_save_IFS
45172   test -z "$as_dir" && as_dir=.
45173     for ac_exec_ext in '' $ac_executable_extensions; do
45174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45175     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45177     break 2
45178   fi
45179 done
45180   done
45181 IFS=$as_save_IFS
45182 
45183   ;;
45184 esac
45185 fi
45186 BUILD_AR=$ac_cv_path_BUILD_AR
45187 if test -n "$BUILD_AR"; then
45188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45189 $as_echo "$BUILD_AR" >&6; }
45190 else
45191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45192 $as_echo "no" >&6; }
45193 fi
45194 
45195 
45196           if test "x$BUILD_AR" = x; then
45197             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45198           fi
45199         else
45200           # Otherwise we believe it is a complete path. Use it as it is.
45201           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45202 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45203           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45204 $as_echo_n "checking for BUILD_AR... " >&6; }
45205           if test ! -x "$tool_specified"; then
45206             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45207 $as_echo "not found" >&6; }
45208             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45209           fi
45210           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45211 $as_echo "$tool_specified" >&6; }
45212         fi
45213       fi
45214     fi
45215 
45216   fi
45217 
45218 
45219 
45220   # Only process if variable expands to non-empty
45221 
45222   if test "x$BUILD_AR" != x; then
45223     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45224 
45225   # First separate the path from the arguments. This will split at the first
45226   # space.
45227   complete="$BUILD_AR"
45228   path="${complete%% *}"
45229   tmp="$complete EOL"
45230   arguments="${tmp#* }"
45231 
45232   # Input might be given as Windows format, start by converting to
45233   # unix format.
45234   new_path=`$CYGPATH -u "$path"`
45235 
45236   # Now try to locate executable using which
45237   new_path=`$WHICH "$new_path" 2> /dev/null`
45238   # bat and cmd files are not always considered executable in cygwin causing which
45239   # to not find them
45240   if test "x$new_path" = x \
45241       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45242       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45243     new_path=`$CYGPATH -u "$path"`
45244   fi
45245   if test "x$new_path" = x; then
45246     # Oops. Which didn't find the executable.
45247     # The splitting of arguments from the executable at a space might have been incorrect,
45248     # since paths with space are more likely in Windows. Give it another try with the whole
45249     # argument.
45250     path="$complete"
45251     arguments="EOL"
45252     new_path=`$CYGPATH -u "$path"`
45253     new_path=`$WHICH "$new_path" 2> /dev/null`
45254     # bat and cmd files are not always considered executable in cygwin causing which
45255     # to not find them
45256     if test "x$new_path" = x \
45257         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45258         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45259       new_path=`$CYGPATH -u "$path"`
45260     fi
45261     if test "x$new_path" = x; then
45262       # It's still not found. Now this is an unrecoverable error.
45263       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45264 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45265       has_space=`$ECHO "$complete" | $GREP " "`
45266       if test "x$has_space" != x; then
45267         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45268 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45269       fi
45270       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45271     fi
45272   fi
45273 
45274   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45275   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45276   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45277   # "foo.exe" is OK but "foo" is an error.
45278   #
45279   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45280   # It is also a way to make sure we got the proper file name for the real test later on.
45281   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45282   if test "x$test_shortpath" = x; then
45283     # Short path failed, file does not exist as specified.
45284     # Try adding .exe or .cmd
45285     if test -f "${new_path}.exe"; then
45286       input_to_shortpath="${new_path}.exe"
45287     elif test -f "${new_path}.cmd"; then
45288       input_to_shortpath="${new_path}.cmd"
45289     else
45290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45291 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45292       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45293 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45294       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45295     fi
45296   else
45297     input_to_shortpath="$new_path"
45298   fi
45299 
45300   # Call helper function which possibly converts this using DOS-style short mode.
45301   # If so, the updated path is stored in $new_path.
45302   new_path="$input_to_shortpath"
45303 
45304   input_path="$input_to_shortpath"
45305   # Check if we need to convert this using DOS-style short mode. If the path
45306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45307   # take no chances and rewrite it.
45308   # Note: m4 eats our [], so we need to use [ and ] instead.
45309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45310   if test "x$has_forbidden_chars" != x; then
45311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45312     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45313     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45314     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45315       # Going to short mode and back again did indeed matter. Since short mode is
45316       # case insensitive, let's make it lowercase to improve readability.
45317       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45318       # Now convert it back to Unix-style (cygpath)
45319       input_path=`$CYGPATH -u "$shortmode_path"`
45320       new_path="$input_path"
45321     fi
45322   fi
45323 
45324   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45325   if test "x$test_cygdrive_prefix" = x; then
45326     # As a simple fix, exclude /usr/bin since it's not a real path.
45327     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45328       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45329       # a path prefixed by /cygdrive for fixpath to work.
45330       new_path="$CYGWIN_ROOT_PATH$input_path"
45331     fi
45332   fi
45333 
45334   # remove trailing .exe if any
45335   new_path="${new_path/%.exe/}"
45336 
45337     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45338 
45339   # First separate the path from the arguments. This will split at the first
45340   # space.
45341   complete="$BUILD_AR"
45342   path="${complete%% *}"
45343   tmp="$complete EOL"
45344   arguments="${tmp#* }"
45345 
45346   # Input might be given as Windows format, start by converting to
45347   # unix format.
45348   new_path="$path"
45349 
45350   windows_path="$new_path"
45351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45352     unix_path=`$CYGPATH -u "$windows_path"`
45353     new_path="$unix_path"
45354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45356     new_path="$unix_path"
45357   fi
45358 
45359 
45360   # Now try to locate executable using which
45361   new_path=`$WHICH "$new_path" 2> /dev/null`
45362 
45363   if test "x$new_path" = x; then
45364     # Oops. Which didn't find the executable.
45365     # The splitting of arguments from the executable at a space might have been incorrect,
45366     # since paths with space are more likely in Windows. Give it another try with the whole
45367     # argument.
45368     path="$complete"
45369     arguments="EOL"
45370     new_path="$path"
45371 
45372   windows_path="$new_path"
45373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45374     unix_path=`$CYGPATH -u "$windows_path"`
45375     new_path="$unix_path"
45376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45378     new_path="$unix_path"
45379   fi
45380 
45381 
45382     new_path=`$WHICH "$new_path" 2> /dev/null`
45383     # bat and cmd files are not always considered executable in MSYS causing which
45384     # to not find them
45385     if test "x$new_path" = x \
45386         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45387         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45388       new_path="$path"
45389 
45390   windows_path="$new_path"
45391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45392     unix_path=`$CYGPATH -u "$windows_path"`
45393     new_path="$unix_path"
45394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45396     new_path="$unix_path"
45397   fi
45398 
45399     fi
45400 
45401     if test "x$new_path" = x; then
45402       # It's still not found. Now this is an unrecoverable error.
45403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45404 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45405       has_space=`$ECHO "$complete" | $GREP " "`
45406       if test "x$has_space" != x; then
45407         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45408 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45409       fi
45410       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45411     fi
45412   fi
45413 
45414   # Now new_path has a complete unix path to the binary
45415   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45416     # Keep paths in /bin as-is, but remove trailing .exe if any
45417     new_path="${new_path/%.exe/}"
45418     # Do not save /bin paths to all_fixpath_prefixes!
45419   else
45420     # Not in mixed or Windows style, start by that.
45421     new_path=`cmd //c echo $new_path`
45422 
45423   input_path="$new_path"
45424   # Check if we need to convert this using DOS-style short mode. If the path
45425   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45426   # take no chances and rewrite it.
45427   # Note: m4 eats our [], so we need to use [ and ] instead.
45428   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45429   if test "x$has_forbidden_chars" != x; then
45430     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45431     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45432   fi
45433 
45434     # Output is in $new_path
45435 
45436   windows_path="$new_path"
45437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45438     unix_path=`$CYGPATH -u "$windows_path"`
45439     new_path="$unix_path"
45440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45442     new_path="$unix_path"
45443   fi
45444 
45445     # remove trailing .exe if any
45446     new_path="${new_path/%.exe/}"
45447 
45448     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45449     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45450   fi
45451 
45452     else
45453       # We're on a unix platform. Hooray! :)
45454       # First separate the path from the arguments. This will split at the first
45455       # space.
45456       complete="$BUILD_AR"
45457       path="${complete%% *}"
45458       tmp="$complete EOL"
45459       arguments="${tmp#* }"
45460 
45461       # Cannot rely on the command "which" here since it doesn't always work.
45462       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45463       if test -z "$is_absolute_path"; then
45464         # Path to executable is not absolute. Find it.
45465         IFS_save="$IFS"
45466         IFS=:
45467         for p in $PATH; do
45468           if test -f "$p/$path" && test -x "$p/$path"; then
45469             new_path="$p/$path"
45470             break
45471           fi
45472         done
45473         IFS="$IFS_save"
45474       else
45475         # This is an absolute path, we can use it without further modifications.
45476         new_path="$path"
45477       fi
45478 
45479       if test "x$new_path" = x; then
45480         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45481 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45482         has_space=`$ECHO "$complete" | $GREP " "`
45483         if test "x$has_space" != x; then
45484           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45485 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45486         fi
45487         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45488       fi
45489     fi
45490 
45491     # Now join together the path and the arguments once again
45492     if test "x$arguments" != xEOL; then
45493       new_complete="$new_path ${arguments% *}"
45494     else
45495       new_complete="$new_path"
45496     fi
45497 
45498     if test "x$complete" != "x$new_complete"; then
45499       BUILD_AR="$new_complete"
45500       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45501 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45502     fi
45503   fi
45504 
45505 
45506 
45507   # Publish this variable in the help.
45508 
45509 
45510   if [ -z "${BUILD_OBJCOPY+x}" ]; then
45511     # The variable is not set by user, try to locate tool using the code snippet
45512     for ac_prog in objcopy
45513 do
45514   # Extract the first word of "$ac_prog", so it can be a program name with args.
45515 set dummy $ac_prog; ac_word=$2
45516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45517 $as_echo_n "checking for $ac_word... " >&6; }
45518 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45519   $as_echo_n "(cached) " >&6
45520 else
45521   case $BUILD_OBJCOPY in
45522   [\\/]* | ?:[\\/]*)
45523   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45524   ;;
45525   *)
45526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45527 for as_dir in $PATH
45528 do
45529   IFS=$as_save_IFS
45530   test -z "$as_dir" && as_dir=.
45531     for ac_exec_ext in '' $ac_executable_extensions; do
45532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45533     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45535     break 2
45536   fi
45537 done
45538   done
45539 IFS=$as_save_IFS
45540 
45541   ;;
45542 esac
45543 fi
45544 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45545 if test -n "$BUILD_OBJCOPY"; then
45546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45547 $as_echo "$BUILD_OBJCOPY" >&6; }
45548 else
45549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45550 $as_echo "no" >&6; }
45551 fi
45552 
45553 
45554   test -n "$BUILD_OBJCOPY" && break
45555 done
45556 
45557   else
45558     # The variable is set, but is it from the command line or the environment?
45559 
45560     # Try to remove the string !BUILD_OBJCOPY! from our list.
45561     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45562     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45563       # If it failed, the variable was not from the command line. Ignore it,
45564       # but warn the user (except for BASH, which is always set by the calling BASH).
45565       if test "xBUILD_OBJCOPY" != xBASH; then
45566         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45567 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45568       fi
45569       # Try to locate tool using the code snippet
45570       for ac_prog in objcopy
45571 do
45572   # Extract the first word of "$ac_prog", so it can be a program name with args.
45573 set dummy $ac_prog; ac_word=$2
45574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45575 $as_echo_n "checking for $ac_word... " >&6; }
45576 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45577   $as_echo_n "(cached) " >&6
45578 else
45579   case $BUILD_OBJCOPY in
45580   [\\/]* | ?:[\\/]*)
45581   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45582   ;;
45583   *)
45584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45585 for as_dir in $PATH
45586 do
45587   IFS=$as_save_IFS
45588   test -z "$as_dir" && as_dir=.
45589     for ac_exec_ext in '' $ac_executable_extensions; do
45590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45591     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45593     break 2
45594   fi
45595 done
45596   done
45597 IFS=$as_save_IFS
45598 
45599   ;;
45600 esac
45601 fi
45602 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45603 if test -n "$BUILD_OBJCOPY"; then
45604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45605 $as_echo "$BUILD_OBJCOPY" >&6; }
45606 else
45607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45608 $as_echo "no" >&6; }
45609 fi
45610 
45611 
45612   test -n "$BUILD_OBJCOPY" && break
45613 done
45614 
45615     else
45616       # If it succeeded, then it was overridden by the user. We will use it
45617       # for the tool.
45618 
45619       # First remove it from the list of overridden variables, so we can test
45620       # for unknown variables in the end.
45621       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45622 
45623       # Check if we try to supply an empty value
45624       if test "x$BUILD_OBJCOPY" = x; then
45625         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45626 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45627         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45628 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45629         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45630 $as_echo "disabled" >&6; }
45631       else
45632         # Check if the provided tool contains a complete path.
45633         tool_specified="$BUILD_OBJCOPY"
45634         tool_basename="${tool_specified##*/}"
45635         if test "x$tool_basename" = "x$tool_specified"; then
45636           # A command without a complete path is provided, search $PATH.
45637           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45638 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45639           # Extract the first word of "$tool_basename", so it can be a program name with args.
45640 set dummy $tool_basename; ac_word=$2
45641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45642 $as_echo_n "checking for $ac_word... " >&6; }
45643 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45644   $as_echo_n "(cached) " >&6
45645 else
45646   case $BUILD_OBJCOPY in
45647   [\\/]* | ?:[\\/]*)
45648   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45649   ;;
45650   *)
45651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45652 for as_dir in $PATH
45653 do
45654   IFS=$as_save_IFS
45655   test -z "$as_dir" && as_dir=.
45656     for ac_exec_ext in '' $ac_executable_extensions; do
45657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45658     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45660     break 2
45661   fi
45662 done
45663   done
45664 IFS=$as_save_IFS
45665 
45666   ;;
45667 esac
45668 fi
45669 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45670 if test -n "$BUILD_OBJCOPY"; then
45671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45672 $as_echo "$BUILD_OBJCOPY" >&6; }
45673 else
45674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45675 $as_echo "no" >&6; }
45676 fi
45677 
45678 
45679           if test "x$BUILD_OBJCOPY" = x; then
45680             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45681           fi
45682         else
45683           # Otherwise we believe it is a complete path. Use it as it is.
45684           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45685 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45686           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45687 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45688           if test ! -x "$tool_specified"; then
45689             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45690 $as_echo "not found" >&6; }
45691             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45692           fi
45693           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45694 $as_echo "$tool_specified" >&6; }
45695         fi
45696       fi
45697     fi
45698 
45699   fi
45700 
45701 
45702 
45703   # Only process if variable expands to non-empty
45704 
45705   if test "x$BUILD_OBJCOPY" != x; then
45706     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45707 
45708   # First separate the path from the arguments. This will split at the first
45709   # space.
45710   complete="$BUILD_OBJCOPY"
45711   path="${complete%% *}"
45712   tmp="$complete EOL"
45713   arguments="${tmp#* }"
45714 
45715   # Input might be given as Windows format, start by converting to
45716   # unix format.
45717   new_path=`$CYGPATH -u "$path"`
45718 
45719   # Now try to locate executable using which
45720   new_path=`$WHICH "$new_path" 2> /dev/null`
45721   # bat and cmd files are not always considered executable in cygwin causing which
45722   # to not find them
45723   if test "x$new_path" = x \
45724       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45725       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45726     new_path=`$CYGPATH -u "$path"`
45727   fi
45728   if test "x$new_path" = x; then
45729     # Oops. Which didn't find the executable.
45730     # The splitting of arguments from the executable at a space might have been incorrect,
45731     # since paths with space are more likely in Windows. Give it another try with the whole
45732     # argument.
45733     path="$complete"
45734     arguments="EOL"
45735     new_path=`$CYGPATH -u "$path"`
45736     new_path=`$WHICH "$new_path" 2> /dev/null`
45737     # bat and cmd files are not always considered executable in cygwin causing which
45738     # to not find them
45739     if test "x$new_path" = x \
45740         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45741         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45742       new_path=`$CYGPATH -u "$path"`
45743     fi
45744     if test "x$new_path" = x; then
45745       # It's still not found. Now this is an unrecoverable error.
45746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45747 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45748       has_space=`$ECHO "$complete" | $GREP " "`
45749       if test "x$has_space" != x; then
45750         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45751 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45752       fi
45753       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45754     fi
45755   fi
45756 
45757   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45758   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45759   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45760   # "foo.exe" is OK but "foo" is an error.
45761   #
45762   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45763   # It is also a way to make sure we got the proper file name for the real test later on.
45764   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45765   if test "x$test_shortpath" = x; then
45766     # Short path failed, file does not exist as specified.
45767     # Try adding .exe or .cmd
45768     if test -f "${new_path}.exe"; then
45769       input_to_shortpath="${new_path}.exe"
45770     elif test -f "${new_path}.cmd"; then
45771       input_to_shortpath="${new_path}.cmd"
45772     else
45773       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45774 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45775       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45776 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45777       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45778     fi
45779   else
45780     input_to_shortpath="$new_path"
45781   fi
45782 
45783   # Call helper function which possibly converts this using DOS-style short mode.
45784   # If so, the updated path is stored in $new_path.
45785   new_path="$input_to_shortpath"
45786 
45787   input_path="$input_to_shortpath"
45788   # Check if we need to convert this using DOS-style short mode. If the path
45789   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45790   # take no chances and rewrite it.
45791   # Note: m4 eats our [], so we need to use [ and ] instead.
45792   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45793   if test "x$has_forbidden_chars" != x; then
45794     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45795     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45796     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45797     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45798       # Going to short mode and back again did indeed matter. Since short mode is
45799       # case insensitive, let's make it lowercase to improve readability.
45800       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45801       # Now convert it back to Unix-style (cygpath)
45802       input_path=`$CYGPATH -u "$shortmode_path"`
45803       new_path="$input_path"
45804     fi
45805   fi
45806 
45807   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45808   if test "x$test_cygdrive_prefix" = x; then
45809     # As a simple fix, exclude /usr/bin since it's not a real path.
45810     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45811       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45812       # a path prefixed by /cygdrive for fixpath to work.
45813       new_path="$CYGWIN_ROOT_PATH$input_path"
45814     fi
45815   fi
45816 
45817   # remove trailing .exe if any
45818   new_path="${new_path/%.exe/}"
45819 
45820     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45821 
45822   # First separate the path from the arguments. This will split at the first
45823   # space.
45824   complete="$BUILD_OBJCOPY"
45825   path="${complete%% *}"
45826   tmp="$complete EOL"
45827   arguments="${tmp#* }"
45828 
45829   # Input might be given as Windows format, start by converting to
45830   # unix format.
45831   new_path="$path"
45832 
45833   windows_path="$new_path"
45834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45835     unix_path=`$CYGPATH -u "$windows_path"`
45836     new_path="$unix_path"
45837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45838     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45839     new_path="$unix_path"
45840   fi
45841 
45842 
45843   # Now try to locate executable using which
45844   new_path=`$WHICH "$new_path" 2> /dev/null`
45845 
45846   if test "x$new_path" = x; then
45847     # Oops. Which didn't find the executable.
45848     # The splitting of arguments from the executable at a space might have been incorrect,
45849     # since paths with space are more likely in Windows. Give it another try with the whole
45850     # argument.
45851     path="$complete"
45852     arguments="EOL"
45853     new_path="$path"
45854 
45855   windows_path="$new_path"
45856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45857     unix_path=`$CYGPATH -u "$windows_path"`
45858     new_path="$unix_path"
45859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45860     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45861     new_path="$unix_path"
45862   fi
45863 
45864 
45865     new_path=`$WHICH "$new_path" 2> /dev/null`
45866     # bat and cmd files are not always considered executable in MSYS causing which
45867     # to not find them
45868     if test "x$new_path" = x \
45869         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45870         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45871       new_path="$path"
45872 
45873   windows_path="$new_path"
45874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45875     unix_path=`$CYGPATH -u "$windows_path"`
45876     new_path="$unix_path"
45877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45879     new_path="$unix_path"
45880   fi
45881 
45882     fi
45883 
45884     if test "x$new_path" = x; then
45885       # It's still not found. Now this is an unrecoverable error.
45886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45887 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45888       has_space=`$ECHO "$complete" | $GREP " "`
45889       if test "x$has_space" != x; then
45890         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45891 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45892       fi
45893       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45894     fi
45895   fi
45896 
45897   # Now new_path has a complete unix path to the binary
45898   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45899     # Keep paths in /bin as-is, but remove trailing .exe if any
45900     new_path="${new_path/%.exe/}"
45901     # Do not save /bin paths to all_fixpath_prefixes!
45902   else
45903     # Not in mixed or Windows style, start by that.
45904     new_path=`cmd //c echo $new_path`
45905 
45906   input_path="$new_path"
45907   # Check if we need to convert this using DOS-style short mode. If the path
45908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45909   # take no chances and rewrite it.
45910   # Note: m4 eats our [], so we need to use [ and ] instead.
45911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45912   if test "x$has_forbidden_chars" != x; then
45913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45914     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45915   fi
45916 
45917     # Output is in $new_path
45918 
45919   windows_path="$new_path"
45920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45921     unix_path=`$CYGPATH -u "$windows_path"`
45922     new_path="$unix_path"
45923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45925     new_path="$unix_path"
45926   fi
45927 
45928     # remove trailing .exe if any
45929     new_path="${new_path/%.exe/}"
45930 
45931     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45932     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45933   fi
45934 
45935     else
45936       # We're on a unix platform. Hooray! :)
45937       # First separate the path from the arguments. This will split at the first
45938       # space.
45939       complete="$BUILD_OBJCOPY"
45940       path="${complete%% *}"
45941       tmp="$complete EOL"
45942       arguments="${tmp#* }"
45943 
45944       # Cannot rely on the command "which" here since it doesn't always work.
45945       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45946       if test -z "$is_absolute_path"; then
45947         # Path to executable is not absolute. Find it.
45948         IFS_save="$IFS"
45949         IFS=:
45950         for p in $PATH; do
45951           if test -f "$p/$path" && test -x "$p/$path"; then
45952             new_path="$p/$path"
45953             break
45954           fi
45955         done
45956         IFS="$IFS_save"
45957       else
45958         # This is an absolute path, we can use it without further modifications.
45959         new_path="$path"
45960       fi
45961 
45962       if test "x$new_path" = x; then
45963         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45964 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45965         has_space=`$ECHO "$complete" | $GREP " "`
45966         if test "x$has_space" != x; then
45967           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45968 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45969         fi
45970         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45971       fi
45972     fi
45973 
45974     # Now join together the path and the arguments once again
45975     if test "x$arguments" != xEOL; then
45976       new_complete="$new_path ${arguments% *}"
45977     else
45978       new_complete="$new_path"
45979     fi
45980 
45981     if test "x$complete" != "x$new_complete"; then
45982       BUILD_OBJCOPY="$new_complete"
45983       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45984 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45985     fi
45986   fi
45987 
45988 
45989 
45990   # Publish this variable in the help.
45991 
45992 
45993   if [ -z "${BUILD_STRIP+x}" ]; then
45994     # The variable is not set by user, try to locate tool using the code snippet
45995     for ac_prog in strip
45996 do
45997   # Extract the first word of "$ac_prog", so it can be a program name with args.
45998 set dummy $ac_prog; ac_word=$2
45999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46000 $as_echo_n "checking for $ac_word... " >&6; }
46001 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46002   $as_echo_n "(cached) " >&6
46003 else
46004   case $BUILD_STRIP in
46005   [\\/]* | ?:[\\/]*)
46006   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46007   ;;
46008   *)
46009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46010 for as_dir in $PATH
46011 do
46012   IFS=$as_save_IFS
46013   test -z "$as_dir" && as_dir=.
46014     for ac_exec_ext in '' $ac_executable_extensions; do
46015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46016     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46018     break 2
46019   fi
46020 done
46021   done
46022 IFS=$as_save_IFS
46023 
46024   ;;
46025 esac
46026 fi
46027 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46028 if test -n "$BUILD_STRIP"; then
46029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46030 $as_echo "$BUILD_STRIP" >&6; }
46031 else
46032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46033 $as_echo "no" >&6; }
46034 fi
46035 
46036 
46037   test -n "$BUILD_STRIP" && break
46038 done
46039 
46040   else
46041     # The variable is set, but is it from the command line or the environment?
46042 
46043     # Try to remove the string !BUILD_STRIP! from our list.
46044     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46045     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46046       # If it failed, the variable was not from the command line. Ignore it,
46047       # but warn the user (except for BASH, which is always set by the calling BASH).
46048       if test "xBUILD_STRIP" != xBASH; then
46049         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46050 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46051       fi
46052       # Try to locate tool using the code snippet
46053       for ac_prog in strip
46054 do
46055   # Extract the first word of "$ac_prog", so it can be a program name with args.
46056 set dummy $ac_prog; ac_word=$2
46057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46058 $as_echo_n "checking for $ac_word... " >&6; }
46059 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46060   $as_echo_n "(cached) " >&6
46061 else
46062   case $BUILD_STRIP in
46063   [\\/]* | ?:[\\/]*)
46064   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46065   ;;
46066   *)
46067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46068 for as_dir in $PATH
46069 do
46070   IFS=$as_save_IFS
46071   test -z "$as_dir" && as_dir=.
46072     for ac_exec_ext in '' $ac_executable_extensions; do
46073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46074     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46076     break 2
46077   fi
46078 done
46079   done
46080 IFS=$as_save_IFS
46081 
46082   ;;
46083 esac
46084 fi
46085 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46086 if test -n "$BUILD_STRIP"; then
46087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46088 $as_echo "$BUILD_STRIP" >&6; }
46089 else
46090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46091 $as_echo "no" >&6; }
46092 fi
46093 
46094 
46095   test -n "$BUILD_STRIP" && break
46096 done
46097 
46098     else
46099       # If it succeeded, then it was overridden by the user. We will use it
46100       # for the tool.
46101 
46102       # First remove it from the list of overridden variables, so we can test
46103       # for unknown variables in the end.
46104       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46105 
46106       # Check if we try to supply an empty value
46107       if test "x$BUILD_STRIP" = x; then
46108         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46109 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46110         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46111 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46112         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46113 $as_echo "disabled" >&6; }
46114       else
46115         # Check if the provided tool contains a complete path.
46116         tool_specified="$BUILD_STRIP"
46117         tool_basename="${tool_specified##*/}"
46118         if test "x$tool_basename" = "x$tool_specified"; then
46119           # A command without a complete path is provided, search $PATH.
46120           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46121 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46122           # Extract the first word of "$tool_basename", so it can be a program name with args.
46123 set dummy $tool_basename; ac_word=$2
46124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46125 $as_echo_n "checking for $ac_word... " >&6; }
46126 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46127   $as_echo_n "(cached) " >&6
46128 else
46129   case $BUILD_STRIP in
46130   [\\/]* | ?:[\\/]*)
46131   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46132   ;;
46133   *)
46134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46135 for as_dir in $PATH
46136 do
46137   IFS=$as_save_IFS
46138   test -z "$as_dir" && as_dir=.
46139     for ac_exec_ext in '' $ac_executable_extensions; do
46140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46141     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46143     break 2
46144   fi
46145 done
46146   done
46147 IFS=$as_save_IFS
46148 
46149   ;;
46150 esac
46151 fi
46152 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46153 if test -n "$BUILD_STRIP"; then
46154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46155 $as_echo "$BUILD_STRIP" >&6; }
46156 else
46157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46158 $as_echo "no" >&6; }
46159 fi
46160 
46161 
46162           if test "x$BUILD_STRIP" = x; then
46163             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46164           fi
46165         else
46166           # Otherwise we believe it is a complete path. Use it as it is.
46167           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46168 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46169           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46170 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46171           if test ! -x "$tool_specified"; then
46172             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46173 $as_echo "not found" >&6; }
46174             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46175           fi
46176           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46177 $as_echo "$tool_specified" >&6; }
46178         fi
46179       fi
46180     fi
46181 
46182   fi
46183 
46184 
46185 
46186   # Only process if variable expands to non-empty
46187 
46188   if test "x$BUILD_STRIP" != x; then
46189     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46190 
46191   # First separate the path from the arguments. This will split at the first
46192   # space.
46193   complete="$BUILD_STRIP"
46194   path="${complete%% *}"
46195   tmp="$complete EOL"
46196   arguments="${tmp#* }"
46197 
46198   # Input might be given as Windows format, start by converting to
46199   # unix format.
46200   new_path=`$CYGPATH -u "$path"`
46201 
46202   # Now try to locate executable using which
46203   new_path=`$WHICH "$new_path" 2> /dev/null`
46204   # bat and cmd files are not always considered executable in cygwin causing which
46205   # to not find them
46206   if test "x$new_path" = x \
46207       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46208       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46209     new_path=`$CYGPATH -u "$path"`
46210   fi
46211   if test "x$new_path" = x; then
46212     # Oops. Which didn't find the executable.
46213     # The splitting of arguments from the executable at a space might have been incorrect,
46214     # since paths with space are more likely in Windows. Give it another try with the whole
46215     # argument.
46216     path="$complete"
46217     arguments="EOL"
46218     new_path=`$CYGPATH -u "$path"`
46219     new_path=`$WHICH "$new_path" 2> /dev/null`
46220     # bat and cmd files are not always considered executable in cygwin causing which
46221     # to not find them
46222     if test "x$new_path" = x \
46223         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46224         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46225       new_path=`$CYGPATH -u "$path"`
46226     fi
46227     if test "x$new_path" = x; then
46228       # It's still not found. Now this is an unrecoverable error.
46229       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46230 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46231       has_space=`$ECHO "$complete" | $GREP " "`
46232       if test "x$has_space" != x; then
46233         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46234 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46235       fi
46236       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46237     fi
46238   fi
46239 
46240   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46241   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46242   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46243   # "foo.exe" is OK but "foo" is an error.
46244   #
46245   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46246   # It is also a way to make sure we got the proper file name for the real test later on.
46247   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46248   if test "x$test_shortpath" = x; then
46249     # Short path failed, file does not exist as specified.
46250     # Try adding .exe or .cmd
46251     if test -f "${new_path}.exe"; then
46252       input_to_shortpath="${new_path}.exe"
46253     elif test -f "${new_path}.cmd"; then
46254       input_to_shortpath="${new_path}.cmd"
46255     else
46256       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46257 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46258       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46259 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46260       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46261     fi
46262   else
46263     input_to_shortpath="$new_path"
46264   fi
46265 
46266   # Call helper function which possibly converts this using DOS-style short mode.
46267   # If so, the updated path is stored in $new_path.
46268   new_path="$input_to_shortpath"
46269 
46270   input_path="$input_to_shortpath"
46271   # Check if we need to convert this using DOS-style short mode. If the path
46272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46273   # take no chances and rewrite it.
46274   # Note: m4 eats our [], so we need to use [ and ] instead.
46275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46276   if test "x$has_forbidden_chars" != x; then
46277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46278     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46279     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46280     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46281       # Going to short mode and back again did indeed matter. Since short mode is
46282       # case insensitive, let's make it lowercase to improve readability.
46283       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46284       # Now convert it back to Unix-style (cygpath)
46285       input_path=`$CYGPATH -u "$shortmode_path"`
46286       new_path="$input_path"
46287     fi
46288   fi
46289 
46290   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46291   if test "x$test_cygdrive_prefix" = x; then
46292     # As a simple fix, exclude /usr/bin since it's not a real path.
46293     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46294       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46295       # a path prefixed by /cygdrive for fixpath to work.
46296       new_path="$CYGWIN_ROOT_PATH$input_path"
46297     fi
46298   fi
46299 
46300   # remove trailing .exe if any
46301   new_path="${new_path/%.exe/}"
46302 
46303     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46304 
46305   # First separate the path from the arguments. This will split at the first
46306   # space.
46307   complete="$BUILD_STRIP"
46308   path="${complete%% *}"
46309   tmp="$complete EOL"
46310   arguments="${tmp#* }"
46311 
46312   # Input might be given as Windows format, start by converting to
46313   # unix format.
46314   new_path="$path"
46315 
46316   windows_path="$new_path"
46317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46318     unix_path=`$CYGPATH -u "$windows_path"`
46319     new_path="$unix_path"
46320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46322     new_path="$unix_path"
46323   fi
46324 
46325 
46326   # Now try to locate executable using which
46327   new_path=`$WHICH "$new_path" 2> /dev/null`
46328 
46329   if test "x$new_path" = x; then
46330     # Oops. Which didn't find the executable.
46331     # The splitting of arguments from the executable at a space might have been incorrect,
46332     # since paths with space are more likely in Windows. Give it another try with the whole
46333     # argument.
46334     path="$complete"
46335     arguments="EOL"
46336     new_path="$path"
46337 
46338   windows_path="$new_path"
46339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46340     unix_path=`$CYGPATH -u "$windows_path"`
46341     new_path="$unix_path"
46342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46344     new_path="$unix_path"
46345   fi
46346 
46347 
46348     new_path=`$WHICH "$new_path" 2> /dev/null`
46349     # bat and cmd files are not always considered executable in MSYS causing which
46350     # to not find them
46351     if test "x$new_path" = x \
46352         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46353         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46354       new_path="$path"
46355 
46356   windows_path="$new_path"
46357   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46358     unix_path=`$CYGPATH -u "$windows_path"`
46359     new_path="$unix_path"
46360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46361     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46362     new_path="$unix_path"
46363   fi
46364 
46365     fi
46366 
46367     if test "x$new_path" = x; then
46368       # It's still not found. Now this is an unrecoverable error.
46369       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46370 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46371       has_space=`$ECHO "$complete" | $GREP " "`
46372       if test "x$has_space" != x; then
46373         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46374 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46375       fi
46376       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46377     fi
46378   fi
46379 
46380   # Now new_path has a complete unix path to the binary
46381   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46382     # Keep paths in /bin as-is, but remove trailing .exe if any
46383     new_path="${new_path/%.exe/}"
46384     # Do not save /bin paths to all_fixpath_prefixes!
46385   else
46386     # Not in mixed or Windows style, start by that.
46387     new_path=`cmd //c echo $new_path`
46388 
46389   input_path="$new_path"
46390   # Check if we need to convert this using DOS-style short mode. If the path
46391   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46392   # take no chances and rewrite it.
46393   # Note: m4 eats our [], so we need to use [ and ] instead.
46394   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46395   if test "x$has_forbidden_chars" != x; then
46396     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46397     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46398   fi
46399 
46400     # Output is in $new_path
46401 
46402   windows_path="$new_path"
46403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46404     unix_path=`$CYGPATH -u "$windows_path"`
46405     new_path="$unix_path"
46406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46407     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46408     new_path="$unix_path"
46409   fi
46410 
46411     # remove trailing .exe if any
46412     new_path="${new_path/%.exe/}"
46413 
46414     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46415     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46416   fi
46417 
46418     else
46419       # We're on a unix platform. Hooray! :)
46420       # First separate the path from the arguments. This will split at the first
46421       # space.
46422       complete="$BUILD_STRIP"
46423       path="${complete%% *}"
46424       tmp="$complete EOL"
46425       arguments="${tmp#* }"
46426 
46427       # Cannot rely on the command "which" here since it doesn't always work.
46428       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46429       if test -z "$is_absolute_path"; then
46430         # Path to executable is not absolute. Find it.
46431         IFS_save="$IFS"
46432         IFS=:
46433         for p in $PATH; do
46434           if test -f "$p/$path" && test -x "$p/$path"; then
46435             new_path="$p/$path"
46436             break
46437           fi
46438         done
46439         IFS="$IFS_save"
46440       else
46441         # This is an absolute path, we can use it without further modifications.
46442         new_path="$path"
46443       fi
46444 
46445       if test "x$new_path" = x; then
46446         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46447 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46448         has_space=`$ECHO "$complete" | $GREP " "`
46449         if test "x$has_space" != x; then
46450           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46451 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46452         fi
46453         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46454       fi
46455     fi
46456 
46457     # Now join together the path and the arguments once again
46458     if test "x$arguments" != xEOL; then
46459       new_complete="$new_path ${arguments% *}"
46460     else
46461       new_complete="$new_path"
46462     fi
46463 
46464     if test "x$complete" != "x$new_complete"; then
46465       BUILD_STRIP="$new_complete"
46466       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46467 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46468     fi
46469   fi
46470 
46471     # Assume the C compiler is the assembler
46472     BUILD_AS="$BUILD_CC -c"
46473     # Just like for the target compiler, use the compiler as linker
46474     BUILD_LD="$BUILD_CC"
46475     BUILD_LDCXX="$BUILD_CXX"
46476 
46477     PATH="$OLDPATH"
46478   else
46479     # If we are not cross compiling, use the normal target compilers for
46480     # building the build platform executables.
46481     BUILD_CC="$CC"
46482     BUILD_CXX="$CXX"
46483     BUILD_LD="$LD"
46484     BUILD_LDCXX="$LDCXX"
46485     BUILD_NM="$NM"
46486     BUILD_AS="$AS"
46487     BUILD_OBJCOPY="$OBJCOPY"
46488     BUILD_STRIP="$STRIP"
46489     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46490     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46491     BUILD_AR="$AR"
46492   fi
46493 
46494 
46495 
46496 
46497 
46498 
46499 
46500 
46501 
46502 
46503 
46504 
46505   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46506     # For hotspot, we need these in Windows mixed path,
46507     # so rewrite them all. Need added .exe suffix.
46508     HOTSPOT_CXX="$CXX.exe"
46509     HOTSPOT_LD="$LD.exe"
46510     HOTSPOT_MT="$MT.exe"
46511     HOTSPOT_RC="$RC.exe"
46512 
46513   unix_path="$HOTSPOT_CXX"
46514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46515     windows_path=`$CYGPATH -m "$unix_path"`
46516     HOTSPOT_CXX="$windows_path"
46517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46518     windows_path=`cmd //c echo $unix_path`
46519     HOTSPOT_CXX="$windows_path"
46520   fi
46521 
46522 
46523   unix_path="$HOTSPOT_LD"
46524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46525     windows_path=`$CYGPATH -m "$unix_path"`
46526     HOTSPOT_LD="$windows_path"
46527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46528     windows_path=`cmd //c echo $unix_path`
46529     HOTSPOT_LD="$windows_path"
46530   fi
46531 
46532 
46533   unix_path="$HOTSPOT_MT"
46534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46535     windows_path=`$CYGPATH -m "$unix_path"`
46536     HOTSPOT_MT="$windows_path"
46537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46538     windows_path=`cmd //c echo $unix_path`
46539     HOTSPOT_MT="$windows_path"
46540   fi
46541 
46542 
46543   unix_path="$HOTSPOT_RC"
46544   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46545     windows_path=`$CYGPATH -m "$unix_path"`
46546     HOTSPOT_RC="$windows_path"
46547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46548     windows_path=`cmd //c echo $unix_path`
46549     HOTSPOT_RC="$windows_path"
46550   fi
46551 
46552 
46553 
46554   else
46555     HOTSPOT_CXX="$CXX"
46556     HOTSPOT_LD="$LD"
46557   fi
46558 
46559 
46560 
46561   if test  "x$TOOLCHAIN_TYPE" = xclang; then
46562     USE_CLANG=true
46563   fi
46564 
46565 
46566 
46567 
46568 
46569   # The package path is used only on macosx?
46570   # FIXME: clean this up, and/or move it elsewhere.
46571   PACKAGE_PATH=/opt/local
46572 
46573 
46574   # Check for extra potential brokenness.
46575   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46576     # On Windows, double-check that we got the right compiler.
46577     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46578     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46579     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46580       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46581         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
46582       fi
46583     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46584       if test "x$COMPILER_CPU_TEST" != "xx64"; then
46585         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46586       fi
46587     fi
46588   fi
46589 
46590   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46591     # If this is a --hash-style=gnu system, use --hash-style=both, why?
46592     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46593     # This is later checked when setting flags.
46594 
46595     # "-Og" suppported for GCC 4.8 and later
46596     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46597 
46598 
46599 
46600 
46601 
46602 
46603 
46604 
46605 
46606 
46607 
46608 
46609 
46610 
46611 
46612 
46613 
46614 
46615 
46616 
46617 
46618 
46619 
46620 
46621 
46622 
46623 
46624 
46625 
46626 
46627 
46628 
46629 
46630 
46631 
46632 
46633 
46634 
46635 
46636 
46637 
46638 
46639 
46640 
46641 
46642 
46643 
46644     # Execute function body
46645 
46646 
46647 
46648 
46649 
46650 
46651 
46652 
46653 
46654 
46655 
46656 
46657 
46658 
46659 
46660 
46661 
46662 
46663 
46664 
46665 
46666 
46667 
46668 
46669 
46670 
46671 
46672 
46673 
46674 
46675 
46676 
46677 
46678 
46679 
46680 
46681 
46682 
46683 
46684 
46685 
46686 
46687 
46688 
46689 
46690 
46691 
46692 
46693     # Execute function body
46694 
46695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46696 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46697   supports=yes
46698 
46699   saved_cflags="$CFLAGS"
46700   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46701   ac_ext=c
46702 ac_cpp='$CPP $CPPFLAGS'
46703 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46704 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46705 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46706 
46707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46708 /* end confdefs.h.  */
46709 int i;
46710 _ACEOF
46711 if ac_fn_c_try_compile "$LINENO"; then :
46712 
46713 else
46714   supports=no
46715 fi
46716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46717   ac_ext=cpp
46718 ac_cpp='$CXXCPP $CPPFLAGS'
46719 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46720 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46721 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46722 
46723   CFLAGS="$saved_cflags"
46724 
46725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46726 $as_echo "$supports" >&6; }
46727   if test "x$supports" = "xyes" ; then
46728     :
46729     C_COMP_SUPPORTS="yes"
46730   else
46731     :
46732     C_COMP_SUPPORTS="no"
46733   fi
46734 
46735 
46736 
46737 
46738 
46739 
46740 
46741 
46742 
46743 
46744 
46745 
46746 
46747 
46748 
46749 
46750 
46751 
46752 
46753 
46754 
46755 
46756 
46757 
46758 
46759 
46760 
46761 
46762 
46763 
46764 
46765 
46766 
46767 
46768 
46769 
46770 
46771 
46772 
46773 
46774 
46775 
46776 
46777 
46778 
46779 
46780 
46781 
46782 
46783 
46784 
46785 
46786 
46787 
46788 
46789 
46790 
46791 
46792 
46793     # Execute function body
46794 
46795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46796 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46797   supports=yes
46798 
46799   saved_cxxflags="$CXXFLAGS"
46800   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46801   ac_ext=cpp
46802 ac_cpp='$CXXCPP $CPPFLAGS'
46803 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46804 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46805 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46806 
46807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46808 /* end confdefs.h.  */
46809 int i;
46810 _ACEOF
46811 if ac_fn_cxx_try_compile "$LINENO"; then :
46812 
46813 else
46814   supports=no
46815 fi
46816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46817   ac_ext=cpp
46818 ac_cpp='$CXXCPP $CPPFLAGS'
46819 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46820 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46821 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46822 
46823   CXXFLAGS="$saved_cxxflags"
46824 
46825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46826 $as_echo "$supports" >&6; }
46827   if test "x$supports" = "xyes" ; then
46828     :
46829     CXX_COMP_SUPPORTS="yes"
46830   else
46831     :
46832     CXX_COMP_SUPPORTS="no"
46833   fi
46834 
46835 
46836 
46837 
46838 
46839 
46840 
46841 
46842 
46843 
46844 
46845 
46846 
46847   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46848 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46849   supports=no
46850   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46851 
46852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46853 $as_echo "$supports" >&6; }
46854   if test "x$supports" = "xyes" ; then
46855     :
46856     HAS_CFLAG_OPTIMIZE_DEBUG=true
46857   else
46858     :
46859     HAS_CFLAG_OPTIMIZE_DEBUG=false
46860   fi
46861 
46862 
46863 
46864 
46865 
46866 
46867 
46868     # "-z relro" supported in GNU binutils 2.17 and later
46869     LINKER_RELRO_FLAG="-Wl,-z,relro"
46870 
46871 
46872 
46873 
46874 
46875 
46876 
46877 
46878 
46879 
46880 
46881 
46882 
46883 
46884 
46885 
46886 
46887 
46888 
46889 
46890 
46891 
46892 
46893 
46894 
46895 
46896 
46897 
46898 
46899 
46900 
46901 
46902 
46903 
46904 
46905 
46906 
46907 
46908 
46909 
46910 
46911 
46912 
46913 
46914 
46915 
46916 
46917     # Execute function body
46918 
46919   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46920 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46921   supports=yes
46922 
46923   saved_ldflags="$LDFLAGS"
46924   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46925   ac_ext=c
46926 ac_cpp='$CPP $CPPFLAGS'
46927 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46928 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46929 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46930 
46931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46932 /* end confdefs.h.  */
46933 
46934 int
46935 main ()
46936 {
46937 
46938   ;
46939   return 0;
46940 }
46941 _ACEOF
46942 if ac_fn_c_try_link "$LINENO"; then :
46943 
46944 else
46945   supports=no
46946 fi
46947 rm -f core conftest.err conftest.$ac_objext \
46948     conftest$ac_exeext conftest.$ac_ext
46949   ac_ext=cpp
46950 ac_cpp='$CXXCPP $CPPFLAGS'
46951 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46952 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46953 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46954 
46955   LDFLAGS="$saved_ldflags"
46956 
46957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46958 $as_echo "$supports" >&6; }
46959   if test "x$supports" = "xyes" ; then
46960     :
46961     HAS_LINKER_RELRO=true
46962   else
46963     :
46964     HAS_LINKER_RELRO=false
46965   fi
46966 
46967 
46968 
46969 
46970 
46971 
46972 
46973 
46974 
46975 
46976 
46977 
46978 
46979     # "-z now" supported in GNU binutils 2.11 and later
46980     LINKER_NOW_FLAG="-Wl,-z,now"
46981 
46982 
46983 
46984 
46985 
46986 
46987 
46988 
46989 
46990 
46991 
46992 
46993 
46994 
46995 
46996 
46997 
46998 
46999 
47000 
47001 
47002 
47003 
47004 
47005 
47006 
47007 
47008 
47009 
47010 
47011 
47012 
47013 
47014 
47015 
47016 
47017 
47018 
47019 
47020 
47021 
47022 
47023 
47024 
47025 
47026 
47027 
47028     # Execute function body
47029 
47030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47031 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47032   supports=yes
47033 
47034   saved_ldflags="$LDFLAGS"
47035   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47036   ac_ext=c
47037 ac_cpp='$CPP $CPPFLAGS'
47038 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47039 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47040 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47041 
47042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47043 /* end confdefs.h.  */
47044 
47045 int
47046 main ()
47047 {
47048 
47049   ;
47050   return 0;
47051 }
47052 _ACEOF
47053 if ac_fn_c_try_link "$LINENO"; then :
47054 
47055 else
47056   supports=no
47057 fi
47058 rm -f core conftest.err conftest.$ac_objext \
47059     conftest$ac_exeext conftest.$ac_ext
47060   ac_ext=cpp
47061 ac_cpp='$CXXCPP $CPPFLAGS'
47062 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47063 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47064 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47065 
47066   LDFLAGS="$saved_ldflags"
47067 
47068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47069 $as_echo "$supports" >&6; }
47070   if test "x$supports" = "xyes" ; then
47071     :
47072     HAS_LINKER_NOW=true
47073   else
47074     :
47075     HAS_LINKER_NOW=false
47076   fi
47077 
47078 
47079 
47080 
47081 
47082 
47083 
47084 
47085 
47086 
47087 
47088 
47089   fi
47090 
47091   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47092   # in executable.'
47093   USING_BROKEN_SUSE_LD=no
47094   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47096 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47097     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47098     $ECHO "int main() { }" > main.c
47099     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47100       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47101 $as_echo "no" >&6; }
47102       USING_BROKEN_SUSE_LD=no
47103     else
47104       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47105 $as_echo "yes" >&6; }
47106       USING_BROKEN_SUSE_LD=yes
47107     fi
47108     rm -rf version-script.map main.c a.out
47109   fi
47110 
47111 
47112   # Setup hotspot lecagy names for toolchains
47113   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47114   if test "x$TOOLCHAIN_TYPE" = xclang; then
47115     HOTSPOT_TOOLCHAIN_TYPE=gcc
47116   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47117     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47118   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47119     HOTSPOT_TOOLCHAIN_TYPE=visCPP
47120   fi
47121 
47122 
47123 
47124 # Setup the JTReg Regression Test Harness.
47125 
47126 
47127 # Check whether --with-jtreg was given.
47128 if test "${with_jtreg+set}" = set; then :
47129   withval=$with_jtreg;
47130 else
47131   with_jtreg=no
47132 fi
47133 
47134 
47135   if test "x$with_jtreg" = xno; then
47136     # jtreg disabled
47137     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47138 $as_echo_n "checking for jtreg... " >&6; }
47139     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47140 $as_echo "no" >&6; }
47141   else
47142     if test "x$with_jtreg" != xyes; then
47143       # with path specified.
47144       JT_HOME="$with_jtreg"
47145     fi
47146 
47147     if test "x$JT_HOME" != x; then
47148       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47149 $as_echo_n "checking for jtreg... " >&6; }
47150 
47151       # use JT_HOME enviroment var.
47152 
47153   # Only process if variable expands to non-empty
47154 
47155   if test "x$JT_HOME" != x; then
47156     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47157 
47158   # Input might be given as Windows format, start by converting to
47159   # unix format.
47160   path="$JT_HOME"
47161   new_path=`$CYGPATH -u "$path"`
47162 
47163   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47164   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47165   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47166   # "foo.exe" is OK but "foo" is an error.
47167   #
47168   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47169   # It is also a way to make sure we got the proper file name for the real test later on.
47170   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47171   if test "x$test_shortpath" = x; then
47172     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47173 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47174     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47175   fi
47176 
47177   # Call helper function which possibly converts this using DOS-style short mode.
47178   # If so, the updated path is stored in $new_path.
47179 
47180   input_path="$new_path"
47181   # Check if we need to convert this using DOS-style short mode. If the path
47182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47183   # take no chances and rewrite it.
47184   # Note: m4 eats our [], so we need to use [ and ] instead.
47185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47186   if test "x$has_forbidden_chars" != x; then
47187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47188     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47189     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47190     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47191       # Going to short mode and back again did indeed matter. Since short mode is
47192       # case insensitive, let's make it lowercase to improve readability.
47193       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47194       # Now convert it back to Unix-style (cygpath)
47195       input_path=`$CYGPATH -u "$shortmode_path"`
47196       new_path="$input_path"
47197     fi
47198   fi
47199 
47200   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47201   if test "x$test_cygdrive_prefix" = x; then
47202     # As a simple fix, exclude /usr/bin since it's not a real path.
47203     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47204       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47205       # a path prefixed by /cygdrive for fixpath to work.
47206       new_path="$CYGWIN_ROOT_PATH$input_path"
47207     fi
47208   fi
47209 
47210 
47211   if test "x$path" != "x$new_path"; then
47212     JT_HOME="$new_path"
47213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47214 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47215   fi
47216 
47217     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47218 
47219   path="$JT_HOME"
47220   has_colon=`$ECHO $path | $GREP ^.:`
47221   new_path="$path"
47222   if test "x$has_colon" = x; then
47223     # Not in mixed or Windows style, start by that.
47224     new_path=`cmd //c echo $path`
47225   fi
47226 
47227 
47228   input_path="$new_path"
47229   # Check if we need to convert this using DOS-style short mode. If the path
47230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47231   # take no chances and rewrite it.
47232   # Note: m4 eats our [], so we need to use [ and ] instead.
47233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47234   if test "x$has_forbidden_chars" != x; then
47235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47236     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47237   fi
47238 
47239 
47240   windows_path="$new_path"
47241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47242     unix_path=`$CYGPATH -u "$windows_path"`
47243     new_path="$unix_path"
47244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47246     new_path="$unix_path"
47247   fi
47248 
47249   if test "x$path" != "x$new_path"; then
47250     JT_HOME="$new_path"
47251     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47252 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47253   fi
47254 
47255   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47256   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47257 
47258     else
47259       # We're on a unix platform. Hooray! :)
47260       path="$JT_HOME"
47261       has_space=`$ECHO "$path" | $GREP " "`
47262       if test "x$has_space" != x; then
47263         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47264 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47265         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47266       fi
47267 
47268       # Use eval to expand a potential ~
47269       eval path="$path"
47270       if test ! -f "$path" && test ! -d "$path"; then
47271         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47272       fi
47273 
47274       if test -d "$path"; then
47275         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47276       else
47277         dir="`$DIRNAME "$path"`"
47278         base="`$BASENAME "$path"`"
47279         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47280       fi
47281     fi
47282   fi
47283 
47284 
47285       # jtreg win32 script works for everybody
47286       JTREGEXE="$JT_HOME/bin/jtreg"
47287 
47288       if test ! -f "$JTREGEXE"; then
47289         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47290       fi
47291 
47292       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47293 $as_echo "$JTREGEXE" >&6; }
47294     else
47295       # try to find jtreg on path
47296 
47297 
47298 
47299   # Publish this variable in the help.
47300 
47301 
47302   if [ -z "${JTREGEXE+x}" ]; then
47303     # The variable is not set by user, try to locate tool using the code snippet
47304     for ac_prog in jtreg
47305 do
47306   # Extract the first word of "$ac_prog", so it can be a program name with args.
47307 set dummy $ac_prog; ac_word=$2
47308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47309 $as_echo_n "checking for $ac_word... " >&6; }
47310 if ${ac_cv_path_JTREGEXE+:} false; then :
47311   $as_echo_n "(cached) " >&6
47312 else
47313   case $JTREGEXE in
47314   [\\/]* | ?:[\\/]*)
47315   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47316   ;;
47317   *)
47318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47319 for as_dir in $PATH
47320 do
47321   IFS=$as_save_IFS
47322   test -z "$as_dir" && as_dir=.
47323     for ac_exec_ext in '' $ac_executable_extensions; do
47324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47325     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47327     break 2
47328   fi
47329 done
47330   done
47331 IFS=$as_save_IFS
47332 
47333   ;;
47334 esac
47335 fi
47336 JTREGEXE=$ac_cv_path_JTREGEXE
47337 if test -n "$JTREGEXE"; then
47338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47339 $as_echo "$JTREGEXE" >&6; }
47340 else
47341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47342 $as_echo "no" >&6; }
47343 fi
47344 
47345 
47346   test -n "$JTREGEXE" && break
47347 done
47348 
47349   else
47350     # The variable is set, but is it from the command line or the environment?
47351 
47352     # Try to remove the string !JTREGEXE! from our list.
47353     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47354     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47355       # If it failed, the variable was not from the command line. Ignore it,
47356       # but warn the user (except for BASH, which is always set by the calling BASH).
47357       if test "xJTREGEXE" != xBASH; then
47358         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47359 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47360       fi
47361       # Try to locate tool using the code snippet
47362       for ac_prog in jtreg
47363 do
47364   # Extract the first word of "$ac_prog", so it can be a program name with args.
47365 set dummy $ac_prog; ac_word=$2
47366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47367 $as_echo_n "checking for $ac_word... " >&6; }
47368 if ${ac_cv_path_JTREGEXE+:} false; then :
47369   $as_echo_n "(cached) " >&6
47370 else
47371   case $JTREGEXE in
47372   [\\/]* | ?:[\\/]*)
47373   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47374   ;;
47375   *)
47376   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47377 for as_dir in $PATH
47378 do
47379   IFS=$as_save_IFS
47380   test -z "$as_dir" && as_dir=.
47381     for ac_exec_ext in '' $ac_executable_extensions; do
47382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47383     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47385     break 2
47386   fi
47387 done
47388   done
47389 IFS=$as_save_IFS
47390 
47391   ;;
47392 esac
47393 fi
47394 JTREGEXE=$ac_cv_path_JTREGEXE
47395 if test -n "$JTREGEXE"; then
47396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47397 $as_echo "$JTREGEXE" >&6; }
47398 else
47399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47400 $as_echo "no" >&6; }
47401 fi
47402 
47403 
47404   test -n "$JTREGEXE" && break
47405 done
47406 
47407     else
47408       # If it succeeded, then it was overridden by the user. We will use it
47409       # for the tool.
47410 
47411       # First remove it from the list of overridden variables, so we can test
47412       # for unknown variables in the end.
47413       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47414 
47415       # Check if we try to supply an empty value
47416       if test "x$JTREGEXE" = x; then
47417         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47418 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47419         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47420 $as_echo_n "checking for JTREGEXE... " >&6; }
47421         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47422 $as_echo "disabled" >&6; }
47423       else
47424         # Check if the provided tool contains a complete path.
47425         tool_specified="$JTREGEXE"
47426         tool_basename="${tool_specified##*/}"
47427         if test "x$tool_basename" = "x$tool_specified"; then
47428           # A command without a complete path is provided, search $PATH.
47429           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47430 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47431           # Extract the first word of "$tool_basename", so it can be a program name with args.
47432 set dummy $tool_basename; ac_word=$2
47433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47434 $as_echo_n "checking for $ac_word... " >&6; }
47435 if ${ac_cv_path_JTREGEXE+:} false; then :
47436   $as_echo_n "(cached) " >&6
47437 else
47438   case $JTREGEXE in
47439   [\\/]* | ?:[\\/]*)
47440   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47441   ;;
47442   *)
47443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47444 for as_dir in $PATH
47445 do
47446   IFS=$as_save_IFS
47447   test -z "$as_dir" && as_dir=.
47448     for ac_exec_ext in '' $ac_executable_extensions; do
47449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47450     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47452     break 2
47453   fi
47454 done
47455   done
47456 IFS=$as_save_IFS
47457 
47458   ;;
47459 esac
47460 fi
47461 JTREGEXE=$ac_cv_path_JTREGEXE
47462 if test -n "$JTREGEXE"; then
47463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47464 $as_echo "$JTREGEXE" >&6; }
47465 else
47466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47467 $as_echo "no" >&6; }
47468 fi
47469 
47470 
47471           if test "x$JTREGEXE" = x; then
47472             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47473           fi
47474         else
47475           # Otherwise we believe it is a complete path. Use it as it is.
47476           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47477 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47478           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47479 $as_echo_n "checking for JTREGEXE... " >&6; }
47480           if test ! -x "$tool_specified"; then
47481             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47482 $as_echo "not found" >&6; }
47483             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47484           fi
47485           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47486 $as_echo "$tool_specified" >&6; }
47487         fi
47488       fi
47489     fi
47490 
47491   fi
47492 
47493 
47494 
47495   if test "x$JTREGEXE" = x; then
47496     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47497   fi
47498 
47499 
47500       JT_HOME="`$DIRNAME $JTREGEXE`"
47501     fi
47502   fi
47503 
47504 
47505 
47506 
47507 
47508 
47509   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47510   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47511   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47512   #                              commands produced by the link step (currently AIX only)
47513   if test "x$TOOLCHAIN_TYPE" = xxlc; then
47514     COMPILER_TARGET_BITS_FLAG="-q"
47515     COMPILER_COMMAND_FILE_FLAG="-f"
47516     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47517   else
47518     COMPILER_TARGET_BITS_FLAG="-m"
47519     COMPILER_COMMAND_FILE_FLAG="@"
47520     COMPILER_BINDCMD_FILE_FLAG=""
47521 
47522     # The solstudio linker does not support @-files.
47523     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47524       COMPILER_COMMAND_FILE_FLAG=
47525     fi
47526 
47527     # Check if @file is supported by gcc
47528     if test "x$TOOLCHAIN_TYPE" = xgcc; then
47529       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47530 $as_echo_n "checking if @file is supported by gcc... " >&6; }
47531       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47532       $ECHO "" "--version" > command.file
47533       if $CXX @command.file 2>&5 >&5; then
47534         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47535 $as_echo "yes" >&6; }
47536         COMPILER_COMMAND_FILE_FLAG="@"
47537       else
47538         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47539 $as_echo "no" >&6; }
47540         COMPILER_COMMAND_FILE_FLAG=
47541       fi
47542       rm -rf command.file
47543     fi
47544   fi
47545 
47546 
47547 
47548 
47549   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47550   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47551     ARFLAGS="-r"
47552   elif test "x$OPENJDK_TARGET_OS" = xaix; then
47553     ARFLAGS="-X64"
47554   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47555     # lib.exe is used as AR to create static libraries.
47556     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47557   else
47558     ARFLAGS=""
47559   fi
47560 
47561 
47562   ## Setup strip.
47563   # FIXME: should this really be per platform, or should it be per toolchain type?
47564   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47565   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47566   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47567     STRIPFLAGS="-g"
47568   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47569     STRIPFLAGS="-x"
47570   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47571     STRIPFLAGS="-S"
47572   elif test "x$OPENJDK_TARGET_OS" = xaix; then
47573     STRIPFLAGS="-X32_64"
47574   fi
47575 
47576 
47577 
47578   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47579     CC_OUT_OPTION=-Fo
47580     EXE_OUT_OPTION=-out:
47581     LD_OUT_OPTION=-out:
47582     AR_OUT_OPTION=-out:
47583   else
47584     # The option used to specify the target .o,.a or .so file.
47585     # When compiling, how to specify the to be created object file.
47586     CC_OUT_OPTION='-o$(SPACE)'
47587     # When linking, how to specify the to be created executable.
47588     EXE_OUT_OPTION='-o$(SPACE)'
47589     # When linking, how to specify the to be created dynamically linkable library.
47590     LD_OUT_OPTION='-o$(SPACE)'
47591     # When archiving, how to specify the to be create static archive for object files.
47592     AR_OUT_OPTION='rcs$(SPACE)'
47593   fi
47594 
47595 
47596 
47597 
47598 
47599   # On Windows, we need to set RC flags.
47600   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47601     RC_FLAGS="-nologo -l0x409"
47602     JVM_RCFLAGS="-nologo"
47603     if test "x$DEBUG_LEVEL" = xrelease; then
47604       RC_FLAGS="$RC_FLAGS -DNDEBUG"
47605       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47606     fi
47607 
47608     # The version variables used to create RC_FLAGS may be overridden
47609     # in a custom configure script, or possibly the command line.
47610     # Let those variables be expanded at make time in spec.gmk.
47611     # The \$ are escaped to the shell, and the $(...) variables
47612     # are evaluated by make.
47613     RC_FLAGS="$RC_FLAGS \
47614         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47615         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47616         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47617         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47618         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47619         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47620         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47621 
47622     JVM_RCFLAGS="$JVM_RCFLAGS \
47623         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47624         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47625         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47626         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47627         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47628         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47629         -D\"HS_FNAME=jvm.dll\" \
47630         -D\"HS_INTERNAL_NAME=jvm\""
47631   fi
47632 
47633 
47634 
47635   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47636     # silence copyright notice and other headers.
47637     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47638   fi
47639 
47640 
47641 # Now we can test some aspects on the target using configure macros.
47642 
47643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47644 $as_echo_n "checking for ANSI C header files... " >&6; }
47645 if ${ac_cv_header_stdc+:} false; then :
47646   $as_echo_n "(cached) " >&6
47647 else
47648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47649 /* end confdefs.h.  */
47650 #include <stdlib.h>
47651 #include <stdarg.h>
47652 #include <string.h>
47653 #include <float.h>
47654 
47655 int
47656 main ()
47657 {
47658 
47659   ;
47660   return 0;
47661 }
47662 _ACEOF
47663 if ac_fn_cxx_try_compile "$LINENO"; then :
47664   ac_cv_header_stdc=yes
47665 else
47666   ac_cv_header_stdc=no
47667 fi
47668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47669 
47670 if test $ac_cv_header_stdc = yes; then
47671   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47673 /* end confdefs.h.  */
47674 #include <string.h>
47675 
47676 _ACEOF
47677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47678   $EGREP "memchr" >/dev/null 2>&1; then :
47679 
47680 else
47681   ac_cv_header_stdc=no
47682 fi
47683 rm -f conftest*
47684 
47685 fi
47686 
47687 if test $ac_cv_header_stdc = yes; then
47688   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47690 /* end confdefs.h.  */
47691 #include <stdlib.h>
47692 
47693 _ACEOF
47694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47695   $EGREP "free" >/dev/null 2>&1; then :
47696 
47697 else
47698   ac_cv_header_stdc=no
47699 fi
47700 rm -f conftest*
47701 
47702 fi
47703 
47704 if test $ac_cv_header_stdc = yes; then
47705   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47706   if test "$cross_compiling" = yes; then :
47707   :
47708 else
47709   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47710 /* end confdefs.h.  */
47711 #include <ctype.h>
47712 #include <stdlib.h>
47713 #if ((' ' & 0x0FF) == 0x020)
47714 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47715 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47716 #else
47717 # define ISLOWER(c) \
47718                    (('a' <= (c) && (c) <= 'i') \
47719                      || ('j' <= (c) && (c) <= 'r') \
47720                      || ('s' <= (c) && (c) <= 'z'))
47721 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47722 #endif
47723 
47724 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47725 int
47726 main ()
47727 {
47728   int i;
47729   for (i = 0; i < 256; i++)
47730     if (XOR (islower (i), ISLOWER (i))
47731         || toupper (i) != TOUPPER (i))
47732       return 2;
47733   return 0;
47734 }
47735 _ACEOF
47736 if ac_fn_cxx_try_run "$LINENO"; then :
47737 
47738 else
47739   ac_cv_header_stdc=no
47740 fi
47741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47742   conftest.$ac_objext conftest.beam conftest.$ac_ext
47743 fi
47744 
47745 fi
47746 fi
47747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47748 $as_echo "$ac_cv_header_stdc" >&6; }
47749 if test $ac_cv_header_stdc = yes; then
47750 
47751 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
47752 
47753 fi
47754 
47755 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
47756 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47757                   inttypes.h stdint.h unistd.h
47758 do :
47759   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47760 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47761 "
47762 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47763   cat >>confdefs.h <<_ACEOF
47764 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47765 _ACEOF
47766 
47767 fi
47768 
47769 done
47770 
47771 
47772 
47773   ###############################################################################
47774   #
47775   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47776   # (The JVM can use 32 or 64 bit Java pointers but that decision
47777   # is made at runtime.)
47778   #
47779 
47780   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47781     # Always specify -m flag on Solaris
47782     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47783 
47784   # When we add flags to the "official" CFLAGS etc, we need to
47785   # keep track of these additions in ADDED_CFLAGS etc. These
47786   # will later be checked to make sure only controlled additions
47787   # have been made to CFLAGS etc.
47788   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47789   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47790   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47791 
47792   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47793   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47794   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47795 
47796   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47797   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47798   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47799 
47800   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47801   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47802   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47803 
47804   elif test "x$COMPILE_TYPE" = xreduced; then
47805     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47806       # Specify -m if running reduced on unix platforms
47807 
47808   # When we add flags to the "official" CFLAGS etc, we need to
47809   # keep track of these additions in ADDED_CFLAGS etc. These
47810   # will later be checked to make sure only controlled additions
47811   # have been made to CFLAGS etc.
47812   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47813   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47814   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47815 
47816   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47817   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47818   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47819 
47820   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47821   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47822   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47823 
47824   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47825   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47826   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47827 
47828     fi
47829   fi
47830   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47831     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47832     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47833     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47834   fi
47835 
47836   # Make compilation sanity check
47837   for ac_header in stdio.h
47838 do :
47839   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47840 if test "x$ac_cv_header_stdio_h" = xyes; then :
47841   cat >>confdefs.h <<_ACEOF
47842 #define HAVE_STDIO_H 1
47843 _ACEOF
47844 
47845 else
47846 
47847     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47848 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47849     if test "x$COMPILE_TYPE" = xreduced; then
47850 
47851   # Print a helpful message on how to acquire the necessary build dependency.
47852   # reduced is the help tag: freetype, cups, alsa etc
47853   MISSING_DEPENDENCY=reduced
47854 
47855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47856     cygwin_help $MISSING_DEPENDENCY
47857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47858     msys_help $MISSING_DEPENDENCY
47859   else
47860     PKGHANDLER_COMMAND=
47861 
47862     case $PKGHANDLER in
47863       apt-get)
47864         apt_help     $MISSING_DEPENDENCY ;;
47865       yum)
47866         yum_help     $MISSING_DEPENDENCY ;;
47867       port)
47868         port_help    $MISSING_DEPENDENCY ;;
47869       pkgutil)
47870         pkgutil_help $MISSING_DEPENDENCY ;;
47871       pkgadd)
47872         pkgadd_help  $MISSING_DEPENDENCY ;;
47873     esac
47874 
47875     if test "x$PKGHANDLER_COMMAND" != x; then
47876       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47877     fi
47878   fi
47879 
47880       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47881 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47882     elif test "x$COMPILE_TYPE" = xcross; then
47883       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47884 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47885     fi
47886     as_fn_error $? "Cannot continue." "$LINENO" 5
47887 
47888 fi
47889 
47890 done
47891 
47892 
47893   # The cast to long int works around a bug in the HP C Compiler
47894 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47895 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47896 # This bug is HP SR number 8606223364.
47897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47898 $as_echo_n "checking size of int *... " >&6; }
47899 if ${ac_cv_sizeof_int_p+:} false; then :
47900   $as_echo_n "(cached) " >&6
47901 else
47902   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47903 
47904 else
47905   if test "$ac_cv_type_int_p" = yes; then
47906      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47907 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47908 as_fn_error 77 "cannot compute sizeof (int *)
47909 See \`config.log' for more details" "$LINENO" 5; }
47910    else
47911      ac_cv_sizeof_int_p=0
47912    fi
47913 fi
47914 
47915 fi
47916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47917 $as_echo "$ac_cv_sizeof_int_p" >&6; }
47918 
47919 
47920 
47921 cat >>confdefs.h <<_ACEOF
47922 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
47923 _ACEOF
47924 
47925 
47926 
47927   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47928   if test "x$ac_cv_sizeof_int_p" = x; then
47929     # The test failed, lets stick to the assumed value.
47930     { $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
47931 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47932   else
47933     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47934 
47935     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47936       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47937       # Let's try to implicitely set the compilers target architecture and retry the test
47938       { $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
47939 $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;}
47940       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47941 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47942 
47943   # When we add flags to the "official" CFLAGS etc, we need to
47944   # keep track of these additions in ADDED_CFLAGS etc. These
47945   # will later be checked to make sure only controlled additions
47946   # have been made to CFLAGS etc.
47947   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47948   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47949   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47950 
47951   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47952   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47953   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47954 
47955   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47956   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47957   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47958 
47959   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47960   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47961   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47962 
47963 
47964       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47965       unset ac_cv_sizeof_int_p
47966       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47967       cat >>confdefs.h <<_ACEOF
47968 #undef SIZEOF_INT_P
47969 _ACEOF
47970 
47971       # The cast to long int works around a bug in the HP C Compiler
47972 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47973 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47974 # This bug is HP SR number 8606223364.
47975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47976 $as_echo_n "checking size of int *... " >&6; }
47977 if ${ac_cv_sizeof_int_p+:} false; then :
47978   $as_echo_n "(cached) " >&6
47979 else
47980   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47981 
47982 else
47983   if test "$ac_cv_type_int_p" = yes; then
47984      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47985 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47986 as_fn_error 77 "cannot compute sizeof (int *)
47987 See \`config.log' for more details" "$LINENO" 5; }
47988    else
47989      ac_cv_sizeof_int_p=0
47990    fi
47991 fi
47992 
47993 fi
47994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47995 $as_echo "$ac_cv_sizeof_int_p" >&6; }
47996 
47997 
47998 
47999 cat >>confdefs.h <<_ACEOF
48000 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48001 _ACEOF
48002 
48003 
48004 
48005       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48006 
48007       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48008         { $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
48009 $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;}
48010         if test "x$COMPILE_TYPE" = xreduced; then
48011 
48012   # Print a helpful message on how to acquire the necessary build dependency.
48013   # reduced is the help tag: freetype, cups, alsa etc
48014   MISSING_DEPENDENCY=reduced
48015 
48016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48017     cygwin_help $MISSING_DEPENDENCY
48018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48019     msys_help $MISSING_DEPENDENCY
48020   else
48021     PKGHANDLER_COMMAND=
48022 
48023     case $PKGHANDLER in
48024       apt-get)
48025         apt_help     $MISSING_DEPENDENCY ;;
48026       yum)
48027         yum_help     $MISSING_DEPENDENCY ;;
48028       port)
48029         port_help    $MISSING_DEPENDENCY ;;
48030       pkgutil)
48031         pkgutil_help $MISSING_DEPENDENCY ;;
48032       pkgadd)
48033         pkgadd_help  $MISSING_DEPENDENCY ;;
48034     esac
48035 
48036     if test "x$PKGHANDLER_COMMAND" != x; then
48037       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48038     fi
48039   fi
48040 
48041           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48042 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48043         elif test "x$COMPILE_TYPE" = xcross; then
48044           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48045 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48046         fi
48047         as_fn_error $? "Cannot continue." "$LINENO" 5
48048       fi
48049     fi
48050   fi
48051 
48052   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48053 $as_echo_n "checking for target address size... " >&6; }
48054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48055 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48056 
48057 
48058   ###############################################################################
48059   #
48060   # Is the target little of big endian?
48061   #
48062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48063 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48064 if ${ac_cv_c_bigendian+:} false; then :
48065   $as_echo_n "(cached) " >&6
48066 else
48067   ac_cv_c_bigendian=unknown
48068     # See if we're dealing with a universal compiler.
48069     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48070 /* end confdefs.h.  */
48071 #ifndef __APPLE_CC__
48072                not a universal capable compiler
48073              #endif
48074              typedef int dummy;
48075 
48076 _ACEOF
48077 if ac_fn_cxx_try_compile "$LINENO"; then :
48078 
48079         # Check for potential -arch flags.  It is not universal unless
48080         # there are at least two -arch flags with different values.
48081         ac_arch=
48082         ac_prev=
48083         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48084          if test -n "$ac_prev"; then
48085            case $ac_word in
48086              i?86 | x86_64 | ppc | ppc64)
48087                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48088                  ac_arch=$ac_word
48089                else
48090                  ac_cv_c_bigendian=universal
48091                  break
48092                fi
48093                ;;
48094            esac
48095            ac_prev=
48096          elif test "x$ac_word" = "x-arch"; then
48097            ac_prev=arch
48098          fi
48099        done
48100 fi
48101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48102     if test $ac_cv_c_bigendian = unknown; then
48103       # See if sys/param.h defines the BYTE_ORDER macro.
48104       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48105 /* end confdefs.h.  */
48106 #include <sys/types.h>
48107              #include <sys/param.h>
48108 
48109 int
48110 main ()
48111 {
48112 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48113                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48114                      && LITTLE_ENDIAN)
48115               bogus endian macros
48116              #endif
48117 
48118   ;
48119   return 0;
48120 }
48121 _ACEOF
48122 if ac_fn_cxx_try_compile "$LINENO"; then :
48123   # It does; now see whether it defined to BIG_ENDIAN or not.
48124          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48125 /* end confdefs.h.  */
48126 #include <sys/types.h>
48127                 #include <sys/param.h>
48128 
48129 int
48130 main ()
48131 {
48132 #if BYTE_ORDER != BIG_ENDIAN
48133                  not big endian
48134                 #endif
48135 
48136   ;
48137   return 0;
48138 }
48139 _ACEOF
48140 if ac_fn_cxx_try_compile "$LINENO"; then :
48141   ac_cv_c_bigendian=yes
48142 else
48143   ac_cv_c_bigendian=no
48144 fi
48145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48146 fi
48147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48148     fi
48149     if test $ac_cv_c_bigendian = unknown; then
48150       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48151       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48152 /* end confdefs.h.  */
48153 #include <limits.h>
48154 
48155 int
48156 main ()
48157 {
48158 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48159               bogus endian macros
48160              #endif
48161 
48162   ;
48163   return 0;
48164 }
48165 _ACEOF
48166 if ac_fn_cxx_try_compile "$LINENO"; then :
48167   # It does; now see whether it defined to _BIG_ENDIAN or not.
48168          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48169 /* end confdefs.h.  */
48170 #include <limits.h>
48171 
48172 int
48173 main ()
48174 {
48175 #ifndef _BIG_ENDIAN
48176                  not big endian
48177                 #endif
48178 
48179   ;
48180   return 0;
48181 }
48182 _ACEOF
48183 if ac_fn_cxx_try_compile "$LINENO"; then :
48184   ac_cv_c_bigendian=yes
48185 else
48186   ac_cv_c_bigendian=no
48187 fi
48188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48189 fi
48190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48191     fi
48192     if test $ac_cv_c_bigendian = unknown; then
48193       # Compile a test program.
48194       if test "$cross_compiling" = yes; then :
48195   # Try to guess by grepping values from an object file.
48196          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48197 /* end confdefs.h.  */
48198 short int ascii_mm[] =
48199                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48200                 short int ascii_ii[] =
48201                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48202                 int use_ascii (int i) {
48203                   return ascii_mm[i] + ascii_ii[i];
48204                 }
48205                 short int ebcdic_ii[] =
48206                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48207                 short int ebcdic_mm[] =
48208                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48209                 int use_ebcdic (int i) {
48210                   return ebcdic_mm[i] + ebcdic_ii[i];
48211                 }
48212                 extern int foo;
48213 
48214 int
48215 main ()
48216 {
48217 return use_ascii (foo) == use_ebcdic (foo);
48218   ;
48219   return 0;
48220 }
48221 _ACEOF
48222 if ac_fn_cxx_try_compile "$LINENO"; then :
48223   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48224               ac_cv_c_bigendian=yes
48225             fi
48226             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48227               if test "$ac_cv_c_bigendian" = unknown; then
48228                 ac_cv_c_bigendian=no
48229               else
48230                 # finding both strings is unlikely to happen, but who knows?
48231                 ac_cv_c_bigendian=unknown
48232               fi
48233             fi
48234 fi
48235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48236 else
48237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48238 /* end confdefs.h.  */
48239 $ac_includes_default
48240 int
48241 main ()
48242 {
48243 
48244              /* Are we little or big endian?  From Harbison&Steele.  */
48245              union
48246              {
48247                long int l;
48248                char c[sizeof (long int)];
48249              } u;
48250              u.l = 1;
48251              return u.c[sizeof (long int) - 1] == 1;
48252 
48253   ;
48254   return 0;
48255 }
48256 _ACEOF
48257 if ac_fn_cxx_try_run "$LINENO"; then :
48258   ac_cv_c_bigendian=no
48259 else
48260   ac_cv_c_bigendian=yes
48261 fi
48262 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48263   conftest.$ac_objext conftest.beam conftest.$ac_ext
48264 fi
48265 
48266     fi
48267 fi
48268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48269 $as_echo "$ac_cv_c_bigendian" >&6; }
48270  case $ac_cv_c_bigendian in #(
48271    yes)
48272      ENDIAN="big";; #(
48273    no)
48274      ENDIAN="little" ;; #(
48275    universal)
48276      ENDIAN="universal_endianness"
48277      ;; #(
48278    *)
48279      ENDIAN="unknown" ;;
48280  esac
48281 
48282 
48283   if test "x$ENDIAN" = xuniversal_endianness; then
48284     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48285   fi
48286   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48287     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
48288   fi
48289 
48290 
48291 # Configure flags for the tools
48292 
48293   ###############################################################################
48294   #
48295   # How to compile shared libraries.
48296   #
48297 
48298   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48299     PICFLAG="-fPIC"
48300     C_FLAG_REORDER=''
48301     CXX_FLAG_REORDER=''
48302 
48303     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48304       # Linking is different on MacOSX
48305       if test "x$STATIC_BUILD" = xtrue; then
48306         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48307       else
48308         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48309         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48310       fi
48311       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48312       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48313       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48314       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48315     else
48316       # Default works for linux, might work on other platforms as well.
48317       SHARED_LIBRARY_FLAGS='-shared'
48318       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48319       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48320       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48321       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48322     fi
48323   elif test "x$TOOLCHAIN_TYPE" = xclang; then
48324     C_FLAG_REORDER=''
48325     CXX_FLAG_REORDER=''
48326 
48327     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48328       # Linking is different on MacOSX
48329       PICFLAG=''
48330       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48331       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48332       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48333       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48334       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48335 
48336       if test "x$STATIC_BUILD" = xfalse; then
48337         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48338       fi
48339     else
48340       # Default works for linux, might work on other platforms as well.
48341       PICFLAG='-fPIC'
48342       SHARED_LIBRARY_FLAGS='-shared'
48343       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48344       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48345       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48346       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48347     fi
48348   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48349     PICFLAG="-KPIC"
48350     C_FLAG_REORDER='-xF'
48351     CXX_FLAG_REORDER='-xF'
48352     SHARED_LIBRARY_FLAGS="-G"
48353     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48354     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48355     SET_SHARED_LIBRARY_NAME='-h $1'
48356     SET_SHARED_LIBRARY_MAPFILE='-M$1'
48357   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48358     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48359     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48360     # will have to patch this single instruction with a call to some out-of-order code which
48361     # does the load from the TOC. This is of course slow. But in that case we also would have
48362     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48363     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48364     # can be patched directly by the linker and does not require a jump to out-of-order code.
48365     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48366     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48367     # loads for accessing a global variable). But there are rumors that this may be seen as a
48368     # 'performance feature' because of improved code locality of the symbols used in a
48369     # compilation unit.
48370     PICFLAG="-qpic"
48371     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48372     C_FLAG_REORDER=''
48373     CXX_FLAG_REORDER=''
48374     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48375     SET_EXECUTABLE_ORIGIN=""
48376     SET_SHARED_LIBRARY_ORIGIN=''
48377     SET_SHARED_LIBRARY_NAME=''
48378     SET_SHARED_LIBRARY_MAPFILE=''
48379   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48380     PICFLAG=""
48381     C_FLAG_REORDER=''
48382     CXX_FLAG_REORDER=''
48383     SHARED_LIBRARY_FLAGS="-dll"
48384     SET_EXECUTABLE_ORIGIN=''
48385     SET_SHARED_LIBRARY_ORIGIN=''
48386     SET_SHARED_LIBRARY_NAME=''
48387     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48388   fi
48389 
48390 
48391 
48392 
48393 
48394 
48395 
48396 
48397 
48398   # The (cross) compiler is now configured, we can now test capabilities
48399   # of the target platform.
48400 
48401 
48402 
48403   ###############################################################################
48404   #
48405   # Setup the opt flags for different compilers
48406   # and different operating systems.
48407   #
48408 
48409   # FIXME: this was indirectly the old default, but just inherited.
48410   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48411   #   C_FLAG_DEPS="-MMD -MF"
48412   # fi
48413 
48414   # Generate make dependency files
48415   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48416     C_FLAG_DEPS="-MMD -MF"
48417   elif test "x$TOOLCHAIN_TYPE" = xclang; then
48418     C_FLAG_DEPS="-MMD -MF"
48419   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48420     C_FLAG_DEPS="-xMMD -xMF"
48421   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48422     C_FLAG_DEPS="-qmakedep=gcc -MF"
48423   fi
48424   CXX_FLAG_DEPS="$C_FLAG_DEPS"
48425 
48426 
48427 
48428   # Debug symbols
48429   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48430     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48431       # reduce from default "-g2" option to save space
48432       CFLAGS_DEBUG_SYMBOLS="-g1"
48433       CXXFLAGS_DEBUG_SYMBOLS="-g1"
48434     else
48435       CFLAGS_DEBUG_SYMBOLS="-g"
48436       CXXFLAGS_DEBUG_SYMBOLS="-g"
48437     fi
48438   elif test "x$TOOLCHAIN_TYPE" = xclang; then
48439     CFLAGS_DEBUG_SYMBOLS="-g"
48440     CXXFLAGS_DEBUG_SYMBOLS="-g"
48441   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48442     CFLAGS_DEBUG_SYMBOLS="-g -xs"
48443     # -g0 enables debug symbols without disabling inlining.
48444     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48445   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48446     CFLAGS_DEBUG_SYMBOLS="-g"
48447     CXXFLAGS_DEBUG_SYMBOLS="-g"
48448   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48449     CFLAGS_DEBUG_SYMBOLS="-Zi"
48450     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48451   fi
48452 
48453 
48454 
48455   # Debug symbols for JVM_CFLAGS
48456   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48457     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48458     if test "x$DEBUG_LEVEL" = xslowdebug; then
48459       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48460     else
48461       # -g0 does not disable inlining, which -g does.
48462       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48463     fi
48464   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48465     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48466   else
48467     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48468   fi
48469 
48470 
48471   # bounds, memory and behavior checking options
48472   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48473     case $DEBUG_LEVEL in
48474     release )
48475       # no adjustment
48476       ;;
48477     fastdebug )
48478       # no adjustment
48479       ;;
48480     slowdebug )
48481       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48482       # get's added conditionally on whether we produce debug symbols or not.
48483       # This is most likely not really correct.
48484 
48485       # Add runtime stack smashing and undefined behavior checks.
48486       # Not all versions of gcc support -fstack-protector
48487       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48488 
48489 
48490 
48491 
48492 
48493 
48494 
48495 
48496 
48497 
48498 
48499 
48500 
48501 
48502 
48503 
48504 
48505 
48506 
48507 
48508 
48509 
48510 
48511 
48512 
48513 
48514 
48515 
48516 
48517 
48518 
48519 
48520 
48521 
48522 
48523 
48524 
48525 
48526 
48527 
48528 
48529 
48530     # Execute function body
48531 
48532 
48533 
48534 
48535 
48536 
48537 
48538 
48539 
48540 
48541 
48542 
48543 
48544 
48545 
48546 
48547 
48548 
48549 
48550 
48551 
48552 
48553 
48554 
48555 
48556 
48557 
48558 
48559 
48560 
48561 
48562 
48563 
48564 
48565 
48566 
48567 
48568 
48569 
48570 
48571 
48572 
48573 
48574 
48575 
48576 
48577 
48578 
48579     # Execute function body
48580 
48581   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48582 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48583   supports=yes
48584 
48585   saved_cflags="$CFLAGS"
48586   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48587   ac_ext=c
48588 ac_cpp='$CPP $CPPFLAGS'
48589 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48590 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48591 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48592 
48593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48594 /* end confdefs.h.  */
48595 int i;
48596 _ACEOF
48597 if ac_fn_c_try_compile "$LINENO"; then :
48598 
48599 else
48600   supports=no
48601 fi
48602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48603   ac_ext=cpp
48604 ac_cpp='$CXXCPP $CPPFLAGS'
48605 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48606 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48607 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48608 
48609   CFLAGS="$saved_cflags"
48610 
48611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48612 $as_echo "$supports" >&6; }
48613   if test "x$supports" = "xyes" ; then
48614     :
48615     C_COMP_SUPPORTS="yes"
48616   else
48617     :
48618     C_COMP_SUPPORTS="no"
48619   fi
48620 
48621 
48622 
48623 
48624 
48625 
48626 
48627 
48628 
48629 
48630 
48631 
48632 
48633 
48634 
48635 
48636 
48637 
48638 
48639 
48640 
48641 
48642 
48643 
48644 
48645 
48646 
48647 
48648 
48649 
48650 
48651 
48652 
48653 
48654 
48655 
48656 
48657 
48658 
48659 
48660 
48661 
48662 
48663 
48664 
48665 
48666 
48667 
48668 
48669 
48670 
48671 
48672 
48673 
48674 
48675 
48676 
48677 
48678 
48679     # Execute function body
48680 
48681   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48682 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48683   supports=yes
48684 
48685   saved_cxxflags="$CXXFLAGS"
48686   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48687   ac_ext=cpp
48688 ac_cpp='$CXXCPP $CPPFLAGS'
48689 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48690 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48691 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48692 
48693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48694 /* end confdefs.h.  */
48695 int i;
48696 _ACEOF
48697 if ac_fn_cxx_try_compile "$LINENO"; then :
48698 
48699 else
48700   supports=no
48701 fi
48702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48703   ac_ext=cpp
48704 ac_cpp='$CXXCPP $CPPFLAGS'
48705 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48706 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48707 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48708 
48709   CXXFLAGS="$saved_cxxflags"
48710 
48711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48712 $as_echo "$supports" >&6; }
48713   if test "x$supports" = "xyes" ; then
48714     :
48715     CXX_COMP_SUPPORTS="yes"
48716   else
48717     :
48718     CXX_COMP_SUPPORTS="no"
48719   fi
48720 
48721 
48722 
48723 
48724 
48725 
48726 
48727 
48728 
48729 
48730 
48731 
48732 
48733   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48734 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48735   supports=no
48736   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48737 
48738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48739 $as_echo "$supports" >&6; }
48740   if test "x$supports" = "xyes" ; then
48741     :
48742 
48743   else
48744     :
48745     STACK_PROTECTOR_CFLAG=""
48746   fi
48747 
48748 
48749 
48750 
48751 
48752 
48753 
48754       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48755       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48756       if test "x$STACK_PROTECTOR_CFLAG" != x; then
48757         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48758       fi
48759       ;;
48760     esac
48761   fi
48762 
48763   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48764     if test "x$DEBUG_LEVEL" != xrelease; then
48765       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48766         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
48767       fi
48768     fi
48769   fi
48770 
48771   # Optimization levels
48772   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48773     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48774 
48775     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48776       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48777       C_O_FLAG_HIGHEST_JVM="-xO4"
48778       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48779       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48780       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48781       C_O_FLAG_DEBUG="-xregs=no%frameptr"
48782       C_O_FLAG_DEBUG_JVM=""
48783       C_O_FLAG_NONE="-xregs=no%frameptr"
48784       CXX_O_FLAG_HIGHEST_JVM="-xO4"
48785       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48786       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48787       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48788       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48789       CXX_O_FLAG_DEBUG_JVM=""
48790       CXX_O_FLAG_NONE="-xregs=no%frameptr"
48791       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48792         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48793         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48794       fi
48795     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48796       C_O_FLAG_HIGHEST_JVM="-xO4"
48797       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48798       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48799       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48800       C_O_FLAG_DEBUG=""
48801       C_O_FLAG_DEBUG_JVM=""
48802       C_O_FLAG_NONE=""
48803       CXX_O_FLAG_HIGHEST_JVM="-xO4"
48804       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48805       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48806       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48807       CXX_O_FLAG_DEBUG=""
48808       CXX_O_FLAG_DEBUG_JVM=""
48809       CXX_O_FLAG_NONE=""
48810     fi
48811   else
48812     # The remaining toolchains share opt flags between CC and CXX;
48813     # setup for C and duplicate afterwards.
48814     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48815       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48816         # On MacOSX we optimize for size, something
48817         # we should do for all platforms?
48818         C_O_FLAG_HIGHEST_JVM="-Os"
48819         C_O_FLAG_HIGHEST="-Os"
48820         C_O_FLAG_HI="-Os"
48821         C_O_FLAG_NORM="-Os"
48822         C_O_FLAG_SIZE="-Os"
48823       else
48824         C_O_FLAG_HIGHEST_JVM="-O3"
48825         C_O_FLAG_HIGHEST="-O3"
48826         C_O_FLAG_HI="-O3"
48827         C_O_FLAG_NORM="-O2"
48828         C_O_FLAG_SIZE="-Os"
48829       fi
48830       C_O_FLAG_DEBUG="-O0"
48831       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48832         C_O_FLAG_DEBUG_JVM=""
48833       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48834         C_O_FLAG_DEBUG_JVM="-O0"
48835       fi
48836       C_O_FLAG_NONE="-O0"
48837     elif test "x$TOOLCHAIN_TYPE" = xclang; then
48838       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48839         # On MacOSX we optimize for size, something
48840         # we should do for all platforms?
48841         C_O_FLAG_HIGHEST_JVM="-Os"
48842         C_O_FLAG_HIGHEST="-Os"
48843         C_O_FLAG_HI="-Os"
48844         C_O_FLAG_NORM="-Os"
48845         C_O_FLAG_SIZE="-Os"
48846       else
48847         C_O_FLAG_HIGHEST_JVM="-O3"
48848         C_O_FLAG_HIGHEST="-O3"
48849         C_O_FLAG_HI="-O3"
48850         C_O_FLAG_NORM="-O2"
48851         C_O_FLAG_SIZE="-Os"
48852       fi
48853       C_O_FLAG_DEBUG="-O0"
48854       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48855         C_O_FLAG_DEBUG_JVM=""
48856       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48857         C_O_FLAG_DEBUG_JVM="-O0"
48858       fi
48859       C_O_FLAG_NONE="-O0"
48860     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48861       C_O_FLAG_HIGHEST_JVM="-O3"
48862       C_O_FLAG_HIGHEST="-O3"
48863       C_O_FLAG_HI="-O3 -qstrict"
48864       C_O_FLAG_NORM="-O2"
48865       C_O_FLAG_DEBUG="-qnoopt"
48866       # FIXME: Value below not verified.
48867       C_O_FLAG_DEBUG_JVM=""
48868       C_O_FLAG_NONE="-qnoopt"
48869     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48870       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
48871       C_O_FLAG_HIGHEST="-O2"
48872       C_O_FLAG_HI="-O1"
48873       C_O_FLAG_NORM="-O1"
48874       C_O_FLAG_DEBUG="-Od"
48875       C_O_FLAG_DEBUG_JVM=""
48876       C_O_FLAG_NONE="-Od"
48877       C_O_FLAG_SIZE="-Os"
48878     fi
48879     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
48880     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48881     CXX_O_FLAG_HI="$C_O_FLAG_HI"
48882     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48883     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48884     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
48885     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48886     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
48887   fi
48888 
48889   # Adjust optimization flags according to debug level.
48890   case $DEBUG_LEVEL in
48891     release )
48892       # no adjustment
48893       ;;
48894     fastdebug )
48895       # Not quite so much optimization
48896       C_O_FLAG_HI="$C_O_FLAG_NORM"
48897       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48898       ;;
48899     slowdebug )
48900       # Disable optimization
48901       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
48902       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48903       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48904       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48905       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
48906       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
48907       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48908       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48909       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48910       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
48911       ;;
48912   esac
48913 
48914 
48915 
48916 
48917 
48918 
48919 
48920 
48921 
48922 
48923 
48924 
48925 
48926 
48927 
48928 
48929 
48930 
48931 
48932   # Special extras...
48933   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48934     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48935       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48936       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48937     fi
48938     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48939     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48940   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48941     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48942     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48943   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48944     CXXSTD_CXXFLAG="-std=gnu++98"
48945 
48946 
48947 
48948 
48949 
48950 
48951 
48952 
48953 
48954 
48955 
48956 
48957 
48958 
48959 
48960 
48961 
48962 
48963 
48964 
48965 
48966 
48967 
48968 
48969 
48970 
48971 
48972 
48973 
48974 
48975 
48976 
48977 
48978 
48979 
48980 
48981 
48982 
48983 
48984 
48985 
48986 
48987     # Execute function body
48988 
48989   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48990 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48991   supports=yes
48992 
48993   saved_cxxflags="$CXXFLAGS"
48994   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48995   ac_ext=cpp
48996 ac_cpp='$CXXCPP $CPPFLAGS'
48997 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48998 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48999 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49000 
49001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49002 /* end confdefs.h.  */
49003 int i;
49004 _ACEOF
49005 if ac_fn_cxx_try_compile "$LINENO"; then :
49006 
49007 else
49008   supports=no
49009 fi
49010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49011   ac_ext=cpp
49012 ac_cpp='$CXXCPP $CPPFLAGS'
49013 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49014 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49015 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49016 
49017   CXXFLAGS="$saved_cxxflags"
49018 
49019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49020 $as_echo "$supports" >&6; }
49021   if test "x$supports" = "xyes" ; then
49022     :
49023 
49024   else
49025     :
49026     CXXSTD_CXXFLAG=""
49027   fi
49028 
49029 
49030 
49031 
49032 
49033 
49034 
49035 
49036 
49037 
49038 
49039 
49040     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49041 
49042   fi
49043   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49044     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49045     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49046     CFLAGS_JDKLIB_EXTRA='-xstrconst'
49047     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49048     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49049   fi
49050 
49051   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49052     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49053     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49054     CFLAGS_JDKLIB_EXTRA='-xstrconst'
49055   fi
49056 
49057   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49058   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49059   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49060 
49061   ###############################################################################
49062   #
49063   # Now setup the CFLAGS and LDFLAGS for the JDK build.
49064   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49065   #
49066 
49067   # Setup compiler/platform specific flags into
49068   #    CFLAGS_JDK    - C Compiler flags
49069   #    CXXFLAGS_JDK  - C++ Compiler flags
49070   #    COMMON_CCXXFLAGS_JDK - common to C and C++
49071   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49072     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49073     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49074     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49075     if test "x$OPENJDK_TARGET_CPU" = xx86; then
49076       # Force compatibility with i586 on 32 bit intel platforms.
49077       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49078       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49079     fi
49080     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49081         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49082     case $OPENJDK_TARGET_CPU_ARCH in
49083       arm )
49084         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49085         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49086         ;;
49087       ppc )
49088         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49089         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49090         ;;
49091       * )
49092         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49093         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49094         ;;
49095     esac
49096 
49097 
49098 
49099 
49100 
49101 
49102 
49103 
49104 
49105 
49106 
49107 
49108 
49109 
49110 
49111 
49112 
49113 
49114 
49115 
49116 
49117 
49118 
49119 
49120 
49121 
49122 
49123 
49124 
49125 
49126 
49127 
49128 
49129 
49130 
49131 
49132 
49133 
49134 
49135 
49136 
49137 
49138     # Execute function body
49139 
49140   # Need to assign to a variable since m4 is blocked from modifying parts in [].
49141   REFERENCE_VERSION=6
49142 
49143   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49144     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49145   fi
49146 
49147   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49148     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49149   fi
49150 
49151   # Version comparison method inspired by http://stackoverflow.com/a/24067243
49152   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49153 
49154   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49155     :
49156 
49157   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49158   # runs afoul of the more aggressive versions of these optimisations.
49159   # Notably, value range propagation now assumes that the this pointer of C++
49160   # member functions is non-null.
49161   NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49162 
49163 
49164 
49165 
49166 
49167 
49168 
49169 
49170 
49171 
49172 
49173 
49174 
49175 
49176 
49177 
49178 
49179 
49180 
49181 
49182 
49183 
49184 
49185 
49186 
49187 
49188 
49189 
49190 
49191 
49192 
49193 
49194 
49195 
49196 
49197 
49198 
49199 
49200 
49201 
49202 
49203 
49204     # Execute function body
49205 
49206 
49207 
49208 
49209 
49210 
49211 
49212 
49213 
49214 
49215 
49216 
49217 
49218 
49219 
49220 
49221 
49222 
49223 
49224 
49225 
49226 
49227 
49228 
49229 
49230 
49231 
49232 
49233 
49234 
49235 
49236 
49237 
49238 
49239 
49240 
49241 
49242 
49243 
49244 
49245 
49246 
49247 
49248 
49249 
49250 
49251 
49252 
49253     # Execute function body
49254 
49255   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49256 $as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49257   supports=yes
49258 
49259   saved_cflags="$CFLAGS"
49260   CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49261   ac_ext=c
49262 ac_cpp='$CPP $CPPFLAGS'
49263 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49264 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49265 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49266 
49267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49268 /* end confdefs.h.  */
49269 int i;
49270 _ACEOF
49271 if ac_fn_c_try_compile "$LINENO"; then :
49272 
49273 else
49274   supports=no
49275 fi
49276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49277   ac_ext=cpp
49278 ac_cpp='$CXXCPP $CPPFLAGS'
49279 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49280 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49281 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49282 
49283   CFLAGS="$saved_cflags"
49284 
49285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49286 $as_echo "$supports" >&6; }
49287   if test "x$supports" = "xyes" ; then
49288     :
49289     C_COMP_SUPPORTS="yes"
49290   else
49291     :
49292     C_COMP_SUPPORTS="no"
49293   fi
49294 
49295 
49296 
49297 
49298 
49299 
49300 
49301 
49302 
49303 
49304 
49305 
49306 
49307 
49308 
49309 
49310 
49311 
49312 
49313 
49314 
49315 
49316 
49317 
49318 
49319 
49320 
49321 
49322 
49323 
49324 
49325 
49326 
49327 
49328 
49329 
49330 
49331 
49332 
49333 
49334 
49335 
49336 
49337 
49338 
49339 
49340 
49341 
49342 
49343 
49344 
49345 
49346 
49347 
49348 
49349 
49350 
49351 
49352 
49353     # Execute function body
49354 
49355   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49356 $as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49357   supports=yes
49358 
49359   saved_cxxflags="$CXXFLAGS"
49360   CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49361   ac_ext=cpp
49362 ac_cpp='$CXXCPP $CPPFLAGS'
49363 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49364 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49365 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49366 
49367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49368 /* end confdefs.h.  */
49369 int i;
49370 _ACEOF
49371 if ac_fn_cxx_try_compile "$LINENO"; then :
49372 
49373 else
49374   supports=no
49375 fi
49376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49377   ac_ext=cpp
49378 ac_cpp='$CXXCPP $CPPFLAGS'
49379 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49380 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49381 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49382 
49383   CXXFLAGS="$saved_cxxflags"
49384 
49385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49386 $as_echo "$supports" >&6; }
49387   if test "x$supports" = "xyes" ; then
49388     :
49389     CXX_COMP_SUPPORTS="yes"
49390   else
49391     :
49392     CXX_COMP_SUPPORTS="no"
49393   fi
49394 
49395 
49396 
49397 
49398 
49399 
49400 
49401 
49402 
49403 
49404 
49405 
49406 
49407   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49408 $as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49409   supports=no
49410   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49411 
49412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49413 $as_echo "$supports" >&6; }
49414   if test "x$supports" = "xyes" ; then
49415     :
49416 
49417   else
49418     :
49419     NO_NULL_POINTER_CHECK_CFLAG=""
49420   fi
49421 
49422 
49423 
49424 
49425 
49426 
49427 
49428   NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49429 
49430 
49431 
49432 
49433 
49434 
49435 
49436 
49437 
49438 
49439 
49440 
49441 
49442 
49443 
49444 
49445 
49446 
49447 
49448 
49449 
49450 
49451 
49452 
49453 
49454 
49455 
49456 
49457 
49458 
49459 
49460 
49461 
49462 
49463 
49464 
49465 
49466 
49467 
49468 
49469 
49470 
49471     # Execute function body
49472 
49473 
49474 
49475 
49476 
49477 
49478 
49479 
49480 
49481 
49482 
49483 
49484 
49485 
49486 
49487 
49488 
49489 
49490 
49491 
49492 
49493 
49494 
49495 
49496 
49497 
49498 
49499 
49500 
49501 
49502 
49503 
49504 
49505 
49506 
49507 
49508 
49509 
49510 
49511 
49512 
49513 
49514 
49515 
49516 
49517 
49518 
49519 
49520     # Execute function body
49521 
49522   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49523 $as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49524   supports=yes
49525 
49526   saved_cflags="$CFLAGS"
49527   CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49528   ac_ext=c
49529 ac_cpp='$CPP $CPPFLAGS'
49530 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49531 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49532 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49533 
49534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49535 /* end confdefs.h.  */
49536 int i;
49537 _ACEOF
49538 if ac_fn_c_try_compile "$LINENO"; then :
49539 
49540 else
49541   supports=no
49542 fi
49543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49544   ac_ext=cpp
49545 ac_cpp='$CXXCPP $CPPFLAGS'
49546 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49547 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49548 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49549 
49550   CFLAGS="$saved_cflags"
49551 
49552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49553 $as_echo "$supports" >&6; }
49554   if test "x$supports" = "xyes" ; then
49555     :
49556     C_COMP_SUPPORTS="yes"
49557   else
49558     :
49559     C_COMP_SUPPORTS="no"
49560   fi
49561 
49562 
49563 
49564 
49565 
49566 
49567 
49568 
49569 
49570 
49571 
49572 
49573 
49574 
49575 
49576 
49577 
49578 
49579 
49580 
49581 
49582 
49583 
49584 
49585 
49586 
49587 
49588 
49589 
49590 
49591 
49592 
49593 
49594 
49595 
49596 
49597 
49598 
49599 
49600 
49601 
49602 
49603 
49604 
49605 
49606 
49607 
49608 
49609 
49610 
49611 
49612 
49613 
49614 
49615 
49616 
49617 
49618 
49619 
49620     # Execute function body
49621 
49622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49623 $as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49624   supports=yes
49625 
49626   saved_cxxflags="$CXXFLAGS"
49627   CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49628   ac_ext=cpp
49629 ac_cpp='$CXXCPP $CPPFLAGS'
49630 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49631 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49632 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49633 
49634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49635 /* end confdefs.h.  */
49636 int i;
49637 _ACEOF
49638 if ac_fn_cxx_try_compile "$LINENO"; then :
49639 
49640 else
49641   supports=no
49642 fi
49643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49644   ac_ext=cpp
49645 ac_cpp='$CXXCPP $CPPFLAGS'
49646 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49647 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49648 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49649 
49650   CXXFLAGS="$saved_cxxflags"
49651 
49652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49653 $as_echo "$supports" >&6; }
49654   if test "x$supports" = "xyes" ; then
49655     :
49656     CXX_COMP_SUPPORTS="yes"
49657   else
49658     :
49659     CXX_COMP_SUPPORTS="no"
49660   fi
49661 
49662 
49663 
49664 
49665 
49666 
49667 
49668 
49669 
49670 
49671 
49672 
49673 
49674   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49675 $as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49676   supports=no
49677   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49678 
49679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49680 $as_echo "$supports" >&6; }
49681   if test "x$supports" = "xyes" ; then
49682     :
49683 
49684   else
49685     :
49686     NO_LIFETIME_DSE_CFLAG=""
49687   fi
49688 
49689 
49690 
49691 
49692 
49693 
49694   CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49695 
49696 
49697 
49698   else
49699     :
49700 
49701   fi
49702 
49703 
49704 
49705 
49706 
49707 
49708 
49709 
49710 
49711 
49712 
49713 
49714   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49715     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49716 
49717     # Restrict the debug information created by Clang to avoid
49718     # too big object files and speed the build up a little bit
49719     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49720     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49721     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49722       if test "x$OPENJDK_TARGET_CPU" = xx86; then
49723         # Force compatibility with i586 on 32 bit intel platforms.
49724         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49725         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49726       fi
49727       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49728       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49729           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49730       case $OPENJDK_TARGET_CPU_ARCH in
49731         ppc )
49732           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49733           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49734           ;;
49735         * )
49736           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49737           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49738           ;;
49739       esac
49740     fi
49741   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49742     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49743     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49744     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49745       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49746     fi
49747 
49748     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49749     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49750   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49751     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49752     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49753     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49754   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49755     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49756         -MD -Zc:wchar_t- -W3 -wd4800 \
49757         -DWIN32_LEAN_AND_MEAN \
49758         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49759         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49760         -DWIN32 -DIAL"
49761     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49762       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49763     else
49764       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49765     fi
49766     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49767     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49768     # studio.
49769     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49770       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49771       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49772       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49773     fi
49774   fi
49775 
49776   ###############################################################################
49777 
49778   # Adjust flags according to debug level.
49779   case $DEBUG_LEVEL in
49780     fastdebug | slowdebug )
49781       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49782       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49783       JAVAC_FLAGS="$JAVAC_FLAGS -g"
49784       ;;
49785     release )
49786       ;;
49787     * )
49788       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49789       ;;
49790   esac
49791 
49792   # Set some common defines. These works for all compilers, but assume
49793   # -D is universally accepted.
49794 
49795   # Setup endianness
49796   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49797     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49798     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49799     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49800     #   Note: -Dmacro         is the same as    #define macro 1
49801     #         -Dmacro=        is the same as    #define macro
49802     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49803       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49804     else
49805       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49806     fi
49807   else
49808     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49809     # are defined in the system?
49810     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49811       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49812     else
49813       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49814     fi
49815   fi
49816 
49817   # Setup target OS define. Use OS target name but in upper case.
49818   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49819   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49820 
49821   # Setup target CPU
49822   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49823       $OPENJDK_TARGET_ADD_LP64 \
49824       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49825 
49826   # Setup debug/release defines
49827   if test "x$DEBUG_LEVEL" = xrelease; then
49828     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49829     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49830       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49831     fi
49832   else
49833     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49834   fi
49835 
49836   # Set some additional per-OS defines.
49837   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49838     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49839     JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
49840         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49841   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49842     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49843     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49844         -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
49845   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49846     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49847     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49848     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49849     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49850         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49851         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49852         -fno-omit-frame-pointer"
49853   elif test "x$OPENJDK_TARGET_OS" = xaix; then
49854     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
49855     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
49856     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
49857         -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
49858         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
49859   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49860     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49861   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49862     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
49863     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
49864   fi
49865 
49866   # Set some additional per-CPU defines.
49867   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
49868     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
49869   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49870     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
49871   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
49872     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49873       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49874       # fixes `relocation truncated to fit' error for gcc 4.1.
49875       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
49876       # Use ppc64 instructions, but schedule for power5
49877       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
49878     elif test "x$OPENJDK_TARGET_OS" = xaix; then
49879       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
49880     fi
49881   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
49882     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49883       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49884       # Little endian machine uses ELFv2 ABI.
49885       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
49886       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
49887       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
49888     fi
49889   fi
49890 
49891   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49892     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
49893   fi
49894 
49895   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49896     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
49897       # Solaris does not have _LP64=1 in the old build.
49898       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
49899       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
49900     fi
49901   fi
49902 
49903   # Set JVM_CFLAGS warning handling
49904   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49905     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
49906         -Wunused-value -Woverloaded-virtual"
49907 
49908     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49909 
49910 
49911 
49912 
49913 
49914 
49915 
49916 
49917 
49918 
49919 
49920 
49921 
49922 
49923 
49924 
49925 
49926 
49927 
49928 
49929 
49930 
49931 
49932 
49933 
49934 
49935 
49936 
49937 
49938 
49939 
49940 
49941 
49942 
49943 
49944 
49945 
49946 
49947 
49948 
49949 
49950 
49951     # Execute function body
49952 
49953   # Need to assign to a variable since m4 is blocked from modifying parts in [].
49954   REFERENCE_VERSION=4.8
49955 
49956   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49957     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49958   fi
49959 
49960   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49961     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49962   fi
49963 
49964   # Version comparison method inspired by http://stackoverflow.com/a/24067243
49965   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49966 
49967   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49968     :
49969 
49970             # These flags either do not work or give spurious warnings prior to gcc 4.8.
49971             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49972 
49973 
49974   else
49975     :
49976 
49977   fi
49978 
49979 
49980 
49981 
49982 
49983 
49984 
49985 
49986 
49987 
49988 
49989 
49990     fi
49991     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
49992       # Non-zero builds have stricter warnings
49993       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49994     else
49995       if test "x$TOOLCHAIN_TYPE" = xclang; then
49996         # Some versions of llvm do not like -Wundef
49997         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49998       fi
49999     fi
50000   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50001     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50002         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50003   fi
50004 
50005   # Additional macosx handling
50006   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50007     # Setting these parameters makes it an error to link to macosx APIs that are
50008     # newer than the given OS version and makes the linked binaries compatible
50009     # even if built on a newer version of the OS.
50010     # The expected format is X.Y.Z
50011     MACOSX_VERSION_MIN=10.7.0
50012 
50013 
50014     # The macro takes the version with no dots, ex: 1070
50015     # Let the flags variables get resolved in make for easier override on make
50016     # command line.
50017     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50018     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50019   fi
50020 
50021   # Setup some hard coded includes
50022   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50023       -I${JDK_TOPDIR}/src/java.base/share/native/include \
50024       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50025       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50026       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50027       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50028 
50029   # The shared libraries are compiled using the picflag.
50030   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50031       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50032   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50033       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50034 
50035   # Executable flags
50036   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50037   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50038 
50039 
50040 
50041 
50042 
50043 
50044   # Setup LDFLAGS et al.
50045   #
50046 
50047   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50048     LDFLAGS_MICROSOFT="-nologo -opt:ref"
50049     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50050     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50051     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50052       LDFLAGS_SAFESH="-safeseh"
50053       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50054       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50055       # NOTE: Old build added -machine. Probably not needed.
50056       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50057     else
50058       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50059     fi
50060   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50061       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50062       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50063         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50064         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50065     fi
50066   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50067     # If this is a --hash-style=gnu system, use --hash-style=both, why?
50068     # We have previously set HAS_GNU_HASH if this is the case
50069     if test -n "$HAS_GNU_HASH"; then
50070       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50071       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50072       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50073     fi
50074       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50075         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50076     fi
50077     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50078       # And since we now know that the linker is gnu, then add -z defs, to forbid
50079       # undefined symbols in object files.
50080       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50081       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50082       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50083       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50084       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50085       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50086         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50087       fi
50088       case $DEBUG_LEVEL in
50089         release )
50090           # tell linker to optimize libraries.
50091           # Should this be supplied to the OSS linker as well?
50092           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50093           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50094           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50095           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50096             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50097           fi
50098           ;;
50099         slowdebug )
50100           # Hotspot always let the linker optimize
50101           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50102           if test "x$HAS_LINKER_NOW" = "xtrue"; then
50103             # do relocations at load
50104             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50105             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50106             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50107           fi
50108           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50109             # mark relocations read only
50110             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50111             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50112             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50113           fi
50114           ;;
50115         fastdebug )
50116           # Hotspot always let the linker optimize
50117           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50118           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50119             # mark relocations read only
50120             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50121             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50122             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50123           fi
50124           ;;
50125         * )
50126           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50127           ;;
50128         esac
50129     fi
50130   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50131     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50132     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50133     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50134     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50135     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50136     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50137       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50138     fi
50139   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50140     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50141     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50142     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50143   fi
50144 
50145   # Customize LDFLAGS for executables
50146 
50147   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50148 
50149   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50150     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50151       LDFLAGS_STACK_SIZE=1048576
50152     else
50153       LDFLAGS_STACK_SIZE=327680
50154     fi
50155     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50156   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50157     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50158   fi
50159 
50160   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50161 
50162   # Customize LDFLAGS for libs
50163   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50164 
50165   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50166   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50167     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50168         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50169     JDKLIB_LIBS=""
50170   else
50171     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50172         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50173 
50174     if test "xTARGET" = "xTARGET"; then
50175     # On some platforms (mac) the linker warns about non existing -L dirs.
50176     # Add server first if available. Linking aginst client does not always produce the same results.
50177       # Only add client/minimal dir if client/minimal is being built.
50178     # Default to server for other variants.
50179       if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50180         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50181       elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50182         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50183       elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50184         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50185     else
50186         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50187     fi
50188     elif test "xTARGET" = "xBUILD"; then
50189       # When building a buildjdk, it's always only the server variant
50190       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50191           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50192     fi
50193 
50194     JDKLIB_LIBS="-ljava -ljvm"
50195     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50196       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50197     fi
50198 
50199   fi
50200 
50201   # Set JVM_LIBS (per os)
50202   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50203     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50204   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50205     # FIXME: This hard-coded path is not really proper.
50206     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50207       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50208     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50209       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50210     fi
50211     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50212         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50213   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50214     JVM_LIBS="$JVM_LIBS -lm"
50215   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50216     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50217   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50218     JVM_LIBS="$JVM_LIBS -lm"
50219   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50220     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50221         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50222         wsock32.lib winmm.lib version.lib psapi.lib"
50223     fi
50224 
50225   # Set JVM_ASFLAGS
50226   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50227     if test "x$OPENJDK_TARGET_CPU" = xx86; then
50228       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50229     fi
50230   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50231     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50232   fi
50233 
50234   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50235 
50236 
50237 
50238 
50239 
50240 
50241 
50242 
50243 
50244 
50245 
50246 
50247 
50248 
50249 
50250   # Special extras...
50251   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50252     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50253       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50254       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50255     fi
50256     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50257     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50258   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50259     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50260     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50261   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50262     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50263 
50264 
50265 
50266 
50267 
50268 
50269 
50270 
50271 
50272 
50273 
50274 
50275 
50276 
50277 
50278 
50279 
50280 
50281 
50282 
50283 
50284 
50285 
50286 
50287 
50288 
50289 
50290 
50291 
50292 
50293 
50294 
50295 
50296 
50297 
50298 
50299 
50300 
50301 
50302 
50303 
50304 
50305     # Execute function body
50306 
50307   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50308 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50309   supports=yes
50310 
50311   saved_cxxflags="$CXXFLAGS"
50312   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50313   ac_ext=cpp
50314 ac_cpp='$CXXCPP $CPPFLAGS'
50315 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50316 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50317 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50318 
50319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50320 /* end confdefs.h.  */
50321 int i;
50322 _ACEOF
50323 if ac_fn_cxx_try_compile "$LINENO"; then :
50324 
50325 else
50326   supports=no
50327 fi
50328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50329   ac_ext=cpp
50330 ac_cpp='$CXXCPP $CPPFLAGS'
50331 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50332 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50333 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50334 
50335   CXXFLAGS="$saved_cxxflags"
50336 
50337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50338 $as_echo "$supports" >&6; }
50339   if test "x$supports" = "xyes" ; then
50340     :
50341 
50342   else
50343     :
50344     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50345   fi
50346 
50347 
50348 
50349 
50350 
50351 
50352 
50353 
50354 
50355 
50356 
50357 
50358     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50359 
50360   fi
50361   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50362     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50363     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50364     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50365     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50366     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50367   fi
50368 
50369   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50370     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50371     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50372     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50373   fi
50374 
50375   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50376   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50377   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50378 
50379   ###############################################################################
50380   #
50381   # Now setup the CFLAGS and LDFLAGS for the JDK build.
50382   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50383   #
50384 
50385   # Setup compiler/platform specific flags into
50386   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50387   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50388   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50389   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50390     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50391     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50392     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50393     if test "x$OPENJDK_BUILD_CPU" = xx86; then
50394       # Force compatibility with i586 on 32 bit intel platforms.
50395       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50396       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50397     fi
50398     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50399         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50400     case $OPENJDK_BUILD_CPU_ARCH in
50401       arm )
50402         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50403         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50404         ;;
50405       ppc )
50406         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50407         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50408         ;;
50409       * )
50410         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50411         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50412         ;;
50413     esac
50414 
50415 
50416 
50417 
50418 
50419 
50420 
50421 
50422 
50423 
50424 
50425 
50426 
50427 
50428 
50429 
50430 
50431 
50432 
50433 
50434 
50435 
50436 
50437 
50438 
50439 
50440 
50441 
50442 
50443 
50444 
50445 
50446 
50447 
50448 
50449 
50450 
50451 
50452 
50453 
50454 
50455 
50456     # Execute function body
50457 
50458   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50459   REFERENCE_VERSION=6
50460 
50461   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50462     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50463   fi
50464 
50465   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50466     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50467   fi
50468 
50469   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50470   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50471 
50472   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50473     :
50474 
50475   else
50476     :
50477 
50478   fi
50479 
50480 
50481 
50482 
50483 
50484 
50485 
50486 
50487 
50488 
50489 
50490 
50491   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50492     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50493 
50494     # Restrict the debug information created by Clang to avoid
50495     # too big object files and speed the build up a little bit
50496     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50497     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50498     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50499       if test "x$OPENJDK_BUILD_CPU" = xx86; then
50500         # Force compatibility with i586 on 32 bit intel platforms.
50501         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50502         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50503       fi
50504       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50505       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50506           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50507       case $OPENJDK_BUILD_CPU_ARCH in
50508         ppc )
50509           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50510           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50511           ;;
50512         * )
50513           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50514           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50515           ;;
50516       esac
50517     fi
50518   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50519     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50520     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50521     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50522       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50523     fi
50524 
50525     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50526     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50527   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50528     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50529     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50530     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50531   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50532     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50533         -MD -Zc:wchar_t- -W3 -wd4800 \
50534         -DWIN32_LEAN_AND_MEAN \
50535         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50536         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50537         -DWIN32 -DIAL"
50538     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50539       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50540     else
50541       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50542     fi
50543     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50544     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50545     # studio.
50546     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50547       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50548       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50549       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50550     fi
50551   fi
50552 
50553   ###############################################################################
50554 
50555   # Adjust flags according to debug level.
50556   case $DEBUG_LEVEL in
50557     fastdebug | slowdebug )
50558       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50559       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50560       JAVAC_FLAGS="$JAVAC_FLAGS -g"
50561       ;;
50562     release )
50563       ;;
50564     * )
50565       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50566       ;;
50567   esac
50568 
50569   # Set some common defines. These works for all compilers, but assume
50570   # -D is universally accepted.
50571 
50572   # Setup endianness
50573   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50574     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50575     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50576     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50577     #   Note: -Dmacro         is the same as    #define macro 1
50578     #         -Dmacro=        is the same as    #define macro
50579     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50580       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50581     else
50582       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50583     fi
50584   else
50585     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50586     # are defined in the system?
50587     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50588       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50589     else
50590       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50591     fi
50592   fi
50593 
50594   # Setup target OS define. Use OS target name but in upper case.
50595   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50596   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50597 
50598   # Setup target CPU
50599   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50600       $OPENJDK_BUILD_ADD_LP64 \
50601       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50602 
50603   # Setup debug/release defines
50604   if test "x$DEBUG_LEVEL" = xrelease; then
50605     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50606     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50607       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50608     fi
50609   else
50610     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50611   fi
50612 
50613   # Set some additional per-OS defines.
50614   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50615     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50616     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50617         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50618   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50619     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50620     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50621         -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50622   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50623     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50624     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50625     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50626     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50627         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50628         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50629         -fno-omit-frame-pointer"
50630   elif test "x$OPENJDK_BUILD_OS" = xaix; then
50631     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50632     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50633     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50634         -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50635         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50636   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50637     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50638   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50639     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50640     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50641   fi
50642 
50643   # Set some additional per-CPU defines.
50644   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50645     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50646   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50647     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50648   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50649     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50650       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50651       # fixes `relocation truncated to fit' error for gcc 4.1.
50652       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50653       # Use ppc64 instructions, but schedule for power5
50654       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50655     elif test "x$OPENJDK_BUILD_OS" = xaix; then
50656       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50657     fi
50658   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50659     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50660       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50661       # Little endian machine uses ELFv2 ABI.
50662       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50663       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50664       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50665     fi
50666   fi
50667 
50668   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50669     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50670   fi
50671 
50672   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50673     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50674       # Solaris does not have _LP64=1 in the old build.
50675       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50676       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50677     fi
50678   fi
50679 
50680   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50681   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50682     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50683         -Wunused-value -Woverloaded-virtual"
50684 
50685     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50686 
50687 
50688 
50689 
50690 
50691 
50692 
50693 
50694 
50695 
50696 
50697 
50698 
50699 
50700 
50701 
50702 
50703 
50704 
50705 
50706 
50707 
50708 
50709 
50710 
50711 
50712 
50713 
50714 
50715 
50716 
50717 
50718 
50719 
50720 
50721 
50722 
50723 
50724 
50725 
50726 
50727 
50728     # Execute function body
50729 
50730   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50731   REFERENCE_VERSION=4.8
50732 
50733   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50734     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50735   fi
50736 
50737   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50738     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50739   fi
50740 
50741   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50742   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50743 
50744   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50745     :
50746 
50747             # These flags either do not work or give spurious warnings prior to gcc 4.8.
50748             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50749 
50750 
50751   else
50752     :
50753 
50754   fi
50755 
50756 
50757 
50758 
50759 
50760 
50761 
50762 
50763 
50764 
50765 
50766 
50767     fi
50768     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50769       # Non-zero builds have stricter warnings
50770       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50771     else
50772       if test "x$TOOLCHAIN_TYPE" = xclang; then
50773         # Some versions of llvm do not like -Wundef
50774         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50775       fi
50776     fi
50777   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50778     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50779         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50780   fi
50781 
50782   # Additional macosx handling
50783   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50784     # Setting these parameters makes it an error to link to macosx APIs that are
50785     # newer than the given OS version and makes the linked binaries compatible
50786     # even if built on a newer version of the OS.
50787     # The expected format is X.Y.Z
50788     MACOSX_VERSION_MIN=10.7.0
50789 
50790 
50791     # The macro takes the version with no dots, ex: 1070
50792     # Let the flags variables get resolved in make for easier override on make
50793     # command line.
50794     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50795     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50796   fi
50797 
50798   # Setup some hard coded includes
50799   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50800       -I${JDK_TOPDIR}/src/java.base/share/native/include \
50801       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
50802       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
50803       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50804       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
50805 
50806   # The shared libraries are compiled using the picflag.
50807   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50808       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
50809   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50810       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
50811 
50812   # Executable flags
50813   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
50814   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
50815 
50816 
50817 
50818 
50819 
50820 
50821   # Setup LDFLAGS et al.
50822   #
50823 
50824   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50825     LDFLAGS_MICROSOFT="-nologo -opt:ref"
50826     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50827     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50828     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
50829       LDFLAGS_SAFESH="-safeseh"
50830       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
50831       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
50832       # NOTE: Old build added -machine. Probably not needed.
50833       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
50834     else
50835       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
50836     fi
50837   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50838       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50839       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50840         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50841         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50842     fi
50843   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50844     # If this is a --hash-style=gnu system, use --hash-style=both, why?
50845     # We have previously set HAS_GNU_HASH if this is the case
50846     if test -n "$HAS_GNU_HASH"; then
50847       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50848       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50849       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50850     fi
50851       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50852         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50853     fi
50854     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50855       # And since we now know that the linker is gnu, then add -z defs, to forbid
50856       # undefined symbols in object files.
50857       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50858       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50859       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50860       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50861       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50862       if test "x$OPENJDK_BUILD_CPU" = xx86; then
50863         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
50864       fi
50865       case $DEBUG_LEVEL in
50866         release )
50867           # tell linker to optimize libraries.
50868           # Should this be supplied to the OSS linker as well?
50869           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50870           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50871           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50872           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50873             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50874           fi
50875           ;;
50876         slowdebug )
50877           # Hotspot always let the linker optimize
50878           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50879           if test "x$HAS_LINKER_NOW" = "xtrue"; then
50880             # do relocations at load
50881             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
50882             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50883             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
50884           fi
50885           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50886             # mark relocations read only
50887             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50888             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50889             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50890           fi
50891           ;;
50892         fastdebug )
50893           # Hotspot always let the linker optimize
50894           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50895           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50896             # mark relocations read only
50897             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50898             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50899             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50900           fi
50901           ;;
50902         * )
50903           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50904           ;;
50905         esac
50906     fi
50907   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50908     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50909     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50910     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50911     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50912     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50913     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50914       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
50915     fi
50916   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50917     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50918     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
50919     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
50920   fi
50921 
50922   # Customize LDFLAGS for executables
50923 
50924   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
50925 
50926   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50927     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
50928       LDFLAGS_STACK_SIZE=1048576
50929     else
50930       LDFLAGS_STACK_SIZE=327680
50931     fi
50932     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50933   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
50934     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50935   fi
50936 
50937   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50938 
50939   # Customize LDFLAGS for libs
50940   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
50941 
50942   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50943   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50944     OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50945         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50946     OPENJDK_BUILD_JDKLIB_LIBS=""
50947   else
50948     OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50949         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
50950 
50951     if test "xBUILD" = "xTARGET"; then
50952     # On some platforms (mac) the linker warns about non existing -L dirs.
50953     # Add server first if available. Linking aginst client does not always produce the same results.
50954       # Only add client/minimal dir if client/minimal is being built.
50955     # Default to server for other variants.
50956       if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50957         OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50958       elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50959         OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
50960       elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50961         OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
50962     else
50963         OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50964     fi
50965     elif test "xBUILD" = "xBUILD"; then
50966       # When building a buildjdk, it's always only the server variant
50967       OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50968           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50969     fi
50970 
50971     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
50972     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50973       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
50974     fi
50975 
50976   fi
50977 
50978   # Set OPENJDK_BUILD_JVM_LIBS (per os)
50979   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50980     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
50981   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50982     # FIXME: This hard-coded path is not really proper.
50983     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50984       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50985     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50986       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50987     fi
50988     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50989         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50990   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50991     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50992   elif test "x$OPENJDK_BUILD_OS" = xaix; then
50993     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50994   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50995     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50996   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50997     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50998         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50999         wsock32.lib winmm.lib version.lib psapi.lib"
51000     fi
51001 
51002   # Set OPENJDK_BUILD_JVM_ASFLAGS
51003   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51004     if test "x$OPENJDK_BUILD_CPU" = xx86; then
51005       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51006     fi
51007   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51008     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51009   fi
51010 
51011   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51012 
51013 
51014 
51015 
51016 
51017 
51018 
51019 
51020 
51021 
51022 
51023 
51024 
51025 
51026 
51027   # Tests are only ever compiled for TARGET
51028   # Flags for compiling test libraries
51029   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51030   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51031 
51032   # Flags for compiling test executables
51033   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51034   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51035 
51036 
51037 
51038 
51039 
51040 
51041   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51042   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51043 
51044 
51045 
51046 
51047 
51048 
51049   # Some Zero and Shark settings.
51050   # ZERO_ARCHFLAG tells the compiler which mode to build for
51051   case "${OPENJDK_TARGET_CPU}" in
51052     s390)
51053       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51054       ;;
51055     *)
51056       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51057   esac
51058 
51059 
51060 
51061 
51062 
51063 
51064 
51065 
51066 
51067 
51068 
51069 
51070 
51071 
51072 
51073 
51074 
51075 
51076 
51077 
51078 
51079 
51080 
51081 
51082 
51083 
51084 
51085 
51086 
51087 
51088 
51089 
51090 
51091 
51092 
51093 
51094 
51095 
51096 
51097 
51098 
51099 
51100     # Execute function body
51101 
51102 
51103 
51104 
51105 
51106 
51107 
51108 
51109 
51110 
51111 
51112 
51113 
51114 
51115 
51116 
51117 
51118 
51119 
51120 
51121 
51122 
51123 
51124 
51125 
51126 
51127 
51128 
51129 
51130 
51131 
51132 
51133 
51134 
51135 
51136 
51137 
51138 
51139 
51140 
51141 
51142 
51143 
51144 
51145 
51146 
51147 
51148 
51149     # Execute function body
51150 
51151   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51152 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51153   supports=yes
51154 
51155   saved_cflags="$CFLAGS"
51156   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51157   ac_ext=c
51158 ac_cpp='$CPP $CPPFLAGS'
51159 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51160 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51162 
51163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51164 /* end confdefs.h.  */
51165 int i;
51166 _ACEOF
51167 if ac_fn_c_try_compile "$LINENO"; then :
51168 
51169 else
51170   supports=no
51171 fi
51172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51173   ac_ext=cpp
51174 ac_cpp='$CXXCPP $CPPFLAGS'
51175 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51176 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51177 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51178 
51179   CFLAGS="$saved_cflags"
51180 
51181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51182 $as_echo "$supports" >&6; }
51183   if test "x$supports" = "xyes" ; then
51184     :
51185     C_COMP_SUPPORTS="yes"
51186   else
51187     :
51188     C_COMP_SUPPORTS="no"
51189   fi
51190 
51191 
51192 
51193 
51194 
51195 
51196 
51197 
51198 
51199 
51200 
51201 
51202 
51203 
51204 
51205 
51206 
51207 
51208 
51209 
51210 
51211 
51212 
51213 
51214 
51215 
51216 
51217 
51218 
51219 
51220 
51221 
51222 
51223 
51224 
51225 
51226 
51227 
51228 
51229 
51230 
51231 
51232 
51233 
51234 
51235 
51236 
51237 
51238 
51239 
51240 
51241 
51242 
51243 
51244 
51245 
51246 
51247 
51248 
51249     # Execute function body
51250 
51251   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51252 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51253   supports=yes
51254 
51255   saved_cxxflags="$CXXFLAGS"
51256   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51257   ac_ext=cpp
51258 ac_cpp='$CXXCPP $CPPFLAGS'
51259 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51260 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51261 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51262 
51263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51264 /* end confdefs.h.  */
51265 int i;
51266 _ACEOF
51267 if ac_fn_cxx_try_compile "$LINENO"; then :
51268 
51269 else
51270   supports=no
51271 fi
51272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51273   ac_ext=cpp
51274 ac_cpp='$CXXCPP $CPPFLAGS'
51275 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51276 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51277 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51278 
51279   CXXFLAGS="$saved_cxxflags"
51280 
51281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51282 $as_echo "$supports" >&6; }
51283   if test "x$supports" = "xyes" ; then
51284     :
51285     CXX_COMP_SUPPORTS="yes"
51286   else
51287     :
51288     CXX_COMP_SUPPORTS="no"
51289   fi
51290 
51291 
51292 
51293 
51294 
51295 
51296 
51297 
51298 
51299 
51300 
51301 
51302 
51303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51304 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51305   supports=no
51306   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51307 
51308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51309 $as_echo "$supports" >&6; }
51310   if test "x$supports" = "xyes" ; then
51311     :
51312 
51313   else
51314     :
51315     ZERO_ARCHFLAG=""
51316   fi
51317 
51318 
51319 
51320 
51321 
51322 
51323 
51324 
51325   # Check that the compiler supports -mX (or -qX on AIX) flags
51326   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51327 
51328 
51329 
51330 
51331 
51332 
51333 
51334 
51335 
51336 
51337 
51338 
51339 
51340 
51341 
51342 
51343 
51344 
51345 
51346 
51347 
51348 
51349 
51350 
51351 
51352 
51353 
51354 
51355 
51356 
51357 
51358 
51359 
51360 
51361 
51362 
51363 
51364 
51365 
51366 
51367 
51368 
51369 
51370 
51371 
51372 
51373 
51374     # Execute function body
51375 
51376 
51377 
51378 
51379 
51380 
51381 
51382 
51383 
51384 
51385 
51386 
51387 
51388 
51389 
51390 
51391 
51392 
51393 
51394 
51395 
51396 
51397 
51398 
51399 
51400 
51401 
51402 
51403 
51404 
51405 
51406 
51407 
51408 
51409 
51410 
51411 
51412 
51413 
51414 
51415 
51416 
51417 
51418 
51419 
51420 
51421 
51422 
51423     # Execute function body
51424 
51425   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51426 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51427   supports=yes
51428 
51429   saved_cflags="$CFLAGS"
51430   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51431   ac_ext=c
51432 ac_cpp='$CPP $CPPFLAGS'
51433 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51434 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51435 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51436 
51437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51438 /* end confdefs.h.  */
51439 int i;
51440 _ACEOF
51441 if ac_fn_c_try_compile "$LINENO"; then :
51442 
51443 else
51444   supports=no
51445 fi
51446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51447   ac_ext=cpp
51448 ac_cpp='$CXXCPP $CPPFLAGS'
51449 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51450 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51451 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51452 
51453   CFLAGS="$saved_cflags"
51454 
51455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51456 $as_echo "$supports" >&6; }
51457   if test "x$supports" = "xyes" ; then
51458     :
51459     C_COMP_SUPPORTS="yes"
51460   else
51461     :
51462     C_COMP_SUPPORTS="no"
51463   fi
51464 
51465 
51466 
51467 
51468 
51469 
51470 
51471 
51472 
51473 
51474 
51475 
51476 
51477 
51478 
51479 
51480 
51481 
51482 
51483 
51484 
51485 
51486 
51487 
51488 
51489 
51490 
51491 
51492 
51493 
51494 
51495 
51496 
51497 
51498 
51499 
51500 
51501 
51502 
51503 
51504 
51505 
51506 
51507 
51508 
51509 
51510 
51511 
51512 
51513 
51514 
51515 
51516 
51517 
51518 
51519 
51520 
51521 
51522 
51523     # Execute function body
51524 
51525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51526 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51527   supports=yes
51528 
51529   saved_cxxflags="$CXXFLAGS"
51530   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51531   ac_ext=cpp
51532 ac_cpp='$CXXCPP $CPPFLAGS'
51533 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51534 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51535 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51536 
51537   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51538 /* end confdefs.h.  */
51539 int i;
51540 _ACEOF
51541 if ac_fn_cxx_try_compile "$LINENO"; then :
51542 
51543 else
51544   supports=no
51545 fi
51546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51547   ac_ext=cpp
51548 ac_cpp='$CXXCPP $CPPFLAGS'
51549 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51550 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51551 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51552 
51553   CXXFLAGS="$saved_cxxflags"
51554 
51555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51556 $as_echo "$supports" >&6; }
51557   if test "x$supports" = "xyes" ; then
51558     :
51559     CXX_COMP_SUPPORTS="yes"
51560   else
51561     :
51562     CXX_COMP_SUPPORTS="no"
51563   fi
51564 
51565 
51566 
51567 
51568 
51569 
51570 
51571 
51572 
51573 
51574 
51575 
51576 
51577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51578 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51579   supports=no
51580   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51581 
51582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51583 $as_echo "$supports" >&6; }
51584   if test "x$supports" = "xyes" ; then
51585     :
51586     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51587   else
51588     :
51589     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51590   fi
51591 
51592 
51593 
51594 
51595 
51596 
51597 
51598 
51599   # Check whether --enable-warnings-as-errors was given.
51600 if test "${enable_warnings_as_errors+set}" = set; then :
51601   enableval=$enable_warnings_as_errors;
51602 fi
51603 
51604 
51605   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51606 $as_echo_n "checking if native warnings are errors... " >&6; }
51607   if test "x$enable_warnings_as_errors" = "xyes"; then
51608     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51609 $as_echo "yes (explicitely set)" >&6; }
51610     WARNINGS_AS_ERRORS=true
51611   elif test "x$enable_warnings_as_errors" = "xno"; then
51612     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51613 $as_echo "no" >&6; }
51614     WARNINGS_AS_ERRORS=false
51615   elif test "x$enable_warnings_as_errors" = "x"; then
51616     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51617 $as_echo "yes (default)" >&6; }
51618     WARNINGS_AS_ERRORS=true
51619   else
51620     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51621   fi
51622 
51623   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51624     # Set legacy hotspot variable
51625     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51626   else
51627     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51628   fi
51629 
51630 
51631 
51632 
51633   case "${TOOLCHAIN_TYPE}" in
51634     microsoft)
51635       DISABLE_WARNING_PREFIX="-wd"
51636       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51637       ;;
51638     solstudio)
51639       DISABLE_WARNING_PREFIX="-erroff="
51640       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51641       ;;
51642     gcc)
51643       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51644 
51645 
51646 
51647 
51648 
51649 
51650 
51651 
51652 
51653 
51654 
51655 
51656 
51657 
51658 
51659 
51660 
51661 
51662 
51663 
51664 
51665 
51666 
51667 
51668 
51669 
51670 
51671 
51672 
51673 
51674 
51675 
51676 
51677 
51678 
51679 
51680 
51681 
51682 
51683 
51684 
51685 
51686 
51687 
51688 
51689 
51690 
51691     # Execute function body
51692 
51693 
51694 
51695 
51696 
51697 
51698 
51699 
51700 
51701 
51702 
51703 
51704 
51705 
51706 
51707 
51708 
51709 
51710 
51711 
51712 
51713 
51714 
51715 
51716 
51717 
51718 
51719 
51720 
51721 
51722 
51723 
51724 
51725 
51726 
51727 
51728 
51729 
51730 
51731 
51732 
51733 
51734 
51735 
51736 
51737 
51738 
51739 
51740     # Execute function body
51741 
51742   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51743 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51744   supports=yes
51745 
51746   saved_cflags="$CFLAGS"
51747   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51748   ac_ext=c
51749 ac_cpp='$CPP $CPPFLAGS'
51750 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51751 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51752 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51753 
51754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51755 /* end confdefs.h.  */
51756 int i;
51757 _ACEOF
51758 if ac_fn_c_try_compile "$LINENO"; then :
51759 
51760 else
51761   supports=no
51762 fi
51763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51764   ac_ext=cpp
51765 ac_cpp='$CXXCPP $CPPFLAGS'
51766 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51767 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51768 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51769 
51770   CFLAGS="$saved_cflags"
51771 
51772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51773 $as_echo "$supports" >&6; }
51774   if test "x$supports" = "xyes" ; then
51775     :
51776     C_COMP_SUPPORTS="yes"
51777   else
51778     :
51779     C_COMP_SUPPORTS="no"
51780   fi
51781 
51782 
51783 
51784 
51785 
51786 
51787 
51788 
51789 
51790 
51791 
51792 
51793 
51794 
51795 
51796 
51797 
51798 
51799 
51800 
51801 
51802 
51803 
51804 
51805 
51806 
51807 
51808 
51809 
51810 
51811 
51812 
51813 
51814 
51815 
51816 
51817 
51818 
51819 
51820 
51821 
51822 
51823 
51824 
51825 
51826 
51827 
51828 
51829 
51830 
51831 
51832 
51833 
51834 
51835 
51836 
51837 
51838 
51839 
51840     # Execute function body
51841 
51842   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51843 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51844   supports=yes
51845 
51846   saved_cxxflags="$CXXFLAGS"
51847   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51848   ac_ext=cpp
51849 ac_cpp='$CXXCPP $CPPFLAGS'
51850 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51851 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51852 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51853 
51854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51855 /* end confdefs.h.  */
51856 int i;
51857 _ACEOF
51858 if ac_fn_cxx_try_compile "$LINENO"; then :
51859 
51860 else
51861   supports=no
51862 fi
51863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51864   ac_ext=cpp
51865 ac_cpp='$CXXCPP $CPPFLAGS'
51866 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51867 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51868 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51869 
51870   CXXFLAGS="$saved_cxxflags"
51871 
51872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51873 $as_echo "$supports" >&6; }
51874   if test "x$supports" = "xyes" ; then
51875     :
51876     CXX_COMP_SUPPORTS="yes"
51877   else
51878     :
51879     CXX_COMP_SUPPORTS="no"
51880   fi
51881 
51882 
51883 
51884 
51885 
51886 
51887 
51888 
51889 
51890 
51891 
51892 
51893 
51894   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51895 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51896   supports=no
51897   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51898 
51899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51900 $as_echo "$supports" >&6; }
51901   if test "x$supports" = "xyes" ; then
51902     :
51903     GCC_CAN_DISABLE_WARNINGS=true
51904   else
51905     :
51906     GCC_CAN_DISABLE_WARNINGS=false
51907 
51908   fi
51909 
51910 
51911 
51912 
51913 
51914 
51915       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51916         DISABLE_WARNING_PREFIX="-Wno-"
51917       else
51918         DISABLE_WARNING_PREFIX=
51919       fi
51920       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51921       # Repeate the check for the BUILD_CC
51922       CC_OLD="$CC"
51923       CC="$BUILD_CC"
51924 
51925 
51926 
51927 
51928 
51929 
51930 
51931 
51932 
51933 
51934 
51935 
51936 
51937 
51938 
51939 
51940 
51941 
51942 
51943 
51944 
51945 
51946 
51947 
51948 
51949 
51950 
51951 
51952 
51953 
51954 
51955 
51956 
51957 
51958 
51959 
51960 
51961 
51962 
51963 
51964 
51965 
51966 
51967 
51968 
51969 
51970 
51971     # Execute function body
51972 
51973 
51974 
51975 
51976 
51977 
51978 
51979 
51980 
51981 
51982 
51983 
51984 
51985 
51986 
51987 
51988 
51989 
51990 
51991 
51992 
51993 
51994 
51995 
51996 
51997 
51998 
51999 
52000 
52001 
52002 
52003 
52004 
52005 
52006 
52007 
52008 
52009 
52010 
52011 
52012 
52013 
52014 
52015 
52016 
52017 
52018 
52019 
52020     # Execute function body
52021 
52022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52023 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52024   supports=yes
52025 
52026   saved_cflags="$CFLAGS"
52027   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52028   ac_ext=c
52029 ac_cpp='$CPP $CPPFLAGS'
52030 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52031 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52032 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52033 
52034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52035 /* end confdefs.h.  */
52036 int i;
52037 _ACEOF
52038 if ac_fn_c_try_compile "$LINENO"; then :
52039 
52040 else
52041   supports=no
52042 fi
52043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52044   ac_ext=cpp
52045 ac_cpp='$CXXCPP $CPPFLAGS'
52046 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52047 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52048 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52049 
52050   CFLAGS="$saved_cflags"
52051 
52052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52053 $as_echo "$supports" >&6; }
52054   if test "x$supports" = "xyes" ; then
52055     :
52056     C_COMP_SUPPORTS="yes"
52057   else
52058     :
52059     C_COMP_SUPPORTS="no"
52060   fi
52061 
52062 
52063 
52064 
52065 
52066 
52067 
52068 
52069 
52070 
52071 
52072 
52073 
52074 
52075 
52076 
52077 
52078 
52079 
52080 
52081 
52082 
52083 
52084 
52085 
52086 
52087 
52088 
52089 
52090 
52091 
52092 
52093 
52094 
52095 
52096 
52097 
52098 
52099 
52100 
52101 
52102 
52103 
52104 
52105 
52106 
52107 
52108 
52109 
52110 
52111 
52112 
52113 
52114 
52115 
52116 
52117 
52118 
52119 
52120     # Execute function body
52121 
52122   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52123 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52124   supports=yes
52125 
52126   saved_cxxflags="$CXXFLAGS"
52127   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52128   ac_ext=cpp
52129 ac_cpp='$CXXCPP $CPPFLAGS'
52130 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52131 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52132 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52133 
52134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52135 /* end confdefs.h.  */
52136 int i;
52137 _ACEOF
52138 if ac_fn_cxx_try_compile "$LINENO"; then :
52139 
52140 else
52141   supports=no
52142 fi
52143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52144   ac_ext=cpp
52145 ac_cpp='$CXXCPP $CPPFLAGS'
52146 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52147 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52148 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52149 
52150   CXXFLAGS="$saved_cxxflags"
52151 
52152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52153 $as_echo "$supports" >&6; }
52154   if test "x$supports" = "xyes" ; then
52155     :
52156     CXX_COMP_SUPPORTS="yes"
52157   else
52158     :
52159     CXX_COMP_SUPPORTS="no"
52160   fi
52161 
52162 
52163 
52164 
52165 
52166 
52167 
52168 
52169 
52170 
52171 
52172 
52173 
52174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52175 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52176   supports=no
52177   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52178 
52179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52180 $as_echo "$supports" >&6; }
52181   if test "x$supports" = "xyes" ; then
52182     :
52183     BUILD_CC_CAN_DISABLE_WARNINGS=true
52184   else
52185     :
52186     BUILD_CC_CAN_DISABLE_WARNINGS=false
52187 
52188   fi
52189 
52190 
52191 
52192 
52193 
52194 
52195       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52196         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52197       else
52198         BUILD_CC_DISABLE_WARNING_PREFIX=
52199       fi
52200       CC="$CC_OLD"
52201       ;;
52202     clang)
52203       DISABLE_WARNING_PREFIX="-Wno-"
52204       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52205       ;;
52206     xlc)
52207       DISABLE_WARNING_PREFIX="-qsuppress="
52208       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52209       ;;
52210   esac
52211 
52212 
52213 
52214 
52215 
52216 # Setup debug symbols (need objcopy from the toolchain for that)
52217 
52218   #
52219   # NATIVE_DEBUG_SYMBOLS
52220   # This must be done after the toolchain is setup, since we're looking at objcopy.
52221   #
52222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52223 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
52224 
52225 # Check whether --with-native-debug-symbols was given.
52226 if test "${with_native_debug_symbols+set}" = set; then :
52227   withval=$with_native_debug_symbols;
52228         if test "x$OPENJDK_TARGET_OS" = xaix; then
52229           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52230             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52231           fi
52232         fi
52233 
52234 else
52235 
52236         if test "x$OPENJDK_TARGET_OS" = xaix; then
52237           # AIX doesn't support 'zipped' so use 'internal' as default
52238           with_native_debug_symbols="internal"
52239         else
52240           if test "x$STATIC_BUILD" = xtrue; then
52241             with_native_debug_symbols="none"
52242           else
52243             with_native_debug_symbols="zipped"
52244           fi
52245         fi
52246 
52247 fi
52248 
52249   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52251 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52252 
52253   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52254 
52255     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52256       if test "x$OBJCOPY" = x; then
52257         # enabling of enable-debug-symbols and can't find objcopy
52258         # this is an error
52259         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52260       fi
52261     fi
52262 
52263     COMPILE_WITH_DEBUG_SYMBOLS=true
52264     COPY_DEBUG_SYMBOLS=true
52265     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52266 
52267     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52268     DEBUG_BINARIES=false
52269     STRIP_POLICY=min_strip
52270 
52271   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52272     COMPILE_WITH_DEBUG_SYMBOLS=false
52273     COPY_DEBUG_SYMBOLS=false
52274     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52275 
52276     DEBUG_BINARIES=false
52277     STRIP_POLICY=no_strip
52278   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52279     COMPILE_WITH_DEBUG_SYMBOLS=true
52280     COPY_DEBUG_SYMBOLS=false
52281     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52282 
52283     # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52284     DEBUG_BINARIES=true
52285     STRIP_POLICY=no_strip
52286     STRIP=""
52287 
52288   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52289 
52290     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52291       if test "x$OBJCOPY" = x; then
52292         # enabling of enable-debug-symbols and can't find objcopy
52293         # this is an error
52294         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52295       fi
52296     fi
52297 
52298     COMPILE_WITH_DEBUG_SYMBOLS=true
52299     COPY_DEBUG_SYMBOLS=true
52300     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52301 
52302     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52303     DEBUG_BINARIES=false
52304     STRIP_POLICY=min_strip
52305   else
52306     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52307   fi
52308 
52309   # --enable-debug-symbols is deprecated.
52310   # Please use --with-native-debug-symbols=[internal,external,zipped] .
52311 
52312   # Check whether --enable-debug-symbols was given.
52313 if test "${enable_debug_symbols+set}" = set; then :
52314   enableval=$enable_debug_symbols;
52315 fi
52316 
52317   if test "x$enable_debug_symbols" != x; then
52318     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52319 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52320 
52321     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52322       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52323 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52324     fi
52325 
52326   fi
52327 
52328 
52329   # --enable-zip-debug-info is deprecated.
52330   # Please use --with-native-debug-symbols=zipped .
52331 
52332   # Check whether --enable-zip-debug-info was given.
52333 if test "${enable_zip_debug_info+set}" = set; then :
52334   enableval=$enable_zip_debug_info;
52335 fi
52336 
52337   if test "x$enable_zip_debug_info" != x; then
52338     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52339 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52340 
52341     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52342       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52343 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52344     fi
52345 
52346   fi
52347 
52348 
52349 
52350 
52351 
52352 
52353   # Legacy values
52354 
52355 
52356 
52357 
52358   # Check whether --enable-native-coverage was given.
52359 if test "${enable_native_coverage+set}" = set; then :
52360   enableval=$enable_native_coverage;
52361 fi
52362 
52363   GCOV_ENABLED="false"
52364   if test "x$enable_native_coverage" = "xyes"; then
52365     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52366       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52367 $as_echo_n "checking if native coverage is enabled... " >&6; }
52368       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52369 $as_echo "yes" >&6; }
52370       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52371       GCOV_LDFLAGS="-fprofile-arcs"
52372       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52373       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52374       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52375       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52376       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52377       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52378       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52379       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52380       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52381       GCOV_ENABLED="true"
52382     else
52383       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52384     fi
52385   elif test "x$enable_native_coverage" = "xno"; then
52386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52387 $as_echo_n "checking if native coverage is enabled... " >&6; }
52388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52389 $as_echo "no" >&6; }
52390   elif test "x$enable_native_coverage" != "x"; then
52391     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52392   fi
52393 
52394 
52395 
52396 
52397 # Need toolchain to setup dtrace
52398 
52399   # Test for dtrace dependencies
52400   # Check whether --enable-dtrace was given.
52401 if test "${enable_dtrace+set}" = set; then :
52402   enableval=$enable_dtrace;
52403 fi
52404 
52405 
52406   DTRACE_DEP_MISSING=false
52407 
52408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52409 $as_echo_n "checking for dtrace tool... " >&6; }
52410   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52412 $as_echo "$DTRACE" >&6; }
52413   else
52414     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52415 $as_echo "not found, cannot build dtrace" >&6; }
52416     DTRACE_DEP_MISSING=true
52417   fi
52418 
52419   for ac_header in sys/sdt.h
52420 do :
52421   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52422 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52423   cat >>confdefs.h <<_ACEOF
52424 #define HAVE_SYS_SDT_H 1
52425 _ACEOF
52426  DTRACE_HEADERS_OK=yes
52427 else
52428   DTRACE_HEADERS_OK=no
52429 fi
52430 
52431 done
52432 
52433   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52434     DTRACE_DEP_MISSING=true
52435   fi
52436 
52437   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52438 $as_echo_n "checking if dtrace should be built... " >&6; }
52439   if test "x$enable_dtrace" = "xyes"; then
52440     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52441       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52442 $as_echo "no, missing dependencies" >&6; }
52443 
52444   # Print a helpful message on how to acquire the necessary build dependency.
52445   # dtrace is the help tag: freetype, cups, alsa etc
52446   MISSING_DEPENDENCY=dtrace
52447 
52448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52449     cygwin_help $MISSING_DEPENDENCY
52450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52451     msys_help $MISSING_DEPENDENCY
52452   else
52453     PKGHANDLER_COMMAND=
52454 
52455     case $PKGHANDLER in
52456       apt-get)
52457         apt_help     $MISSING_DEPENDENCY ;;
52458       yum)
52459         yum_help     $MISSING_DEPENDENCY ;;
52460       port)
52461         port_help    $MISSING_DEPENDENCY ;;
52462       pkgutil)
52463         pkgutil_help $MISSING_DEPENDENCY ;;
52464       pkgadd)
52465         pkgadd_help  $MISSING_DEPENDENCY ;;
52466     esac
52467 
52468     if test "x$PKGHANDLER_COMMAND" != x; then
52469       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52470     fi
52471   fi
52472 
52473       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52474     else
52475       INCLUDE_DTRACE=true
52476       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52477 $as_echo "yes, forced" >&6; }
52478     fi
52479   elif test "x$enable_dtrace" = "xno"; then
52480     INCLUDE_DTRACE=false
52481     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52482 $as_echo "no, forced" >&6; }
52483   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52484     if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52485       INCLUDE_DTRACE=false
52486       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52487 $as_echo "no, non-open linux build" >&6; }
52488     elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52489       INCLUDE_DTRACE=false
52490       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52491 $as_echo "no, missing dependencies" >&6; }
52492     else
52493       INCLUDE_DTRACE=true
52494       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52495 $as_echo "yes, dependencies present" >&6; }
52496     fi
52497   else
52498     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52499   fi
52500 
52501 
52502 
52503   # The user can in some cases supply additional jvm features. For the custom
52504   # variant, this defines the entire variant.
52505 
52506 # Check whether --with-jvm-features was given.
52507 if test "${with_jvm_features+set}" = set; then :
52508   withval=$with_jvm_features;
52509 fi
52510 
52511   if test "x$with_jvm_features" != x; then
52512     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52513 $as_echo_n "checking additional JVM features... " >&6; }
52514     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52515     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52516 $as_echo "$JVM_FEATURES" >&6; }
52517   fi
52518 
52519   # Verify that dependencies are met for explicitly set features.
52520   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52521     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52522   fi
52523 
52524   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52525     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52526   fi
52527 
52528   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52529     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52530   fi
52531 
52532   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52533     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52534   fi
52535 
52536   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52537     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52538   fi
52539 
52540   # Turn on additional features based on other parts of configure
52541   if test "x$INCLUDE_DTRACE" = "xtrue"; then
52542     JVM_FEATURES="$JVM_FEATURES dtrace"
52543   else
52544     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52545       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52546     fi
52547   fi
52548 
52549   if test "x$STATIC_BUILD" = "xtrue"; then
52550     JVM_FEATURES="$JVM_FEATURES static-build"
52551   else
52552     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52553       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52554     fi
52555   fi
52556 
52557   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52558     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52559       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52560     fi
52561   fi
52562 
52563   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52564     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52565       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52566     fi
52567   fi
52568 
52569   # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52570   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52571       test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52572       test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52573     JVM_FEATURES_jvmci="jvmci"
52574   else
52575     JVM_FEATURES_jvmci=""
52576   fi
52577 
52578   # All variants but minimal (and custom) get these features
52579   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52580 
52581   # Enable features depending on variant.
52582   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52583   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52584   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52585   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52586   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52587   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52588   JVM_FEATURES_custom="$JVM_FEATURES"
52589 
52590 
52591 
52592 
52593 
52594 
52595 
52596 
52597 
52598   # Used for verification of Makefiles by check-jvm-feature
52599 
52600 
52601   # We don't support --with-jvm-interpreter anymore, use zero instead.
52602 
52603 
52604 # Check whether --with-jvm-interpreter was given.
52605 if test "${with_jvm_interpreter+set}" = set; then :
52606   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52607 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52608 fi
52609 
52610 
52611 
52612 
52613 ###############################################################################
52614 #
52615 # Check dependencies for external and internal libraries.
52616 #
52617 ###############################################################################
52618 
52619 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52620 
52621   # When using cygwin or msys, we need a wrapper binary that renames
52622   # /cygdrive/c/ arguments into c:/ arguments and peeks into
52623   # @files and rewrites these too! This wrapper binary is
52624   # called fixpath.
52625   FIXPATH=
52626   if test "x$OPENJDK_BUILD_OS" = xwindows; then
52627     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52628 $as_echo_n "checking if fixpath can be created... " >&6; }
52629     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52630     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52631     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52632     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52633       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52634       FIXPATH="$FIXPATH_BIN -c"
52635     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52636       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52637       # @ was chosen as separator to minimize risk of other tools messing around with it
52638       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52639           | tr ' ' '\n' | grep '^/./' | sort | uniq`
52640       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52641       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52642     fi
52643     FIXPATH_SRC_W="$FIXPATH_SRC"
52644     FIXPATH_BIN_W="$FIXPATH_BIN"
52645 
52646   unix_path="$FIXPATH_SRC_W"
52647   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52648     windows_path=`$CYGPATH -m "$unix_path"`
52649     FIXPATH_SRC_W="$windows_path"
52650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52651     windows_path=`cmd //c echo $unix_path`
52652     FIXPATH_SRC_W="$windows_path"
52653   fi
52654 
52655 
52656   unix_path="$FIXPATH_BIN_W"
52657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52658     windows_path=`$CYGPATH -m "$unix_path"`
52659     FIXPATH_BIN_W="$windows_path"
52660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52661     windows_path=`cmd //c echo $unix_path`
52662     FIXPATH_BIN_W="$windows_path"
52663   fi
52664 
52665     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52666     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52667     cd $FIXPATH_DIR
52668     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52669     cd $CURDIR
52670 
52671     if test ! -x $FIXPATH_BIN; then
52672       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52673 $as_echo "no" >&6; }
52674       cat $FIXPATH_DIR/fixpath1.log
52675       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52676     fi
52677     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52678 $as_echo "yes" >&6; }
52679     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52680 $as_echo_n "checking if fixpath.exe works... " >&6; }
52681     cd $FIXPATH_DIR
52682     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52683         > $FIXPATH_DIR/fixpath2.log 2>&1
52684     cd $CURDIR
52685     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52686       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52687 $as_echo "no" >&6; }
52688       cat $FIXPATH_DIR/fixpath2.log
52689       as_fn_error $? "fixpath did not work!" "$LINENO" 5
52690     fi
52691     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52692 $as_echo "yes" >&6; }
52693 
52694     FIXPATH_DETACH_FLAG="--detach"
52695   fi
52696 
52697 
52698 
52699 
52700 
52701 
52702   # Check if X11 is needed
52703   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52704     # No X11 support on windows or macosx
52705     NEEDS_LIB_X11=false
52706   else
52707     if test "x$SUPPORT_HEADFUL" = xno; then
52708       # No X11 support if building headless-only
52709       NEEDS_LIB_X11=false
52710     else
52711       # All other instances need X11
52712       NEEDS_LIB_X11=true
52713     fi
52714   fi
52715 
52716   # Check if cups is needed
52717   if test "x$OPENJDK_TARGET_OS" = xwindows; then
52718     # Windows have a separate print system
52719     NEEDS_LIB_CUPS=false
52720   else
52721     NEEDS_LIB_CUPS=true
52722   fi
52723 
52724   # Check if freetype is needed
52725   if test "x$OPENJDK" = "xtrue"; then
52726     NEEDS_LIB_FREETYPE=true
52727   else
52728     NEEDS_LIB_FREETYPE=false
52729   fi
52730 
52731   # Check if alsa is needed
52732   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52733     NEEDS_LIB_ALSA=true
52734   else
52735     NEEDS_LIB_ALSA=false
52736   fi
52737 
52738   # Check if ffi is needed
52739   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52740     NEEDS_LIB_FFI=true
52741   else
52742     NEEDS_LIB_FFI=false
52743   fi
52744 
52745 
52746   # statically link libstdc++ before C++ ABI is stablized on Linux unless
52747   # dynamic build is configured on command line.
52748 
52749 # Check whether --with-stdc++lib was given.
52750 if test "${with_stdc__lib+set}" = set; then :
52751   withval=$with_stdc__lib;
52752         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52753                 && test "x$with_stdc__lib" != xdefault; then
52754           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52755         fi
52756 
52757 else
52758   with_stdc__lib=default
52759 
52760 fi
52761 
52762 
52763   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52764     # Test if -lstdc++ works.
52765     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
52766 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
52767     ac_ext=cpp
52768 ac_cpp='$CXXCPP $CPPFLAGS'
52769 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52770 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52771 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52772 
52773     OLD_CXXFLAGS="$CXXFLAGS"
52774     CXXFLAGS="$CXXFLAGS -lstdc++"
52775     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52776 /* end confdefs.h.  */
52777 
52778 int
52779 main ()
52780 {
52781 return 0;
52782   ;
52783   return 0;
52784 }
52785 _ACEOF
52786 if ac_fn_cxx_try_link "$LINENO"; then :
52787   has_dynamic_libstdcxx=yes
52788 else
52789   has_dynamic_libstdcxx=no
52790 fi
52791 rm -f core conftest.err conftest.$ac_objext \
52792     conftest$ac_exeext conftest.$ac_ext
52793     CXXFLAGS="$OLD_CXXFLAGS"
52794     ac_ext=cpp
52795 ac_cpp='$CXXCPP $CPPFLAGS'
52796 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52797 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52798 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52799 
52800     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
52801 $as_echo "$has_dynamic_libstdcxx" >&6; }
52802 
52803     # Test if stdc++ can be linked statically.
52804     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52805 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52806     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
52807     ac_ext=cpp
52808 ac_cpp='$CXXCPP $CPPFLAGS'
52809 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52810 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52811 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52812 
52813     OLD_LIBS="$LIBS"
52814     OLD_CXX="$CXX"
52815     LIBS="$STATIC_STDCXX_FLAGS"
52816     CXX="$CC"
52817     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52818 /* end confdefs.h.  */
52819 
52820 int
52821 main ()
52822 {
52823 return 0;
52824   ;
52825   return 0;
52826 }
52827 _ACEOF
52828 if ac_fn_cxx_try_link "$LINENO"; then :
52829   has_static_libstdcxx=yes
52830 else
52831   has_static_libstdcxx=no
52832 fi
52833 rm -f core conftest.err conftest.$ac_objext \
52834     conftest$ac_exeext conftest.$ac_ext
52835     LIBS="$OLD_LIBS"
52836     CXX="$OLD_CXX"
52837     ac_ext=cpp
52838 ac_cpp='$CXXCPP $CPPFLAGS'
52839 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52840 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52841 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52842 
52843     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52844 $as_echo "$has_static_libstdcxx" >&6; }
52845 
52846     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
52847       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
52848     fi
52849 
52850     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52851       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52852     fi
52853 
52854     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
52855       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
52856     fi
52857 
52858     # If dynamic was requested, it's available since it would fail above otherwise.
52859     # If dynamic wasn't requested, go with static unless it isn't available.
52860     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52861 $as_echo_n "checking how to link with libstdc++... " >&6; }
52862     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52863       LIBCXX="$LIBCXX -lstdc++"
52864       # To help comparisons with old build, put stdc++ first in JVM_LIBS
52865       JVM_LIBS="-lstdc++ $JVM_LIBS"
52866       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52867       # just use the same setting as for the TARGET toolchain.
52868       OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
52869       LDCXX="$CXX"
52870       STATIC_CXX_SETTING="STATIC_CXX=false"
52871       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52872 $as_echo "dynamic" >&6; }
52873     else
52874       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52875       JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
52876       # To help comparisons with old build, put stdc++ first in JVM_LIBS
52877       JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
52878       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52879       # just use the same setting as for the TARGET toolchain.
52880       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
52881       OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
52882       LDCXX="$CC"
52883       STATIC_CXX_SETTING="STATIC_CXX=true"
52884       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52885 $as_echo "static" >&6; }
52886     fi
52887   fi
52888 
52889 
52890   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52891   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52892     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52893   fi
52894 
52895   # TODO better (platform agnostic) test
52896   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
52897     LIBCXX="-lstdc++"
52898   fi
52899 
52900 
52901   # Setup Windows runtime dlls
52902   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52903 
52904 
52905 # Check whether --with-msvcr-dll was given.
52906 if test "${with_msvcr_dll+set}" = set; then :
52907   withval=$with_msvcr_dll;
52908 fi
52909 
52910 
52911   if test "x$with_msvcr_dll" != x; then
52912     # If given explicitely by user, do not probe. If not present, fail directly.
52913 
52914   DLL_NAME="$MSVCR_NAME"
52915   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52916   METHOD="--with-msvcr-dll"
52917   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52918     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52919 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52920 
52921     # Need to check if the found msvcr is correct architecture
52922     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52923 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52924     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52925     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52926       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52927       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52928       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52929         CORRECT_MSVCR_ARCH="PE32 executable"
52930       else
52931         CORRECT_MSVCR_ARCH="PE32+ executable"
52932       fi
52933     else
52934       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52935         CORRECT_MSVCR_ARCH=386
52936       else
52937         CORRECT_MSVCR_ARCH=x86-64
52938       fi
52939     fi
52940     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52941       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52942 $as_echo "ok" >&6; }
52943       MSVC_DLL="$POSSIBLE_MSVC_DLL"
52944 
52945   # Only process if variable expands to non-empty
52946 
52947   if test "x$MSVC_DLL" != x; then
52948     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52949 
52950   # Input might be given as Windows format, start by converting to
52951   # unix format.
52952   path="$MSVC_DLL"
52953   new_path=`$CYGPATH -u "$path"`
52954 
52955   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52956   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52957   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52958   # "foo.exe" is OK but "foo" is an error.
52959   #
52960   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52961   # It is also a way to make sure we got the proper file name for the real test later on.
52962   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52963   if test "x$test_shortpath" = x; then
52964     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52965 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52966     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52967   fi
52968 
52969   # Call helper function which possibly converts this using DOS-style short mode.
52970   # If so, the updated path is stored in $new_path.
52971 
52972   input_path="$new_path"
52973   # Check if we need to convert this using DOS-style short mode. If the path
52974   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52975   # take no chances and rewrite it.
52976   # Note: m4 eats our [], so we need to use [ and ] instead.
52977   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52978   if test "x$has_forbidden_chars" != x; then
52979     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52980     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52981     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52982     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52983       # Going to short mode and back again did indeed matter. Since short mode is
52984       # case insensitive, let's make it lowercase to improve readability.
52985       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52986       # Now convert it back to Unix-style (cygpath)
52987       input_path=`$CYGPATH -u "$shortmode_path"`
52988       new_path="$input_path"
52989     fi
52990   fi
52991 
52992   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52993   if test "x$test_cygdrive_prefix" = x; then
52994     # As a simple fix, exclude /usr/bin since it's not a real path.
52995     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52996       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52997       # a path prefixed by /cygdrive for fixpath to work.
52998       new_path="$CYGWIN_ROOT_PATH$input_path"
52999     fi
53000   fi
53001 
53002 
53003   if test "x$path" != "x$new_path"; then
53004     MSVC_DLL="$new_path"
53005     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53006 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53007   fi
53008 
53009     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53010 
53011   path="$MSVC_DLL"
53012   has_colon=`$ECHO $path | $GREP ^.:`
53013   new_path="$path"
53014   if test "x$has_colon" = x; then
53015     # Not in mixed or Windows style, start by that.
53016     new_path=`cmd //c echo $path`
53017   fi
53018 
53019 
53020   input_path="$new_path"
53021   # Check if we need to convert this using DOS-style short mode. If the path
53022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53023   # take no chances and rewrite it.
53024   # Note: m4 eats our [], so we need to use [ and ] instead.
53025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53026   if test "x$has_forbidden_chars" != x; then
53027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53028     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53029   fi
53030 
53031 
53032   windows_path="$new_path"
53033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53034     unix_path=`$CYGPATH -u "$windows_path"`
53035     new_path="$unix_path"
53036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53037     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53038     new_path="$unix_path"
53039   fi
53040 
53041   if test "x$path" != "x$new_path"; then
53042     MSVC_DLL="$new_path"
53043     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53044 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53045   fi
53046 
53047   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53048   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53049 
53050     else
53051       # We're on a unix platform. Hooray! :)
53052       path="$MSVC_DLL"
53053       has_space=`$ECHO "$path" | $GREP " "`
53054       if test "x$has_space" != x; then
53055         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53056 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53057         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53058       fi
53059 
53060       # Use eval to expand a potential ~
53061       eval path="$path"
53062       if test ! -f "$path" && test ! -d "$path"; then
53063         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53064       fi
53065 
53066       if test -d "$path"; then
53067         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53068       else
53069         dir="`$DIRNAME "$path"`"
53070         base="`$BASENAME "$path"`"
53071         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53072       fi
53073     fi
53074   fi
53075 
53076       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53077 $as_echo_n "checking for $DLL_NAME... " >&6; }
53078       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53079 $as_echo "$MSVC_DLL" >&6; }
53080     else
53081       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53082 $as_echo "incorrect, ignoring" >&6; }
53083       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53084 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53085     fi
53086   fi
53087 
53088     if test "x$MSVC_DLL" = x; then
53089       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53090     fi
53091     MSVCR_DLL="$MSVC_DLL"
53092   elif test "x$DEVKIT_MSVCR_DLL" != x; then
53093 
53094   DLL_NAME="$MSVCR_NAME"
53095   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53096   METHOD="devkit"
53097   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53098     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53099 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53100 
53101     # Need to check if the found msvcr is correct architecture
53102     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53103 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53104     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53105     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53106       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53107       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53108       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53109         CORRECT_MSVCR_ARCH="PE32 executable"
53110       else
53111         CORRECT_MSVCR_ARCH="PE32+ executable"
53112       fi
53113     else
53114       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53115         CORRECT_MSVCR_ARCH=386
53116       else
53117         CORRECT_MSVCR_ARCH=x86-64
53118       fi
53119     fi
53120     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53121       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53122 $as_echo "ok" >&6; }
53123       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53124 
53125   # Only process if variable expands to non-empty
53126 
53127   if test "x$MSVC_DLL" != x; then
53128     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53129 
53130   # Input might be given as Windows format, start by converting to
53131   # unix format.
53132   path="$MSVC_DLL"
53133   new_path=`$CYGPATH -u "$path"`
53134 
53135   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53136   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53137   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53138   # "foo.exe" is OK but "foo" is an error.
53139   #
53140   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53141   # It is also a way to make sure we got the proper file name for the real test later on.
53142   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53143   if test "x$test_shortpath" = x; then
53144     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53145 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53146     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53147   fi
53148 
53149   # Call helper function which possibly converts this using DOS-style short mode.
53150   # If so, the updated path is stored in $new_path.
53151 
53152   input_path="$new_path"
53153   # Check if we need to convert this using DOS-style short mode. If the path
53154   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53155   # take no chances and rewrite it.
53156   # Note: m4 eats our [], so we need to use [ and ] instead.
53157   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53158   if test "x$has_forbidden_chars" != x; then
53159     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53160     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53161     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53162     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53163       # Going to short mode and back again did indeed matter. Since short mode is
53164       # case insensitive, let's make it lowercase to improve readability.
53165       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53166       # Now convert it back to Unix-style (cygpath)
53167       input_path=`$CYGPATH -u "$shortmode_path"`
53168       new_path="$input_path"
53169     fi
53170   fi
53171 
53172   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53173   if test "x$test_cygdrive_prefix" = x; then
53174     # As a simple fix, exclude /usr/bin since it's not a real path.
53175     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53176       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53177       # a path prefixed by /cygdrive for fixpath to work.
53178       new_path="$CYGWIN_ROOT_PATH$input_path"
53179     fi
53180   fi
53181 
53182 
53183   if test "x$path" != "x$new_path"; then
53184     MSVC_DLL="$new_path"
53185     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53186 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53187   fi
53188 
53189     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53190 
53191   path="$MSVC_DLL"
53192   has_colon=`$ECHO $path | $GREP ^.:`
53193   new_path="$path"
53194   if test "x$has_colon" = x; then
53195     # Not in mixed or Windows style, start by that.
53196     new_path=`cmd //c echo $path`
53197   fi
53198 
53199 
53200   input_path="$new_path"
53201   # Check if we need to convert this using DOS-style short mode. If the path
53202   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53203   # take no chances and rewrite it.
53204   # Note: m4 eats our [], so we need to use [ and ] instead.
53205   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53206   if test "x$has_forbidden_chars" != x; then
53207     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53208     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53209   fi
53210 
53211 
53212   windows_path="$new_path"
53213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53214     unix_path=`$CYGPATH -u "$windows_path"`
53215     new_path="$unix_path"
53216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53217     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53218     new_path="$unix_path"
53219   fi
53220 
53221   if test "x$path" != "x$new_path"; then
53222     MSVC_DLL="$new_path"
53223     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53224 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53225   fi
53226 
53227   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53228   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53229 
53230     else
53231       # We're on a unix platform. Hooray! :)
53232       path="$MSVC_DLL"
53233       has_space=`$ECHO "$path" | $GREP " "`
53234       if test "x$has_space" != x; then
53235         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53236 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53237         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53238       fi
53239 
53240       # Use eval to expand a potential ~
53241       eval path="$path"
53242       if test ! -f "$path" && test ! -d "$path"; then
53243         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53244       fi
53245 
53246       if test -d "$path"; then
53247         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53248       else
53249         dir="`$DIRNAME "$path"`"
53250         base="`$BASENAME "$path"`"
53251         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53252       fi
53253     fi
53254   fi
53255 
53256       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53257 $as_echo_n "checking for $DLL_NAME... " >&6; }
53258       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53259 $as_echo "$MSVC_DLL" >&6; }
53260     else
53261       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53262 $as_echo "incorrect, ignoring" >&6; }
53263       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53264 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53265     fi
53266   fi
53267 
53268     if test "x$MSVC_DLL" = x; then
53269       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53270     fi
53271     MSVCR_DLL="$MSVC_DLL"
53272   else
53273 
53274   DLL_NAME="${MSVCR_NAME}"
53275   MSVC_DLL=
53276 
53277   if test "x$MSVC_DLL" = x; then
53278     # Probe: Using well-known location from Visual Studio 10.0
53279     if test "x$VCINSTALLDIR" != x; then
53280       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53281 
53282   windows_path="$CYGWIN_VC_INSTALL_DIR"
53283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53284     unix_path=`$CYGPATH -u "$windows_path"`
53285     CYGWIN_VC_INSTALL_DIR="$unix_path"
53286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53288     CYGWIN_VC_INSTALL_DIR="$unix_path"
53289   fi
53290 
53291       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53292         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53293       else
53294         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53295       fi
53296       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53297 
53298   DLL_NAME="$DLL_NAME"
53299   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53300   METHOD="well-known location in VCINSTALLDIR"
53301   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53302     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53303 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53304 
53305     # Need to check if the found msvcr is correct architecture
53306     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53307 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53308     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53309     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53310       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53311       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53312       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53313         CORRECT_MSVCR_ARCH="PE32 executable"
53314       else
53315         CORRECT_MSVCR_ARCH="PE32+ executable"
53316       fi
53317     else
53318       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53319         CORRECT_MSVCR_ARCH=386
53320       else
53321         CORRECT_MSVCR_ARCH=x86-64
53322       fi
53323     fi
53324     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53325       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53326 $as_echo "ok" >&6; }
53327       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53328 
53329   # Only process if variable expands to non-empty
53330 
53331   if test "x$MSVC_DLL" != x; then
53332     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53333 
53334   # Input might be given as Windows format, start by converting to
53335   # unix format.
53336   path="$MSVC_DLL"
53337   new_path=`$CYGPATH -u "$path"`
53338 
53339   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53340   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53341   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53342   # "foo.exe" is OK but "foo" is an error.
53343   #
53344   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53345   # It is also a way to make sure we got the proper file name for the real test later on.
53346   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53347   if test "x$test_shortpath" = x; then
53348     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53349 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53350     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53351   fi
53352 
53353   # Call helper function which possibly converts this using DOS-style short mode.
53354   # If so, the updated path is stored in $new_path.
53355 
53356   input_path="$new_path"
53357   # Check if we need to convert this using DOS-style short mode. If the path
53358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53359   # take no chances and rewrite it.
53360   # Note: m4 eats our [], so we need to use [ and ] instead.
53361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53362   if test "x$has_forbidden_chars" != x; then
53363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53364     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53365     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53366     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53367       # Going to short mode and back again did indeed matter. Since short mode is
53368       # case insensitive, let's make it lowercase to improve readability.
53369       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53370       # Now convert it back to Unix-style (cygpath)
53371       input_path=`$CYGPATH -u "$shortmode_path"`
53372       new_path="$input_path"
53373     fi
53374   fi
53375 
53376   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53377   if test "x$test_cygdrive_prefix" = x; then
53378     # As a simple fix, exclude /usr/bin since it's not a real path.
53379     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53380       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53381       # a path prefixed by /cygdrive for fixpath to work.
53382       new_path="$CYGWIN_ROOT_PATH$input_path"
53383     fi
53384   fi
53385 
53386 
53387   if test "x$path" != "x$new_path"; then
53388     MSVC_DLL="$new_path"
53389     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53390 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53391   fi
53392 
53393     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53394 
53395   path="$MSVC_DLL"
53396   has_colon=`$ECHO $path | $GREP ^.:`
53397   new_path="$path"
53398   if test "x$has_colon" = x; then
53399     # Not in mixed or Windows style, start by that.
53400     new_path=`cmd //c echo $path`
53401   fi
53402 
53403 
53404   input_path="$new_path"
53405   # Check if we need to convert this using DOS-style short mode. If the path
53406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53407   # take no chances and rewrite it.
53408   # Note: m4 eats our [], so we need to use [ and ] instead.
53409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53410   if test "x$has_forbidden_chars" != x; then
53411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53412     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53413   fi
53414 
53415 
53416   windows_path="$new_path"
53417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53418     unix_path=`$CYGPATH -u "$windows_path"`
53419     new_path="$unix_path"
53420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53422     new_path="$unix_path"
53423   fi
53424 
53425   if test "x$path" != "x$new_path"; then
53426     MSVC_DLL="$new_path"
53427     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53428 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53429   fi
53430 
53431   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53432   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53433 
53434     else
53435       # We're on a unix platform. Hooray! :)
53436       path="$MSVC_DLL"
53437       has_space=`$ECHO "$path" | $GREP " "`
53438       if test "x$has_space" != x; then
53439         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53440 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53441         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53442       fi
53443 
53444       # Use eval to expand a potential ~
53445       eval path="$path"
53446       if test ! -f "$path" && test ! -d "$path"; then
53447         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53448       fi
53449 
53450       if test -d "$path"; then
53451         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53452       else
53453         dir="`$DIRNAME "$path"`"
53454         base="`$BASENAME "$path"`"
53455         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53456       fi
53457     fi
53458   fi
53459 
53460       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53461 $as_echo_n "checking for $DLL_NAME... " >&6; }
53462       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53463 $as_echo "$MSVC_DLL" >&6; }
53464     else
53465       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53466 $as_echo "incorrect, ignoring" >&6; }
53467       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53468 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53469     fi
53470   fi
53471 
53472     fi
53473   fi
53474 
53475   if test "x$MSVC_DLL" = x; then
53476     # Probe: Check in the Boot JDK directory.
53477     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53478 
53479   DLL_NAME="$DLL_NAME"
53480   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53481   METHOD="well-known location in Boot JDK"
53482   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53483     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53484 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53485 
53486     # Need to check if the found msvcr is correct architecture
53487     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53488 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53489     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53490     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53491       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53492       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53493       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53494         CORRECT_MSVCR_ARCH="PE32 executable"
53495       else
53496         CORRECT_MSVCR_ARCH="PE32+ executable"
53497       fi
53498     else
53499       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53500         CORRECT_MSVCR_ARCH=386
53501       else
53502         CORRECT_MSVCR_ARCH=x86-64
53503       fi
53504     fi
53505     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53506       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53507 $as_echo "ok" >&6; }
53508       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53509 
53510   # Only process if variable expands to non-empty
53511 
53512   if test "x$MSVC_DLL" != x; then
53513     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53514 
53515   # Input might be given as Windows format, start by converting to
53516   # unix format.
53517   path="$MSVC_DLL"
53518   new_path=`$CYGPATH -u "$path"`
53519 
53520   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53521   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53522   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53523   # "foo.exe" is OK but "foo" is an error.
53524   #
53525   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53526   # It is also a way to make sure we got the proper file name for the real test later on.
53527   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53528   if test "x$test_shortpath" = x; then
53529     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53530 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53531     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53532   fi
53533 
53534   # Call helper function which possibly converts this using DOS-style short mode.
53535   # If so, the updated path is stored in $new_path.
53536 
53537   input_path="$new_path"
53538   # Check if we need to convert this using DOS-style short mode. If the path
53539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53540   # take no chances and rewrite it.
53541   # Note: m4 eats our [], so we need to use [ and ] instead.
53542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53543   if test "x$has_forbidden_chars" != x; then
53544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53545     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53546     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53547     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53548       # Going to short mode and back again did indeed matter. Since short mode is
53549       # case insensitive, let's make it lowercase to improve readability.
53550       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53551       # Now convert it back to Unix-style (cygpath)
53552       input_path=`$CYGPATH -u "$shortmode_path"`
53553       new_path="$input_path"
53554     fi
53555   fi
53556 
53557   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53558   if test "x$test_cygdrive_prefix" = x; then
53559     # As a simple fix, exclude /usr/bin since it's not a real path.
53560     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53561       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53562       # a path prefixed by /cygdrive for fixpath to work.
53563       new_path="$CYGWIN_ROOT_PATH$input_path"
53564     fi
53565   fi
53566 
53567 
53568   if test "x$path" != "x$new_path"; then
53569     MSVC_DLL="$new_path"
53570     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53571 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53572   fi
53573 
53574     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53575 
53576   path="$MSVC_DLL"
53577   has_colon=`$ECHO $path | $GREP ^.:`
53578   new_path="$path"
53579   if test "x$has_colon" = x; then
53580     # Not in mixed or Windows style, start by that.
53581     new_path=`cmd //c echo $path`
53582   fi
53583 
53584 
53585   input_path="$new_path"
53586   # Check if we need to convert this using DOS-style short mode. If the path
53587   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53588   # take no chances and rewrite it.
53589   # Note: m4 eats our [], so we need to use [ and ] instead.
53590   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53591   if test "x$has_forbidden_chars" != x; then
53592     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53593     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53594   fi
53595 
53596 
53597   windows_path="$new_path"
53598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53599     unix_path=`$CYGPATH -u "$windows_path"`
53600     new_path="$unix_path"
53601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53602     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53603     new_path="$unix_path"
53604   fi
53605 
53606   if test "x$path" != "x$new_path"; then
53607     MSVC_DLL="$new_path"
53608     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53609 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53610   fi
53611 
53612   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53613   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53614 
53615     else
53616       # We're on a unix platform. Hooray! :)
53617       path="$MSVC_DLL"
53618       has_space=`$ECHO "$path" | $GREP " "`
53619       if test "x$has_space" != x; then
53620         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53621 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53622         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53623       fi
53624 
53625       # Use eval to expand a potential ~
53626       eval path="$path"
53627       if test ! -f "$path" && test ! -d "$path"; then
53628         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53629       fi
53630 
53631       if test -d "$path"; then
53632         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53633       else
53634         dir="`$DIRNAME "$path"`"
53635         base="`$BASENAME "$path"`"
53636         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53637       fi
53638     fi
53639   fi
53640 
53641       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53642 $as_echo_n "checking for $DLL_NAME... " >&6; }
53643       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53644 $as_echo "$MSVC_DLL" >&6; }
53645     else
53646       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53647 $as_echo "incorrect, ignoring" >&6; }
53648       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53649 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53650     fi
53651   fi
53652 
53653   fi
53654 
53655   if test "x$MSVC_DLL" = x; then
53656     # Probe: Look in the Windows system32 directory
53657     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53658 
53659   windows_path="$CYGWIN_SYSTEMROOT"
53660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53661     unix_path=`$CYGPATH -u "$windows_path"`
53662     CYGWIN_SYSTEMROOT="$unix_path"
53663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53665     CYGWIN_SYSTEMROOT="$unix_path"
53666   fi
53667 
53668     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53669 
53670   DLL_NAME="$DLL_NAME"
53671   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53672   METHOD="well-known location in SYSTEMROOT"
53673   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53674     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53675 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53676 
53677     # Need to check if the found msvcr is correct architecture
53678     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53679 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53680     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53681     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53682       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53683       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53684       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53685         CORRECT_MSVCR_ARCH="PE32 executable"
53686       else
53687         CORRECT_MSVCR_ARCH="PE32+ executable"
53688       fi
53689     else
53690       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53691         CORRECT_MSVCR_ARCH=386
53692       else
53693         CORRECT_MSVCR_ARCH=x86-64
53694       fi
53695     fi
53696     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53697       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53698 $as_echo "ok" >&6; }
53699       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53700 
53701   # Only process if variable expands to non-empty
53702 
53703   if test "x$MSVC_DLL" != x; then
53704     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53705 
53706   # Input might be given as Windows format, start by converting to
53707   # unix format.
53708   path="$MSVC_DLL"
53709   new_path=`$CYGPATH -u "$path"`
53710 
53711   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53712   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53713   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53714   # "foo.exe" is OK but "foo" is an error.
53715   #
53716   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53717   # It is also a way to make sure we got the proper file name for the real test later on.
53718   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53719   if test "x$test_shortpath" = x; then
53720     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53721 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53722     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53723   fi
53724 
53725   # Call helper function which possibly converts this using DOS-style short mode.
53726   # If so, the updated path is stored in $new_path.
53727 
53728   input_path="$new_path"
53729   # Check if we need to convert this using DOS-style short mode. If the path
53730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53731   # take no chances and rewrite it.
53732   # Note: m4 eats our [], so we need to use [ and ] instead.
53733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53734   if test "x$has_forbidden_chars" != x; then
53735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53736     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53737     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53738     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53739       # Going to short mode and back again did indeed matter. Since short mode is
53740       # case insensitive, let's make it lowercase to improve readability.
53741       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53742       # Now convert it back to Unix-style (cygpath)
53743       input_path=`$CYGPATH -u "$shortmode_path"`
53744       new_path="$input_path"
53745     fi
53746   fi
53747 
53748   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53749   if test "x$test_cygdrive_prefix" = x; then
53750     # As a simple fix, exclude /usr/bin since it's not a real path.
53751     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53752       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53753       # a path prefixed by /cygdrive for fixpath to work.
53754       new_path="$CYGWIN_ROOT_PATH$input_path"
53755     fi
53756   fi
53757 
53758 
53759   if test "x$path" != "x$new_path"; then
53760     MSVC_DLL="$new_path"
53761     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53762 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53763   fi
53764 
53765     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53766 
53767   path="$MSVC_DLL"
53768   has_colon=`$ECHO $path | $GREP ^.:`
53769   new_path="$path"
53770   if test "x$has_colon" = x; then
53771     # Not in mixed or Windows style, start by that.
53772     new_path=`cmd //c echo $path`
53773   fi
53774 
53775 
53776   input_path="$new_path"
53777   # Check if we need to convert this using DOS-style short mode. If the path
53778   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53779   # take no chances and rewrite it.
53780   # Note: m4 eats our [], so we need to use [ and ] instead.
53781   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53782   if test "x$has_forbidden_chars" != x; then
53783     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53784     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53785   fi
53786 
53787 
53788   windows_path="$new_path"
53789   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53790     unix_path=`$CYGPATH -u "$windows_path"`
53791     new_path="$unix_path"
53792   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53793     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53794     new_path="$unix_path"
53795   fi
53796 
53797   if test "x$path" != "x$new_path"; then
53798     MSVC_DLL="$new_path"
53799     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53800 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53801   fi
53802 
53803   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53804   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53805 
53806     else
53807       # We're on a unix platform. Hooray! :)
53808       path="$MSVC_DLL"
53809       has_space=`$ECHO "$path" | $GREP " "`
53810       if test "x$has_space" != x; then
53811         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53812 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53813         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53814       fi
53815 
53816       # Use eval to expand a potential ~
53817       eval path="$path"
53818       if test ! -f "$path" && test ! -d "$path"; then
53819         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53820       fi
53821 
53822       if test -d "$path"; then
53823         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53824       else
53825         dir="`$DIRNAME "$path"`"
53826         base="`$BASENAME "$path"`"
53827         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53828       fi
53829     fi
53830   fi
53831 
53832       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53833 $as_echo_n "checking for $DLL_NAME... " >&6; }
53834       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53835 $as_echo "$MSVC_DLL" >&6; }
53836     else
53837       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53838 $as_echo "incorrect, ignoring" >&6; }
53839       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53840 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53841     fi
53842   fi
53843 
53844   fi
53845 
53846   if test "x$MSVC_DLL" = x; then
53847     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53848     if test "x$VS100COMNTOOLS" != x; then
53849       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53850 
53851   windows_path="$CYGWIN_VS_TOOLS_DIR"
53852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53853     unix_path=`$CYGPATH -u "$windows_path"`
53854     CYGWIN_VS_TOOLS_DIR="$unix_path"
53855   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53856     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53857     CYGWIN_VS_TOOLS_DIR="$unix_path"
53858   fi
53859 
53860       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53861         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53862             | $GREP -i /x64/ | $HEAD --lines 1`
53863       else
53864         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53865             | $GREP -i /x86/ | $HEAD --lines 1`
53866       fi
53867 
53868   DLL_NAME="$DLL_NAME"
53869   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53870   METHOD="search of VS100COMNTOOLS"
53871   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53872     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53873 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53874 
53875     # Need to check if the found msvcr is correct architecture
53876     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53877 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53878     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53879     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53880       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53881       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53882       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53883         CORRECT_MSVCR_ARCH="PE32 executable"
53884       else
53885         CORRECT_MSVCR_ARCH="PE32+ executable"
53886       fi
53887     else
53888       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53889         CORRECT_MSVCR_ARCH=386
53890       else
53891         CORRECT_MSVCR_ARCH=x86-64
53892       fi
53893     fi
53894     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53895       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53896 $as_echo "ok" >&6; }
53897       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53898 
53899   # Only process if variable expands to non-empty
53900 
53901   if test "x$MSVC_DLL" != x; then
53902     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53903 
53904   # Input might be given as Windows format, start by converting to
53905   # unix format.
53906   path="$MSVC_DLL"
53907   new_path=`$CYGPATH -u "$path"`
53908 
53909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53912   # "foo.exe" is OK but "foo" is an error.
53913   #
53914   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53915   # It is also a way to make sure we got the proper file name for the real test later on.
53916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53917   if test "x$test_shortpath" = x; then
53918     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53919 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53920     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53921   fi
53922 
53923   # Call helper function which possibly converts this using DOS-style short mode.
53924   # If so, the updated path is stored in $new_path.
53925 
53926   input_path="$new_path"
53927   # Check if we need to convert this using DOS-style short mode. If the path
53928   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53929   # take no chances and rewrite it.
53930   # Note: m4 eats our [], so we need to use [ and ] instead.
53931   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53932   if test "x$has_forbidden_chars" != x; then
53933     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53934     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53935     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53936     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53937       # Going to short mode and back again did indeed matter. Since short mode is
53938       # case insensitive, let's make it lowercase to improve readability.
53939       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53940       # Now convert it back to Unix-style (cygpath)
53941       input_path=`$CYGPATH -u "$shortmode_path"`
53942       new_path="$input_path"
53943     fi
53944   fi
53945 
53946   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53947   if test "x$test_cygdrive_prefix" = x; then
53948     # As a simple fix, exclude /usr/bin since it's not a real path.
53949     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53950       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53951       # a path prefixed by /cygdrive for fixpath to work.
53952       new_path="$CYGWIN_ROOT_PATH$input_path"
53953     fi
53954   fi
53955 
53956 
53957   if test "x$path" != "x$new_path"; then
53958     MSVC_DLL="$new_path"
53959     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53960 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53961   fi
53962 
53963     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53964 
53965   path="$MSVC_DLL"
53966   has_colon=`$ECHO $path | $GREP ^.:`
53967   new_path="$path"
53968   if test "x$has_colon" = x; then
53969     # Not in mixed or Windows style, start by that.
53970     new_path=`cmd //c echo $path`
53971   fi
53972 
53973 
53974   input_path="$new_path"
53975   # Check if we need to convert this using DOS-style short mode. If the path
53976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53977   # take no chances and rewrite it.
53978   # Note: m4 eats our [], so we need to use [ and ] instead.
53979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53980   if test "x$has_forbidden_chars" != x; then
53981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53982     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53983   fi
53984 
53985 
53986   windows_path="$new_path"
53987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53988     unix_path=`$CYGPATH -u "$windows_path"`
53989     new_path="$unix_path"
53990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53992     new_path="$unix_path"
53993   fi
53994 
53995   if test "x$path" != "x$new_path"; then
53996     MSVC_DLL="$new_path"
53997     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53998 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53999   fi
54000 
54001   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54002   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54003 
54004     else
54005       # We're on a unix platform. Hooray! :)
54006       path="$MSVC_DLL"
54007       has_space=`$ECHO "$path" | $GREP " "`
54008       if test "x$has_space" != x; then
54009         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54010 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54011         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54012       fi
54013 
54014       # Use eval to expand a potential ~
54015       eval path="$path"
54016       if test ! -f "$path" && test ! -d "$path"; then
54017         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54018       fi
54019 
54020       if test -d "$path"; then
54021         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54022       else
54023         dir="`$DIRNAME "$path"`"
54024         base="`$BASENAME "$path"`"
54025         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54026       fi
54027     fi
54028   fi
54029 
54030       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54031 $as_echo_n "checking for $DLL_NAME... " >&6; }
54032       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54033 $as_echo "$MSVC_DLL" >&6; }
54034     else
54035       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54036 $as_echo "incorrect, ignoring" >&6; }
54037       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54038 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54039     fi
54040   fi
54041 
54042     fi
54043   fi
54044 
54045   if test "x$MSVC_DLL" = x; then
54046     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54047     # (This was the original behaviour; kept since it might turn something up)
54048     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54049       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54050         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54051             | $GREP x64 | $HEAD --lines 1`
54052       else
54053         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54054             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54055         if test "x$POSSIBLE_MSVC_DLL" = x; then
54056           # We're grasping at straws now...
54057           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54058               | $HEAD --lines 1`
54059         fi
54060       fi
54061 
54062 
54063   DLL_NAME="$DLL_NAME"
54064   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54065   METHOD="search of VCINSTALLDIR"
54066   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54067     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54068 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54069 
54070     # Need to check if the found msvcr is correct architecture
54071     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54072 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54073     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54074     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54075       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54076       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54077       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54078         CORRECT_MSVCR_ARCH="PE32 executable"
54079       else
54080         CORRECT_MSVCR_ARCH="PE32+ executable"
54081       fi
54082     else
54083       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54084         CORRECT_MSVCR_ARCH=386
54085       else
54086         CORRECT_MSVCR_ARCH=x86-64
54087       fi
54088     fi
54089     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54090       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54091 $as_echo "ok" >&6; }
54092       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54093 
54094   # Only process if variable expands to non-empty
54095 
54096   if test "x$MSVC_DLL" != x; then
54097     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54098 
54099   # Input might be given as Windows format, start by converting to
54100   # unix format.
54101   path="$MSVC_DLL"
54102   new_path=`$CYGPATH -u "$path"`
54103 
54104   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54105   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54106   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54107   # "foo.exe" is OK but "foo" is an error.
54108   #
54109   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54110   # It is also a way to make sure we got the proper file name for the real test later on.
54111   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54112   if test "x$test_shortpath" = x; then
54113     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54114 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54115     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54116   fi
54117 
54118   # Call helper function which possibly converts this using DOS-style short mode.
54119   # If so, the updated path is stored in $new_path.
54120 
54121   input_path="$new_path"
54122   # Check if we need to convert this using DOS-style short mode. If the path
54123   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54124   # take no chances and rewrite it.
54125   # Note: m4 eats our [], so we need to use [ and ] instead.
54126   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54127   if test "x$has_forbidden_chars" != x; then
54128     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54129     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54130     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54131     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54132       # Going to short mode and back again did indeed matter. Since short mode is
54133       # case insensitive, let's make it lowercase to improve readability.
54134       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54135       # Now convert it back to Unix-style (cygpath)
54136       input_path=`$CYGPATH -u "$shortmode_path"`
54137       new_path="$input_path"
54138     fi
54139   fi
54140 
54141   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54142   if test "x$test_cygdrive_prefix" = x; then
54143     # As a simple fix, exclude /usr/bin since it's not a real path.
54144     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54145       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54146       # a path prefixed by /cygdrive for fixpath to work.
54147       new_path="$CYGWIN_ROOT_PATH$input_path"
54148     fi
54149   fi
54150 
54151 
54152   if test "x$path" != "x$new_path"; then
54153     MSVC_DLL="$new_path"
54154     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54155 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54156   fi
54157 
54158     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54159 
54160   path="$MSVC_DLL"
54161   has_colon=`$ECHO $path | $GREP ^.:`
54162   new_path="$path"
54163   if test "x$has_colon" = x; then
54164     # Not in mixed or Windows style, start by that.
54165     new_path=`cmd //c echo $path`
54166   fi
54167 
54168 
54169   input_path="$new_path"
54170   # Check if we need to convert this using DOS-style short mode. If the path
54171   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54172   # take no chances and rewrite it.
54173   # Note: m4 eats our [], so we need to use [ and ] instead.
54174   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54175   if test "x$has_forbidden_chars" != x; then
54176     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54177     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54178   fi
54179 
54180 
54181   windows_path="$new_path"
54182   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54183     unix_path=`$CYGPATH -u "$windows_path"`
54184     new_path="$unix_path"
54185   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54186     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54187     new_path="$unix_path"
54188   fi
54189 
54190   if test "x$path" != "x$new_path"; then
54191     MSVC_DLL="$new_path"
54192     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54193 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54194   fi
54195 
54196   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54197   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54198 
54199     else
54200       # We're on a unix platform. Hooray! :)
54201       path="$MSVC_DLL"
54202       has_space=`$ECHO "$path" | $GREP " "`
54203       if test "x$has_space" != x; then
54204         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54205 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54206         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54207       fi
54208 
54209       # Use eval to expand a potential ~
54210       eval path="$path"
54211       if test ! -f "$path" && test ! -d "$path"; then
54212         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54213       fi
54214 
54215       if test -d "$path"; then
54216         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54217       else
54218         dir="`$DIRNAME "$path"`"
54219         base="`$BASENAME "$path"`"
54220         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54221       fi
54222     fi
54223   fi
54224 
54225       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54226 $as_echo_n "checking for $DLL_NAME... " >&6; }
54227       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54228 $as_echo "$MSVC_DLL" >&6; }
54229     else
54230       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54231 $as_echo "incorrect, ignoring" >&6; }
54232       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54233 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54234     fi
54235   fi
54236 
54237     fi
54238   fi
54239 
54240   if test "x$MSVC_DLL" = x; then
54241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54242 $as_echo_n "checking for $DLL_NAME... " >&6; }
54243     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54244 $as_echo "no" >&6; }
54245     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54246   fi
54247 
54248     MSVCR_DLL="$MSVC_DLL"
54249   fi
54250 
54251 
54252 
54253 # Check whether --with-msvcp-dll was given.
54254 if test "${with_msvcp_dll+set}" = set; then :
54255   withval=$with_msvcp_dll;
54256 fi
54257 
54258 
54259   if test "x$MSVCP_NAME" != "x"; then
54260     if test "x$with_msvcp_dll" != x; then
54261       # If given explicitely by user, do not probe. If not present, fail directly.
54262 
54263   DLL_NAME="$MSVCP_NAME"
54264   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54265   METHOD="--with-msvcp-dll"
54266   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54267     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54268 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54269 
54270     # Need to check if the found msvcr is correct architecture
54271     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54272 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54273     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54274     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54275       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54276       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54277       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54278         CORRECT_MSVCR_ARCH="PE32 executable"
54279       else
54280         CORRECT_MSVCR_ARCH="PE32+ executable"
54281       fi
54282     else
54283       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54284         CORRECT_MSVCR_ARCH=386
54285       else
54286         CORRECT_MSVCR_ARCH=x86-64
54287       fi
54288     fi
54289     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54290       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54291 $as_echo "ok" >&6; }
54292       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54293 
54294   # Only process if variable expands to non-empty
54295 
54296   if test "x$MSVC_DLL" != x; then
54297     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54298 
54299   # Input might be given as Windows format, start by converting to
54300   # unix format.
54301   path="$MSVC_DLL"
54302   new_path=`$CYGPATH -u "$path"`
54303 
54304   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54305   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54306   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54307   # "foo.exe" is OK but "foo" is an error.
54308   #
54309   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54310   # It is also a way to make sure we got the proper file name for the real test later on.
54311   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54312   if test "x$test_shortpath" = x; then
54313     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54314 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54315     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54316   fi
54317 
54318   # Call helper function which possibly converts this using DOS-style short mode.
54319   # If so, the updated path is stored in $new_path.
54320 
54321   input_path="$new_path"
54322   # Check if we need to convert this using DOS-style short mode. If the path
54323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54324   # take no chances and rewrite it.
54325   # Note: m4 eats our [], so we need to use [ and ] instead.
54326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54327   if test "x$has_forbidden_chars" != x; then
54328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54329     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54330     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54331     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54332       # Going to short mode and back again did indeed matter. Since short mode is
54333       # case insensitive, let's make it lowercase to improve readability.
54334       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54335       # Now convert it back to Unix-style (cygpath)
54336       input_path=`$CYGPATH -u "$shortmode_path"`
54337       new_path="$input_path"
54338     fi
54339   fi
54340 
54341   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54342   if test "x$test_cygdrive_prefix" = x; then
54343     # As a simple fix, exclude /usr/bin since it's not a real path.
54344     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54345       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54346       # a path prefixed by /cygdrive for fixpath to work.
54347       new_path="$CYGWIN_ROOT_PATH$input_path"
54348     fi
54349   fi
54350 
54351 
54352   if test "x$path" != "x$new_path"; then
54353     MSVC_DLL="$new_path"
54354     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54355 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54356   fi
54357 
54358     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54359 
54360   path="$MSVC_DLL"
54361   has_colon=`$ECHO $path | $GREP ^.:`
54362   new_path="$path"
54363   if test "x$has_colon" = x; then
54364     # Not in mixed or Windows style, start by that.
54365     new_path=`cmd //c echo $path`
54366   fi
54367 
54368 
54369   input_path="$new_path"
54370   # Check if we need to convert this using DOS-style short mode. If the path
54371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54372   # take no chances and rewrite it.
54373   # Note: m4 eats our [], so we need to use [ and ] instead.
54374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54375   if test "x$has_forbidden_chars" != x; then
54376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54377     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54378   fi
54379 
54380 
54381   windows_path="$new_path"
54382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54383     unix_path=`$CYGPATH -u "$windows_path"`
54384     new_path="$unix_path"
54385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54387     new_path="$unix_path"
54388   fi
54389 
54390   if test "x$path" != "x$new_path"; then
54391     MSVC_DLL="$new_path"
54392     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54393 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54394   fi
54395 
54396   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54397   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54398 
54399     else
54400       # We're on a unix platform. Hooray! :)
54401       path="$MSVC_DLL"
54402       has_space=`$ECHO "$path" | $GREP " "`
54403       if test "x$has_space" != x; then
54404         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54405 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54406         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54407       fi
54408 
54409       # Use eval to expand a potential ~
54410       eval path="$path"
54411       if test ! -f "$path" && test ! -d "$path"; then
54412         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54413       fi
54414 
54415       if test -d "$path"; then
54416         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54417       else
54418         dir="`$DIRNAME "$path"`"
54419         base="`$BASENAME "$path"`"
54420         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54421       fi
54422     fi
54423   fi
54424 
54425       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54426 $as_echo_n "checking for $DLL_NAME... " >&6; }
54427       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54428 $as_echo "$MSVC_DLL" >&6; }
54429     else
54430       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54431 $as_echo "incorrect, ignoring" >&6; }
54432       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54433 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54434     fi
54435   fi
54436 
54437       if test "x$MSVC_DLL" = x; then
54438         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54439       fi
54440       MSVCP_DLL="$MSVC_DLL"
54441     elif test "x$DEVKIT_MSVCP_DLL" != x; then
54442 
54443   DLL_NAME="$MSVCP_NAME"
54444   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54445   METHOD="devkit"
54446   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54447     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54448 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54449 
54450     # Need to check if the found msvcr is correct architecture
54451     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54452 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54453     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54454     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54455       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54456       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54457       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54458         CORRECT_MSVCR_ARCH="PE32 executable"
54459       else
54460         CORRECT_MSVCR_ARCH="PE32+ executable"
54461       fi
54462     else
54463       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54464         CORRECT_MSVCR_ARCH=386
54465       else
54466         CORRECT_MSVCR_ARCH=x86-64
54467       fi
54468     fi
54469     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54470       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54471 $as_echo "ok" >&6; }
54472       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54473 
54474   # Only process if variable expands to non-empty
54475 
54476   if test "x$MSVC_DLL" != x; then
54477     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54478 
54479   # Input might be given as Windows format, start by converting to
54480   # unix format.
54481   path="$MSVC_DLL"
54482   new_path=`$CYGPATH -u "$path"`
54483 
54484   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54485   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54486   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54487   # "foo.exe" is OK but "foo" is an error.
54488   #
54489   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54490   # It is also a way to make sure we got the proper file name for the real test later on.
54491   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54492   if test "x$test_shortpath" = x; then
54493     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54494 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54495     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54496   fi
54497 
54498   # Call helper function which possibly converts this using DOS-style short mode.
54499   # If so, the updated path is stored in $new_path.
54500 
54501   input_path="$new_path"
54502   # Check if we need to convert this using DOS-style short mode. If the path
54503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54504   # take no chances and rewrite it.
54505   # Note: m4 eats our [], so we need to use [ and ] instead.
54506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54507   if test "x$has_forbidden_chars" != x; then
54508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54509     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54510     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54511     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54512       # Going to short mode and back again did indeed matter. Since short mode is
54513       # case insensitive, let's make it lowercase to improve readability.
54514       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54515       # Now convert it back to Unix-style (cygpath)
54516       input_path=`$CYGPATH -u "$shortmode_path"`
54517       new_path="$input_path"
54518     fi
54519   fi
54520 
54521   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54522   if test "x$test_cygdrive_prefix" = x; then
54523     # As a simple fix, exclude /usr/bin since it's not a real path.
54524     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54525       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54526       # a path prefixed by /cygdrive for fixpath to work.
54527       new_path="$CYGWIN_ROOT_PATH$input_path"
54528     fi
54529   fi
54530 
54531 
54532   if test "x$path" != "x$new_path"; then
54533     MSVC_DLL="$new_path"
54534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54535 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54536   fi
54537 
54538     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54539 
54540   path="$MSVC_DLL"
54541   has_colon=`$ECHO $path | $GREP ^.:`
54542   new_path="$path"
54543   if test "x$has_colon" = x; then
54544     # Not in mixed or Windows style, start by that.
54545     new_path=`cmd //c echo $path`
54546   fi
54547 
54548 
54549   input_path="$new_path"
54550   # Check if we need to convert this using DOS-style short mode. If the path
54551   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54552   # take no chances and rewrite it.
54553   # Note: m4 eats our [], so we need to use [ and ] instead.
54554   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54555   if test "x$has_forbidden_chars" != x; then
54556     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54557     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54558   fi
54559 
54560 
54561   windows_path="$new_path"
54562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54563     unix_path=`$CYGPATH -u "$windows_path"`
54564     new_path="$unix_path"
54565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54567     new_path="$unix_path"
54568   fi
54569 
54570   if test "x$path" != "x$new_path"; then
54571     MSVC_DLL="$new_path"
54572     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54573 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54574   fi
54575 
54576   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54577   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54578 
54579     else
54580       # We're on a unix platform. Hooray! :)
54581       path="$MSVC_DLL"
54582       has_space=`$ECHO "$path" | $GREP " "`
54583       if test "x$has_space" != x; then
54584         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54585 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54586         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54587       fi
54588 
54589       # Use eval to expand a potential ~
54590       eval path="$path"
54591       if test ! -f "$path" && test ! -d "$path"; then
54592         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54593       fi
54594 
54595       if test -d "$path"; then
54596         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54597       else
54598         dir="`$DIRNAME "$path"`"
54599         base="`$BASENAME "$path"`"
54600         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54601       fi
54602     fi
54603   fi
54604 
54605       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54606 $as_echo_n "checking for $DLL_NAME... " >&6; }
54607       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54608 $as_echo "$MSVC_DLL" >&6; }
54609     else
54610       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54611 $as_echo "incorrect, ignoring" >&6; }
54612       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54613 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54614     fi
54615   fi
54616 
54617       if test "x$MSVC_DLL" = x; then
54618         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54619       fi
54620       MSVCP_DLL="$MSVC_DLL"
54621     else
54622 
54623   DLL_NAME="${MSVCP_NAME}"
54624   MSVC_DLL=
54625 
54626   if test "x$MSVC_DLL" = x; then
54627     # Probe: Using well-known location from Visual Studio 10.0
54628     if test "x$VCINSTALLDIR" != x; then
54629       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54630 
54631   windows_path="$CYGWIN_VC_INSTALL_DIR"
54632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54633     unix_path=`$CYGPATH -u "$windows_path"`
54634     CYGWIN_VC_INSTALL_DIR="$unix_path"
54635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54637     CYGWIN_VC_INSTALL_DIR="$unix_path"
54638   fi
54639 
54640       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54641         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54642       else
54643         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54644       fi
54645       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54646 
54647   DLL_NAME="$DLL_NAME"
54648   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54649   METHOD="well-known location in VCINSTALLDIR"
54650   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54651     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54652 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54653 
54654     # Need to check if the found msvcr is correct architecture
54655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54656 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54657     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54658     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54659       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54660       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54661       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54662         CORRECT_MSVCR_ARCH="PE32 executable"
54663       else
54664         CORRECT_MSVCR_ARCH="PE32+ executable"
54665       fi
54666     else
54667       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54668         CORRECT_MSVCR_ARCH=386
54669       else
54670         CORRECT_MSVCR_ARCH=x86-64
54671       fi
54672     fi
54673     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54674       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54675 $as_echo "ok" >&6; }
54676       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54677 
54678   # Only process if variable expands to non-empty
54679 
54680   if test "x$MSVC_DLL" != x; then
54681     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54682 
54683   # Input might be given as Windows format, start by converting to
54684   # unix format.
54685   path="$MSVC_DLL"
54686   new_path=`$CYGPATH -u "$path"`
54687 
54688   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54689   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54690   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54691   # "foo.exe" is OK but "foo" is an error.
54692   #
54693   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54694   # It is also a way to make sure we got the proper file name for the real test later on.
54695   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54696   if test "x$test_shortpath" = x; then
54697     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54698 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54699     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54700   fi
54701 
54702   # Call helper function which possibly converts this using DOS-style short mode.
54703   # If so, the updated path is stored in $new_path.
54704 
54705   input_path="$new_path"
54706   # Check if we need to convert this using DOS-style short mode. If the path
54707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54708   # take no chances and rewrite it.
54709   # Note: m4 eats our [], so we need to use [ and ] instead.
54710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54711   if test "x$has_forbidden_chars" != x; then
54712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54713     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54714     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54715     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54716       # Going to short mode and back again did indeed matter. Since short mode is
54717       # case insensitive, let's make it lowercase to improve readability.
54718       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54719       # Now convert it back to Unix-style (cygpath)
54720       input_path=`$CYGPATH -u "$shortmode_path"`
54721       new_path="$input_path"
54722     fi
54723   fi
54724 
54725   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54726   if test "x$test_cygdrive_prefix" = x; then
54727     # As a simple fix, exclude /usr/bin since it's not a real path.
54728     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54729       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54730       # a path prefixed by /cygdrive for fixpath to work.
54731       new_path="$CYGWIN_ROOT_PATH$input_path"
54732     fi
54733   fi
54734 
54735 
54736   if test "x$path" != "x$new_path"; then
54737     MSVC_DLL="$new_path"
54738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54739 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54740   fi
54741 
54742     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54743 
54744   path="$MSVC_DLL"
54745   has_colon=`$ECHO $path | $GREP ^.:`
54746   new_path="$path"
54747   if test "x$has_colon" = x; then
54748     # Not in mixed or Windows style, start by that.
54749     new_path=`cmd //c echo $path`
54750   fi
54751 
54752 
54753   input_path="$new_path"
54754   # Check if we need to convert this using DOS-style short mode. If the path
54755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54756   # take no chances and rewrite it.
54757   # Note: m4 eats our [], so we need to use [ and ] instead.
54758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54759   if test "x$has_forbidden_chars" != x; then
54760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54761     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54762   fi
54763 
54764 
54765   windows_path="$new_path"
54766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54767     unix_path=`$CYGPATH -u "$windows_path"`
54768     new_path="$unix_path"
54769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54771     new_path="$unix_path"
54772   fi
54773 
54774   if test "x$path" != "x$new_path"; then
54775     MSVC_DLL="$new_path"
54776     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54777 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54778   fi
54779 
54780   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54781   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54782 
54783     else
54784       # We're on a unix platform. Hooray! :)
54785       path="$MSVC_DLL"
54786       has_space=`$ECHO "$path" | $GREP " "`
54787       if test "x$has_space" != x; then
54788         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54789 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54790         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54791       fi
54792 
54793       # Use eval to expand a potential ~
54794       eval path="$path"
54795       if test ! -f "$path" && test ! -d "$path"; then
54796         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54797       fi
54798 
54799       if test -d "$path"; then
54800         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54801       else
54802         dir="`$DIRNAME "$path"`"
54803         base="`$BASENAME "$path"`"
54804         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54805       fi
54806     fi
54807   fi
54808 
54809       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54810 $as_echo_n "checking for $DLL_NAME... " >&6; }
54811       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54812 $as_echo "$MSVC_DLL" >&6; }
54813     else
54814       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54815 $as_echo "incorrect, ignoring" >&6; }
54816       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54817 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54818     fi
54819   fi
54820 
54821     fi
54822   fi
54823 
54824   if test "x$MSVC_DLL" = x; then
54825     # Probe: Check in the Boot JDK directory.
54826     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54827 
54828   DLL_NAME="$DLL_NAME"
54829   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54830   METHOD="well-known location in Boot JDK"
54831   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54832     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54833 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54834 
54835     # Need to check if the found msvcr is correct architecture
54836     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54837 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54838     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54839     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54840       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54841       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54842       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54843         CORRECT_MSVCR_ARCH="PE32 executable"
54844       else
54845         CORRECT_MSVCR_ARCH="PE32+ executable"
54846       fi
54847     else
54848       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54849         CORRECT_MSVCR_ARCH=386
54850       else
54851         CORRECT_MSVCR_ARCH=x86-64
54852       fi
54853     fi
54854     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54855       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54856 $as_echo "ok" >&6; }
54857       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54858 
54859   # Only process if variable expands to non-empty
54860 
54861   if test "x$MSVC_DLL" != x; then
54862     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54863 
54864   # Input might be given as Windows format, start by converting to
54865   # unix format.
54866   path="$MSVC_DLL"
54867   new_path=`$CYGPATH -u "$path"`
54868 
54869   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54870   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54871   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54872   # "foo.exe" is OK but "foo" is an error.
54873   #
54874   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54875   # It is also a way to make sure we got the proper file name for the real test later on.
54876   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54877   if test "x$test_shortpath" = x; then
54878     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54879 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54880     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54881   fi
54882 
54883   # Call helper function which possibly converts this using DOS-style short mode.
54884   # If so, the updated path is stored in $new_path.
54885 
54886   input_path="$new_path"
54887   # Check if we need to convert this using DOS-style short mode. If the path
54888   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54889   # take no chances and rewrite it.
54890   # Note: m4 eats our [], so we need to use [ and ] instead.
54891   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54892   if test "x$has_forbidden_chars" != x; then
54893     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54894     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54895     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54896     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54897       # Going to short mode and back again did indeed matter. Since short mode is
54898       # case insensitive, let's make it lowercase to improve readability.
54899       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54900       # Now convert it back to Unix-style (cygpath)
54901       input_path=`$CYGPATH -u "$shortmode_path"`
54902       new_path="$input_path"
54903     fi
54904   fi
54905 
54906   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54907   if test "x$test_cygdrive_prefix" = x; then
54908     # As a simple fix, exclude /usr/bin since it's not a real path.
54909     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54910       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54911       # a path prefixed by /cygdrive for fixpath to work.
54912       new_path="$CYGWIN_ROOT_PATH$input_path"
54913     fi
54914   fi
54915 
54916 
54917   if test "x$path" != "x$new_path"; then
54918     MSVC_DLL="$new_path"
54919     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54920 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54921   fi
54922 
54923     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54924 
54925   path="$MSVC_DLL"
54926   has_colon=`$ECHO $path | $GREP ^.:`
54927   new_path="$path"
54928   if test "x$has_colon" = x; then
54929     # Not in mixed or Windows style, start by that.
54930     new_path=`cmd //c echo $path`
54931   fi
54932 
54933 
54934   input_path="$new_path"
54935   # Check if we need to convert this using DOS-style short mode. If the path
54936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54937   # take no chances and rewrite it.
54938   # Note: m4 eats our [], so we need to use [ and ] instead.
54939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54940   if test "x$has_forbidden_chars" != x; then
54941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54942     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54943   fi
54944 
54945 
54946   windows_path="$new_path"
54947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54948     unix_path=`$CYGPATH -u "$windows_path"`
54949     new_path="$unix_path"
54950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54951     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54952     new_path="$unix_path"
54953   fi
54954 
54955   if test "x$path" != "x$new_path"; then
54956     MSVC_DLL="$new_path"
54957     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54958 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54959   fi
54960 
54961   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54962   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54963 
54964     else
54965       # We're on a unix platform. Hooray! :)
54966       path="$MSVC_DLL"
54967       has_space=`$ECHO "$path" | $GREP " "`
54968       if test "x$has_space" != x; then
54969         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54970 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54971         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54972       fi
54973 
54974       # Use eval to expand a potential ~
54975       eval path="$path"
54976       if test ! -f "$path" && test ! -d "$path"; then
54977         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54978       fi
54979 
54980       if test -d "$path"; then
54981         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54982       else
54983         dir="`$DIRNAME "$path"`"
54984         base="`$BASENAME "$path"`"
54985         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54986       fi
54987     fi
54988   fi
54989 
54990       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54991 $as_echo_n "checking for $DLL_NAME... " >&6; }
54992       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54993 $as_echo "$MSVC_DLL" >&6; }
54994     else
54995       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54996 $as_echo "incorrect, ignoring" >&6; }
54997       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54998 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54999     fi
55000   fi
55001 
55002   fi
55003 
55004   if test "x$MSVC_DLL" = x; then
55005     # Probe: Look in the Windows system32 directory
55006     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55007 
55008   windows_path="$CYGWIN_SYSTEMROOT"
55009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55010     unix_path=`$CYGPATH -u "$windows_path"`
55011     CYGWIN_SYSTEMROOT="$unix_path"
55012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55014     CYGWIN_SYSTEMROOT="$unix_path"
55015   fi
55016 
55017     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55018 
55019   DLL_NAME="$DLL_NAME"
55020   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55021   METHOD="well-known location in SYSTEMROOT"
55022   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55023     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55024 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55025 
55026     # Need to check if the found msvcr is correct architecture
55027     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55028 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55029     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55030     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55031       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55032       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55033       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55034         CORRECT_MSVCR_ARCH="PE32 executable"
55035       else
55036         CORRECT_MSVCR_ARCH="PE32+ executable"
55037       fi
55038     else
55039       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55040         CORRECT_MSVCR_ARCH=386
55041       else
55042         CORRECT_MSVCR_ARCH=x86-64
55043       fi
55044     fi
55045     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55046       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55047 $as_echo "ok" >&6; }
55048       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55049 
55050   # Only process if variable expands to non-empty
55051 
55052   if test "x$MSVC_DLL" != x; then
55053     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55054 
55055   # Input might be given as Windows format, start by converting to
55056   # unix format.
55057   path="$MSVC_DLL"
55058   new_path=`$CYGPATH -u "$path"`
55059 
55060   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55061   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55062   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55063   # "foo.exe" is OK but "foo" is an error.
55064   #
55065   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55066   # It is also a way to make sure we got the proper file name for the real test later on.
55067   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55068   if test "x$test_shortpath" = x; then
55069     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55070 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55071     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55072   fi
55073 
55074   # Call helper function which possibly converts this using DOS-style short mode.
55075   # If so, the updated path is stored in $new_path.
55076 
55077   input_path="$new_path"
55078   # Check if we need to convert this using DOS-style short mode. If the path
55079   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55080   # take no chances and rewrite it.
55081   # Note: m4 eats our [], so we need to use [ and ] instead.
55082   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55083   if test "x$has_forbidden_chars" != x; then
55084     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55085     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55086     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55087     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55088       # Going to short mode and back again did indeed matter. Since short mode is
55089       # case insensitive, let's make it lowercase to improve readability.
55090       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55091       # Now convert it back to Unix-style (cygpath)
55092       input_path=`$CYGPATH -u "$shortmode_path"`
55093       new_path="$input_path"
55094     fi
55095   fi
55096 
55097   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55098   if test "x$test_cygdrive_prefix" = x; then
55099     # As a simple fix, exclude /usr/bin since it's not a real path.
55100     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55101       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55102       # a path prefixed by /cygdrive for fixpath to work.
55103       new_path="$CYGWIN_ROOT_PATH$input_path"
55104     fi
55105   fi
55106 
55107 
55108   if test "x$path" != "x$new_path"; then
55109     MSVC_DLL="$new_path"
55110     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55111 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55112   fi
55113 
55114     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55115 
55116   path="$MSVC_DLL"
55117   has_colon=`$ECHO $path | $GREP ^.:`
55118   new_path="$path"
55119   if test "x$has_colon" = x; then
55120     # Not in mixed or Windows style, start by that.
55121     new_path=`cmd //c echo $path`
55122   fi
55123 
55124 
55125   input_path="$new_path"
55126   # Check if we need to convert this using DOS-style short mode. If the path
55127   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55128   # take no chances and rewrite it.
55129   # Note: m4 eats our [], so we need to use [ and ] instead.
55130   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55131   if test "x$has_forbidden_chars" != x; then
55132     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55133     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55134   fi
55135 
55136 
55137   windows_path="$new_path"
55138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55139     unix_path=`$CYGPATH -u "$windows_path"`
55140     new_path="$unix_path"
55141   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55142     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55143     new_path="$unix_path"
55144   fi
55145 
55146   if test "x$path" != "x$new_path"; then
55147     MSVC_DLL="$new_path"
55148     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55149 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55150   fi
55151 
55152   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55153   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55154 
55155     else
55156       # We're on a unix platform. Hooray! :)
55157       path="$MSVC_DLL"
55158       has_space=`$ECHO "$path" | $GREP " "`
55159       if test "x$has_space" != x; then
55160         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55161 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55162         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55163       fi
55164 
55165       # Use eval to expand a potential ~
55166       eval path="$path"
55167       if test ! -f "$path" && test ! -d "$path"; then
55168         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55169       fi
55170 
55171       if test -d "$path"; then
55172         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55173       else
55174         dir="`$DIRNAME "$path"`"
55175         base="`$BASENAME "$path"`"
55176         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55177       fi
55178     fi
55179   fi
55180 
55181       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55182 $as_echo_n "checking for $DLL_NAME... " >&6; }
55183       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55184 $as_echo "$MSVC_DLL" >&6; }
55185     else
55186       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55187 $as_echo "incorrect, ignoring" >&6; }
55188       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55189 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55190     fi
55191   fi
55192 
55193   fi
55194 
55195   if test "x$MSVC_DLL" = x; then
55196     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55197     if test "x$VS100COMNTOOLS" != x; then
55198       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55199 
55200   windows_path="$CYGWIN_VS_TOOLS_DIR"
55201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55202     unix_path=`$CYGPATH -u "$windows_path"`
55203     CYGWIN_VS_TOOLS_DIR="$unix_path"
55204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55206     CYGWIN_VS_TOOLS_DIR="$unix_path"
55207   fi
55208 
55209       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55210         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55211             | $GREP -i /x64/ | $HEAD --lines 1`
55212       else
55213         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55214             | $GREP -i /x86/ | $HEAD --lines 1`
55215       fi
55216 
55217   DLL_NAME="$DLL_NAME"
55218   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55219   METHOD="search of VS100COMNTOOLS"
55220   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55221     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55222 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55223 
55224     # Need to check if the found msvcr is correct architecture
55225     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55226 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55227     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55228     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55229       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55230       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55231       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55232         CORRECT_MSVCR_ARCH="PE32 executable"
55233       else
55234         CORRECT_MSVCR_ARCH="PE32+ executable"
55235       fi
55236     else
55237       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55238         CORRECT_MSVCR_ARCH=386
55239       else
55240         CORRECT_MSVCR_ARCH=x86-64
55241       fi
55242     fi
55243     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55244       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55245 $as_echo "ok" >&6; }
55246       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55247 
55248   # Only process if variable expands to non-empty
55249 
55250   if test "x$MSVC_DLL" != x; then
55251     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55252 
55253   # Input might be given as Windows format, start by converting to
55254   # unix format.
55255   path="$MSVC_DLL"
55256   new_path=`$CYGPATH -u "$path"`
55257 
55258   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55259   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55260   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55261   # "foo.exe" is OK but "foo" is an error.
55262   #
55263   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55264   # It is also a way to make sure we got the proper file name for the real test later on.
55265   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55266   if test "x$test_shortpath" = x; then
55267     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55268 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55269     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55270   fi
55271 
55272   # Call helper function which possibly converts this using DOS-style short mode.
55273   # If so, the updated path is stored in $new_path.
55274 
55275   input_path="$new_path"
55276   # Check if we need to convert this using DOS-style short mode. If the path
55277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55278   # take no chances and rewrite it.
55279   # Note: m4 eats our [], so we need to use [ and ] instead.
55280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55281   if test "x$has_forbidden_chars" != x; then
55282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55286       # Going to short mode and back again did indeed matter. Since short mode is
55287       # case insensitive, let's make it lowercase to improve readability.
55288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55289       # Now convert it back to Unix-style (cygpath)
55290       input_path=`$CYGPATH -u "$shortmode_path"`
55291       new_path="$input_path"
55292     fi
55293   fi
55294 
55295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55296   if test "x$test_cygdrive_prefix" = x; then
55297     # As a simple fix, exclude /usr/bin since it's not a real path.
55298     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55300       # a path prefixed by /cygdrive for fixpath to work.
55301       new_path="$CYGWIN_ROOT_PATH$input_path"
55302     fi
55303   fi
55304 
55305 
55306   if test "x$path" != "x$new_path"; then
55307     MSVC_DLL="$new_path"
55308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55309 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55310   fi
55311 
55312     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55313 
55314   path="$MSVC_DLL"
55315   has_colon=`$ECHO $path | $GREP ^.:`
55316   new_path="$path"
55317   if test "x$has_colon" = x; then
55318     # Not in mixed or Windows style, start by that.
55319     new_path=`cmd //c echo $path`
55320   fi
55321 
55322 
55323   input_path="$new_path"
55324   # Check if we need to convert this using DOS-style short mode. If the path
55325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55326   # take no chances and rewrite it.
55327   # Note: m4 eats our [], so we need to use [ and ] instead.
55328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55329   if test "x$has_forbidden_chars" != x; then
55330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55331     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55332   fi
55333 
55334 
55335   windows_path="$new_path"
55336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55337     unix_path=`$CYGPATH -u "$windows_path"`
55338     new_path="$unix_path"
55339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55341     new_path="$unix_path"
55342   fi
55343 
55344   if test "x$path" != "x$new_path"; then
55345     MSVC_DLL="$new_path"
55346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55347 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55348   fi
55349 
55350   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55351   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55352 
55353     else
55354       # We're on a unix platform. Hooray! :)
55355       path="$MSVC_DLL"
55356       has_space=`$ECHO "$path" | $GREP " "`
55357       if test "x$has_space" != x; then
55358         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55359 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55360         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55361       fi
55362 
55363       # Use eval to expand a potential ~
55364       eval path="$path"
55365       if test ! -f "$path" && test ! -d "$path"; then
55366         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55367       fi
55368 
55369       if test -d "$path"; then
55370         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55371       else
55372         dir="`$DIRNAME "$path"`"
55373         base="`$BASENAME "$path"`"
55374         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55375       fi
55376     fi
55377   fi
55378 
55379       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55380 $as_echo_n "checking for $DLL_NAME... " >&6; }
55381       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55382 $as_echo "$MSVC_DLL" >&6; }
55383     else
55384       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55385 $as_echo "incorrect, ignoring" >&6; }
55386       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55387 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55388     fi
55389   fi
55390 
55391     fi
55392   fi
55393 
55394   if test "x$MSVC_DLL" = x; then
55395     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55396     # (This was the original behaviour; kept since it might turn something up)
55397     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55398       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55399         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55400             | $GREP x64 | $HEAD --lines 1`
55401       else
55402         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55403             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55404         if test "x$POSSIBLE_MSVC_DLL" = x; then
55405           # We're grasping at straws now...
55406           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55407               | $HEAD --lines 1`
55408         fi
55409       fi
55410 
55411 
55412   DLL_NAME="$DLL_NAME"
55413   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55414   METHOD="search of VCINSTALLDIR"
55415   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55416     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55417 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55418 
55419     # Need to check if the found msvcr is correct architecture
55420     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55421 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55422     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55423     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55424       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55425       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55426       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55427         CORRECT_MSVCR_ARCH="PE32 executable"
55428       else
55429         CORRECT_MSVCR_ARCH="PE32+ executable"
55430       fi
55431     else
55432       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55433         CORRECT_MSVCR_ARCH=386
55434       else
55435         CORRECT_MSVCR_ARCH=x86-64
55436       fi
55437     fi
55438     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55439       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55440 $as_echo "ok" >&6; }
55441       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55442 
55443   # Only process if variable expands to non-empty
55444 
55445   if test "x$MSVC_DLL" != x; then
55446     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55447 
55448   # Input might be given as Windows format, start by converting to
55449   # unix format.
55450   path="$MSVC_DLL"
55451   new_path=`$CYGPATH -u "$path"`
55452 
55453   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55454   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55455   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55456   # "foo.exe" is OK but "foo" is an error.
55457   #
55458   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55459   # It is also a way to make sure we got the proper file name for the real test later on.
55460   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55461   if test "x$test_shortpath" = x; then
55462     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55463 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55464     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55465   fi
55466 
55467   # Call helper function which possibly converts this using DOS-style short mode.
55468   # If so, the updated path is stored in $new_path.
55469 
55470   input_path="$new_path"
55471   # Check if we need to convert this using DOS-style short mode. If the path
55472   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55473   # take no chances and rewrite it.
55474   # Note: m4 eats our [], so we need to use [ and ] instead.
55475   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55476   if test "x$has_forbidden_chars" != x; then
55477     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55478     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55479     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55480     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55481       # Going to short mode and back again did indeed matter. Since short mode is
55482       # case insensitive, let's make it lowercase to improve readability.
55483       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55484       # Now convert it back to Unix-style (cygpath)
55485       input_path=`$CYGPATH -u "$shortmode_path"`
55486       new_path="$input_path"
55487     fi
55488   fi
55489 
55490   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55491   if test "x$test_cygdrive_prefix" = x; then
55492     # As a simple fix, exclude /usr/bin since it's not a real path.
55493     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55494       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55495       # a path prefixed by /cygdrive for fixpath to work.
55496       new_path="$CYGWIN_ROOT_PATH$input_path"
55497     fi
55498   fi
55499 
55500 
55501   if test "x$path" != "x$new_path"; then
55502     MSVC_DLL="$new_path"
55503     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55504 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55505   fi
55506 
55507     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55508 
55509   path="$MSVC_DLL"
55510   has_colon=`$ECHO $path | $GREP ^.:`
55511   new_path="$path"
55512   if test "x$has_colon" = x; then
55513     # Not in mixed or Windows style, start by that.
55514     new_path=`cmd //c echo $path`
55515   fi
55516 
55517 
55518   input_path="$new_path"
55519   # Check if we need to convert this using DOS-style short mode. If the path
55520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55521   # take no chances and rewrite it.
55522   # Note: m4 eats our [], so we need to use [ and ] instead.
55523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55524   if test "x$has_forbidden_chars" != x; then
55525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55526     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55527   fi
55528 
55529 
55530   windows_path="$new_path"
55531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55532     unix_path=`$CYGPATH -u "$windows_path"`
55533     new_path="$unix_path"
55534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55536     new_path="$unix_path"
55537   fi
55538 
55539   if test "x$path" != "x$new_path"; then
55540     MSVC_DLL="$new_path"
55541     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55542 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55543   fi
55544 
55545   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55546   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55547 
55548     else
55549       # We're on a unix platform. Hooray! :)
55550       path="$MSVC_DLL"
55551       has_space=`$ECHO "$path" | $GREP " "`
55552       if test "x$has_space" != x; then
55553         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55554 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55555         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55556       fi
55557 
55558       # Use eval to expand a potential ~
55559       eval path="$path"
55560       if test ! -f "$path" && test ! -d "$path"; then
55561         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55562       fi
55563 
55564       if test -d "$path"; then
55565         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55566       else
55567         dir="`$DIRNAME "$path"`"
55568         base="`$BASENAME "$path"`"
55569         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55570       fi
55571     fi
55572   fi
55573 
55574       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55575 $as_echo_n "checking for $DLL_NAME... " >&6; }
55576       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55577 $as_echo "$MSVC_DLL" >&6; }
55578     else
55579       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55580 $as_echo "incorrect, ignoring" >&6; }
55581       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55582 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55583     fi
55584   fi
55585 
55586     fi
55587   fi
55588 
55589   if test "x$MSVC_DLL" = x; then
55590     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55591 $as_echo_n "checking for $DLL_NAME... " >&6; }
55592     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55593 $as_echo "no" >&6; }
55594     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55595   fi
55596 
55597       MSVCP_DLL="$MSVC_DLL"
55598     fi
55599 
55600   fi
55601 
55602   fi
55603 
55604 
55605   if test "x$NEEDS_LIB_X11" = xfalse; then
55606     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55607       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55608 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55609     fi
55610     X_CFLAGS=
55611     X_LIBS=
55612   else
55613 
55614     if test "x${with_x}" = xno; then
55615       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55616     fi
55617 
55618     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55619       # The user has specified a X11 base directory. Use it for includes and
55620       # libraries, unless explicitely overridden.
55621       if test "x$x_includes" = xNONE; then
55622         x_includes="${with_x}/include"
55623       fi
55624       if test "x$x_libraries" = xNONE; then
55625         x_libraries="${with_x}/lib"
55626       fi
55627     else
55628       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55629       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55630       # --x-libraries for the sysroot, if that seems to be correct.
55631       if test "x$SYSROOT" != "x"; then
55632         if test "x$x_includes" = xNONE; then
55633           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55634             x_includes="$SYSROOT/usr/X11R6/include"
55635           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55636             x_includes="$SYSROOT/usr/include"
55637           fi
55638         fi
55639         if test "x$x_libraries" = xNONE; then
55640           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55641             x_libraries="$SYSROOT/usr/X11R6/lib"
55642           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55643             x_libraries="$SYSROOT/usr/lib64"
55644           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55645             x_libraries="$SYSROOT/usr/lib"
55646           fi
55647         fi
55648       fi
55649     fi
55650 
55651     # Now let autoconf do it's magic
55652     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55653 $as_echo_n "checking for X... " >&6; }
55654 
55655 
55656 # Check whether --with-x was given.
55657 if test "${with_x+set}" = set; then :
55658   withval=$with_x;
55659 fi
55660 
55661 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55662 if test "x$with_x" = xno; then
55663   # The user explicitly disabled X.
55664   have_x=disabled
55665 else
55666   case $x_includes,$x_libraries in #(
55667     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55668     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55669   $as_echo_n "(cached) " >&6
55670 else
55671   # One or both of the vars are not set, and there is no cached value.
55672 ac_x_includes=no ac_x_libraries=no
55673 rm -f -r conftest.dir
55674 if mkdir conftest.dir; then
55675   cd conftest.dir
55676   cat >Imakefile <<'_ACEOF'
55677 incroot:
55678         @echo incroot='${INCROOT}'
55679 usrlibdir:
55680         @echo usrlibdir='${USRLIBDIR}'
55681 libdir:
55682         @echo libdir='${LIBDIR}'
55683 _ACEOF
55684   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55685     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55686     for ac_var in incroot usrlibdir libdir; do
55687       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55688     done
55689     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55690     for ac_extension in a so sl dylib la dll; do
55691       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55692          test -f "$ac_im_libdir/libX11.$ac_extension"; then
55693         ac_im_usrlibdir=$ac_im_libdir; break
55694       fi
55695     done
55696     # Screen out bogus values from the imake configuration.  They are
55697     # bogus both because they are the default anyway, and because
55698     # using them would break gcc on systems where it needs fixed includes.
55699     case $ac_im_incroot in
55700         /usr/include) ac_x_includes= ;;
55701         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55702     esac
55703     case $ac_im_usrlibdir in
55704         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
55705         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55706     esac
55707   fi
55708   cd ..
55709   rm -f -r conftest.dir
55710 fi
55711 
55712 # Standard set of common directories for X headers.
55713 # Check X11 before X11Rn because it is often a symlink to the current release.
55714 ac_x_header_dirs='
55715 /usr/X11/include
55716 /usr/X11R7/include
55717 /usr/X11R6/include
55718 /usr/X11R5/include
55719 /usr/X11R4/include
55720 
55721 /usr/include/X11
55722 /usr/include/X11R7
55723 /usr/include/X11R6
55724 /usr/include/X11R5
55725 /usr/include/X11R4
55726 
55727 /usr/local/X11/include
55728 /usr/local/X11R7/include
55729 /usr/local/X11R6/include
55730 /usr/local/X11R5/include
55731 /usr/local/X11R4/include
55732 
55733 /usr/local/include/X11
55734 /usr/local/include/X11R7
55735 /usr/local/include/X11R6
55736 /usr/local/include/X11R5
55737 /usr/local/include/X11R4
55738 
55739 /usr/X386/include
55740 /usr/x386/include
55741 /usr/XFree86/include/X11
55742 
55743 /usr/include
55744 /usr/local/include
55745 /usr/unsupported/include
55746 /usr/athena/include
55747 /usr/local/x11r5/include
55748 /usr/lpp/Xamples/include
55749 
55750 /usr/openwin/include
55751 /usr/openwin/share/include'
55752 
55753 if test "$ac_x_includes" = no; then
55754   # Guess where to find include files, by looking for Xlib.h.
55755   # First, try using that file with no special directory specified.
55756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55757 /* end confdefs.h.  */
55758 #include <X11/Xlib.h>
55759 _ACEOF
55760 if ac_fn_cxx_try_cpp "$LINENO"; then :
55761   # We can compile using X headers with no special include directory.
55762 ac_x_includes=
55763 else
55764   for ac_dir in $ac_x_header_dirs; do
55765   if test -r "$ac_dir/X11/Xlib.h"; then
55766     ac_x_includes=$ac_dir
55767     break
55768   fi
55769 done
55770 fi
55771 rm -f conftest.err conftest.i conftest.$ac_ext
55772 fi # $ac_x_includes = no
55773 
55774 if test "$ac_x_libraries" = no; then
55775   # Check for the libraries.
55776   # See if we find them without any special options.
55777   # Don't add to $LIBS permanently.
55778   ac_save_LIBS=$LIBS
55779   LIBS="-lX11 $LIBS"
55780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55781 /* end confdefs.h.  */
55782 #include <X11/Xlib.h>
55783 int
55784 main ()
55785 {
55786 XrmInitialize ()
55787   ;
55788   return 0;
55789 }
55790 _ACEOF
55791 if ac_fn_cxx_try_link "$LINENO"; then :
55792   LIBS=$ac_save_LIBS
55793 # We can link X programs with no special library path.
55794 ac_x_libraries=
55795 else
55796   LIBS=$ac_save_LIBS
55797 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55798 do
55799   # Don't even attempt the hair of trying to link an X program!
55800   for ac_extension in a so sl dylib la dll; do
55801     if test -r "$ac_dir/libX11.$ac_extension"; then
55802       ac_x_libraries=$ac_dir
55803       break 2
55804     fi
55805   done
55806 done
55807 fi
55808 rm -f core conftest.err conftest.$ac_objext \
55809     conftest$ac_exeext conftest.$ac_ext
55810 fi # $ac_x_libraries = no
55811 
55812 case $ac_x_includes,$ac_x_libraries in #(
55813   no,* | *,no | *\'*)
55814     # Didn't find X, or a directory has "'" in its name.
55815     ac_cv_have_x="have_x=no";; #(
55816   *)
55817     # Record where we found X for the cache.
55818     ac_cv_have_x="have_x=yes\
55819         ac_x_includes='$ac_x_includes'\
55820         ac_x_libraries='$ac_x_libraries'"
55821 esac
55822 fi
55823 ;; #(
55824     *) have_x=yes;;
55825   esac
55826   eval "$ac_cv_have_x"
55827 fi # $with_x != no
55828 
55829 if test "$have_x" != yes; then
55830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55831 $as_echo "$have_x" >&6; }
55832   no_x=yes
55833 else
55834   # If each of the values was on the command line, it overrides each guess.
55835   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55836   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55837   # Update the cache value to reflect the command line values.
55838   ac_cv_have_x="have_x=yes\
55839         ac_x_includes='$x_includes'\
55840         ac_x_libraries='$x_libraries'"
55841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55842 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55843 fi
55844 
55845     if test "$no_x" = yes; then
55846   # Not all programs may use this symbol, but it does not hurt to define it.
55847 
55848 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55849 
55850   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55851 else
55852   if test -n "$x_includes"; then
55853     X_CFLAGS="$X_CFLAGS -I$x_includes"
55854   fi
55855 
55856   # It would also be nice to do this for all -L options, not just this one.
55857   if test -n "$x_libraries"; then
55858     X_LIBS="$X_LIBS -L$x_libraries"
55859     # For Solaris; some versions of Sun CC require a space after -R and
55860     # others require no space.  Words are not sufficient . . . .
55861     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55862 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
55863     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55864     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55865     ac_cxx_werror_flag=yes
55866     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55867 /* end confdefs.h.  */
55868 
55869 int
55870 main ()
55871 {
55872 
55873   ;
55874   return 0;
55875 }
55876 _ACEOF
55877 if ac_fn_cxx_try_link "$LINENO"; then :
55878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55879 $as_echo "no" >&6; }
55880        X_LIBS="$X_LIBS -R$x_libraries"
55881 else
55882   LIBS="$ac_xsave_LIBS -R $x_libraries"
55883        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55884 /* end confdefs.h.  */
55885 
55886 int
55887 main ()
55888 {
55889 
55890   ;
55891   return 0;
55892 }
55893 _ACEOF
55894 if ac_fn_cxx_try_link "$LINENO"; then :
55895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55896 $as_echo "yes" >&6; }
55897           X_LIBS="$X_LIBS -R $x_libraries"
55898 else
55899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55900 $as_echo "neither works" >&6; }
55901 fi
55902 rm -f core conftest.err conftest.$ac_objext \
55903     conftest$ac_exeext conftest.$ac_ext
55904 fi
55905 rm -f core conftest.err conftest.$ac_objext \
55906     conftest$ac_exeext conftest.$ac_ext
55907     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55908     LIBS=$ac_xsave_LIBS
55909   fi
55910 
55911   # Check for system-dependent libraries X programs must link with.
55912   # Do this before checking for the system-independent R6 libraries
55913   # (-lICE), since we may need -lsocket or whatever for X linking.
55914 
55915   if test "$ISC" = yes; then
55916     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55917   else
55918     # Martyn Johnson says this is needed for Ultrix, if the X
55919     # libraries were built with DECnet support.  And Karl Berry says
55920     # the Alpha needs dnet_stub (dnet does not exist).
55921     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55922     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55923 /* end confdefs.h.  */
55924 
55925 /* Override any GCC internal prototype to avoid an error.
55926    Use char because int might match the return type of a GCC
55927    builtin and then its argument prototype would still apply.  */
55928 #ifdef __cplusplus
55929 extern "C"
55930 #endif
55931 char XOpenDisplay ();
55932 int
55933 main ()
55934 {
55935 return XOpenDisplay ();
55936   ;
55937   return 0;
55938 }
55939 _ACEOF
55940 if ac_fn_cxx_try_link "$LINENO"; then :
55941 
55942 else
55943   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55944 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55945 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55946   $as_echo_n "(cached) " >&6
55947 else
55948   ac_check_lib_save_LIBS=$LIBS
55949 LIBS="-ldnet  $LIBS"
55950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55951 /* end confdefs.h.  */
55952 
55953 /* Override any GCC internal prototype to avoid an error.
55954    Use char because int might match the return type of a GCC
55955    builtin and then its argument prototype would still apply.  */
55956 #ifdef __cplusplus
55957 extern "C"
55958 #endif
55959 char dnet_ntoa ();
55960 int
55961 main ()
55962 {
55963 return dnet_ntoa ();
55964   ;
55965   return 0;
55966 }
55967 _ACEOF
55968 if ac_fn_cxx_try_link "$LINENO"; then :
55969   ac_cv_lib_dnet_dnet_ntoa=yes
55970 else
55971   ac_cv_lib_dnet_dnet_ntoa=no
55972 fi
55973 rm -f core conftest.err conftest.$ac_objext \
55974     conftest$ac_exeext conftest.$ac_ext
55975 LIBS=$ac_check_lib_save_LIBS
55976 fi
55977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55978 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55979 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55980   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55981 fi
55982 
55983     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55984       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55985 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
55986 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
55987   $as_echo_n "(cached) " >&6
55988 else
55989   ac_check_lib_save_LIBS=$LIBS
55990 LIBS="-ldnet_stub  $LIBS"
55991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55992 /* end confdefs.h.  */
55993 
55994 /* Override any GCC internal prototype to avoid an error.
55995    Use char because int might match the return type of a GCC
55996    builtin and then its argument prototype would still apply.  */
55997 #ifdef __cplusplus
55998 extern "C"
55999 #endif
56000 char dnet_ntoa ();
56001 int
56002 main ()
56003 {
56004 return dnet_ntoa ();
56005   ;
56006   return 0;
56007 }
56008 _ACEOF
56009 if ac_fn_cxx_try_link "$LINENO"; then :
56010   ac_cv_lib_dnet_stub_dnet_ntoa=yes
56011 else
56012   ac_cv_lib_dnet_stub_dnet_ntoa=no
56013 fi
56014 rm -f core conftest.err conftest.$ac_objext \
56015     conftest$ac_exeext conftest.$ac_ext
56016 LIBS=$ac_check_lib_save_LIBS
56017 fi
56018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56019 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56020 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56021   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56022 fi
56023 
56024     fi
56025 fi
56026 rm -f core conftest.err conftest.$ac_objext \
56027     conftest$ac_exeext conftest.$ac_ext
56028     LIBS="$ac_xsave_LIBS"
56029 
56030     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56031     # to get the SysV transport functions.
56032     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56033     # needs -lnsl.
56034     # The nsl library prevents programs from opening the X display
56035     # on Irix 5.2, according to T.E. Dickey.
56036     # The functions gethostbyname, getservbyname, and inet_addr are
56037     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56038     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56039 if test "x$ac_cv_func_gethostbyname" = xyes; then :
56040 
56041 fi
56042 
56043     if test $ac_cv_func_gethostbyname = no; then
56044       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56045 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56046 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56047   $as_echo_n "(cached) " >&6
56048 else
56049   ac_check_lib_save_LIBS=$LIBS
56050 LIBS="-lnsl  $LIBS"
56051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56052 /* end confdefs.h.  */
56053 
56054 /* Override any GCC internal prototype to avoid an error.
56055    Use char because int might match the return type of a GCC
56056    builtin and then its argument prototype would still apply.  */
56057 #ifdef __cplusplus
56058 extern "C"
56059 #endif
56060 char gethostbyname ();
56061 int
56062 main ()
56063 {
56064 return gethostbyname ();
56065   ;
56066   return 0;
56067 }
56068 _ACEOF
56069 if ac_fn_cxx_try_link "$LINENO"; then :
56070   ac_cv_lib_nsl_gethostbyname=yes
56071 else
56072   ac_cv_lib_nsl_gethostbyname=no
56073 fi
56074 rm -f core conftest.err conftest.$ac_objext \
56075     conftest$ac_exeext conftest.$ac_ext
56076 LIBS=$ac_check_lib_save_LIBS
56077 fi
56078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56079 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56080 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56081   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56082 fi
56083 
56084       if test $ac_cv_lib_nsl_gethostbyname = no; then
56085         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56086 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56087 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56088   $as_echo_n "(cached) " >&6
56089 else
56090   ac_check_lib_save_LIBS=$LIBS
56091 LIBS="-lbsd  $LIBS"
56092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56093 /* end confdefs.h.  */
56094 
56095 /* Override any GCC internal prototype to avoid an error.
56096    Use char because int might match the return type of a GCC
56097    builtin and then its argument prototype would still apply.  */
56098 #ifdef __cplusplus
56099 extern "C"
56100 #endif
56101 char gethostbyname ();
56102 int
56103 main ()
56104 {
56105 return gethostbyname ();
56106   ;
56107   return 0;
56108 }
56109 _ACEOF
56110 if ac_fn_cxx_try_link "$LINENO"; then :
56111   ac_cv_lib_bsd_gethostbyname=yes
56112 else
56113   ac_cv_lib_bsd_gethostbyname=no
56114 fi
56115 rm -f core conftest.err conftest.$ac_objext \
56116     conftest$ac_exeext conftest.$ac_ext
56117 LIBS=$ac_check_lib_save_LIBS
56118 fi
56119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56120 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56121 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56122   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56123 fi
56124 
56125       fi
56126     fi
56127 
56128     # lieder@skyler.mavd.honeywell.com says without -lsocket,
56129     # socket/setsockopt and other routines are undefined under SCO ODT
56130     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56131     # on later versions), says Simon Leinen: it contains gethostby*
56132     # variants that don't use the name server (or something).  -lsocket
56133     # must be given before -lnsl if both are needed.  We assume that
56134     # if connect needs -lnsl, so does gethostbyname.
56135     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56136 if test "x$ac_cv_func_connect" = xyes; then :
56137 
56138 fi
56139 
56140     if test $ac_cv_func_connect = no; then
56141       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56142 $as_echo_n "checking for connect in -lsocket... " >&6; }
56143 if ${ac_cv_lib_socket_connect+:} false; then :
56144   $as_echo_n "(cached) " >&6
56145 else
56146   ac_check_lib_save_LIBS=$LIBS
56147 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56149 /* end confdefs.h.  */
56150 
56151 /* Override any GCC internal prototype to avoid an error.
56152    Use char because int might match the return type of a GCC
56153    builtin and then its argument prototype would still apply.  */
56154 #ifdef __cplusplus
56155 extern "C"
56156 #endif
56157 char connect ();
56158 int
56159 main ()
56160 {
56161 return connect ();
56162   ;
56163   return 0;
56164 }
56165 _ACEOF
56166 if ac_fn_cxx_try_link "$LINENO"; then :
56167   ac_cv_lib_socket_connect=yes
56168 else
56169   ac_cv_lib_socket_connect=no
56170 fi
56171 rm -f core conftest.err conftest.$ac_objext \
56172     conftest$ac_exeext conftest.$ac_ext
56173 LIBS=$ac_check_lib_save_LIBS
56174 fi
56175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56176 $as_echo "$ac_cv_lib_socket_connect" >&6; }
56177 if test "x$ac_cv_lib_socket_connect" = xyes; then :
56178   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56179 fi
56180 
56181     fi
56182 
56183     # Guillermo Gomez says -lposix is necessary on A/UX.
56184     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56185 if test "x$ac_cv_func_remove" = xyes; then :
56186 
56187 fi
56188 
56189     if test $ac_cv_func_remove = no; then
56190       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56191 $as_echo_n "checking for remove in -lposix... " >&6; }
56192 if ${ac_cv_lib_posix_remove+:} false; then :
56193   $as_echo_n "(cached) " >&6
56194 else
56195   ac_check_lib_save_LIBS=$LIBS
56196 LIBS="-lposix  $LIBS"
56197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56198 /* end confdefs.h.  */
56199 
56200 /* Override any GCC internal prototype to avoid an error.
56201    Use char because int might match the return type of a GCC
56202    builtin and then its argument prototype would still apply.  */
56203 #ifdef __cplusplus
56204 extern "C"
56205 #endif
56206 char remove ();
56207 int
56208 main ()
56209 {
56210 return remove ();
56211   ;
56212   return 0;
56213 }
56214 _ACEOF
56215 if ac_fn_cxx_try_link "$LINENO"; then :
56216   ac_cv_lib_posix_remove=yes
56217 else
56218   ac_cv_lib_posix_remove=no
56219 fi
56220 rm -f core conftest.err conftest.$ac_objext \
56221     conftest$ac_exeext conftest.$ac_ext
56222 LIBS=$ac_check_lib_save_LIBS
56223 fi
56224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56225 $as_echo "$ac_cv_lib_posix_remove" >&6; }
56226 if test "x$ac_cv_lib_posix_remove" = xyes; then :
56227   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56228 fi
56229 
56230     fi
56231 
56232     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56233     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56234 if test "x$ac_cv_func_shmat" = xyes; then :
56235 
56236 fi
56237 
56238     if test $ac_cv_func_shmat = no; then
56239       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56240 $as_echo_n "checking for shmat in -lipc... " >&6; }
56241 if ${ac_cv_lib_ipc_shmat+:} false; then :
56242   $as_echo_n "(cached) " >&6
56243 else
56244   ac_check_lib_save_LIBS=$LIBS
56245 LIBS="-lipc  $LIBS"
56246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56247 /* end confdefs.h.  */
56248 
56249 /* Override any GCC internal prototype to avoid an error.
56250    Use char because int might match the return type of a GCC
56251    builtin and then its argument prototype would still apply.  */
56252 #ifdef __cplusplus
56253 extern "C"
56254 #endif
56255 char shmat ();
56256 int
56257 main ()
56258 {
56259 return shmat ();
56260   ;
56261   return 0;
56262 }
56263 _ACEOF
56264 if ac_fn_cxx_try_link "$LINENO"; then :
56265   ac_cv_lib_ipc_shmat=yes
56266 else
56267   ac_cv_lib_ipc_shmat=no
56268 fi
56269 rm -f core conftest.err conftest.$ac_objext \
56270     conftest$ac_exeext conftest.$ac_ext
56271 LIBS=$ac_check_lib_save_LIBS
56272 fi
56273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56274 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56275 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56276   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56277 fi
56278 
56279     fi
56280   fi
56281 
56282   # Check for libraries that X11R6 Xt/Xaw programs need.
56283   ac_save_LDFLAGS=$LDFLAGS
56284   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56285   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56286   # check for ICE first), but we must link in the order -lSM -lICE or
56287   # we get undefined symbols.  So assume we have SM if we have ICE.
56288   # These have to be linked with before -lX11, unlike the other
56289   # libraries we check for below, so use a different variable.
56290   # John Interrante, Karl Berry
56291   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56292 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56293 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56294   $as_echo_n "(cached) " >&6
56295 else
56296   ac_check_lib_save_LIBS=$LIBS
56297 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56299 /* end confdefs.h.  */
56300 
56301 /* Override any GCC internal prototype to avoid an error.
56302    Use char because int might match the return type of a GCC
56303    builtin and then its argument prototype would still apply.  */
56304 #ifdef __cplusplus
56305 extern "C"
56306 #endif
56307 char IceConnectionNumber ();
56308 int
56309 main ()
56310 {
56311 return IceConnectionNumber ();
56312   ;
56313   return 0;
56314 }
56315 _ACEOF
56316 if ac_fn_cxx_try_link "$LINENO"; then :
56317   ac_cv_lib_ICE_IceConnectionNumber=yes
56318 else
56319   ac_cv_lib_ICE_IceConnectionNumber=no
56320 fi
56321 rm -f core conftest.err conftest.$ac_objext \
56322     conftest$ac_exeext conftest.$ac_ext
56323 LIBS=$ac_check_lib_save_LIBS
56324 fi
56325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56326 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56327 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56328   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56329 fi
56330 
56331   LDFLAGS=$ac_save_LDFLAGS
56332 
56333 fi
56334 
56335 
56336     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56337     # this doesn't make sense so we remove it.
56338     if test "x$COMPILE_TYPE" = xcross; then
56339       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56340     fi
56341 
56342     if test "x$no_x" = xyes; then
56343 
56344   # Print a helpful message on how to acquire the necessary build dependency.
56345   # x11 is the help tag: freetype, cups, alsa etc
56346   MISSING_DEPENDENCY=x11
56347 
56348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56349     cygwin_help $MISSING_DEPENDENCY
56350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56351     msys_help $MISSING_DEPENDENCY
56352   else
56353     PKGHANDLER_COMMAND=
56354 
56355     case $PKGHANDLER in
56356       apt-get)
56357         apt_help     $MISSING_DEPENDENCY ;;
56358       yum)
56359         yum_help     $MISSING_DEPENDENCY ;;
56360       port)
56361         port_help    $MISSING_DEPENDENCY ;;
56362       pkgutil)
56363         pkgutil_help $MISSING_DEPENDENCY ;;
56364       pkgadd)
56365         pkgadd_help  $MISSING_DEPENDENCY ;;
56366     esac
56367 
56368     if test "x$PKGHANDLER_COMMAND" != x; then
56369       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56370     fi
56371   fi
56372 
56373       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56374     fi
56375 
56376     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56377       OPENWIN_HOME="/usr/openwin"
56378       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56379       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56380           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56381           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56382           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56383     fi
56384 
56385     ac_ext=c
56386 ac_cpp='$CPP $CPPFLAGS'
56387 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56388 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56389 ac_compiler_gnu=$ac_cv_c_compiler_gnu
56390 
56391     OLD_CFLAGS="$CFLAGS"
56392     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56393 
56394     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56395     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56396 do :
56397   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56398 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56399           # include <X11/Xlib.h>
56400           # include <X11/Xutil.h>
56401 
56402 
56403 "
56404 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56405   cat >>confdefs.h <<_ACEOF
56406 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56407 _ACEOF
56408  X11_HEADERS_OK=yes
56409 else
56410   X11_HEADERS_OK=no; break
56411 fi
56412 
56413 done
56414 
56415 
56416     if test "x$X11_HEADERS_OK" = xno; then
56417 
56418   # Print a helpful message on how to acquire the necessary build dependency.
56419   # x11 is the help tag: freetype, cups, alsa etc
56420   MISSING_DEPENDENCY=x11
56421 
56422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56423     cygwin_help $MISSING_DEPENDENCY
56424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56425     msys_help $MISSING_DEPENDENCY
56426   else
56427     PKGHANDLER_COMMAND=
56428 
56429     case $PKGHANDLER in
56430       apt-get)
56431         apt_help     $MISSING_DEPENDENCY ;;
56432       yum)
56433         yum_help     $MISSING_DEPENDENCY ;;
56434       port)
56435         port_help    $MISSING_DEPENDENCY ;;
56436       pkgutil)
56437         pkgutil_help $MISSING_DEPENDENCY ;;
56438       pkgadd)
56439         pkgadd_help  $MISSING_DEPENDENCY ;;
56440     esac
56441 
56442     if test "x$PKGHANDLER_COMMAND" != x; then
56443       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56444     fi
56445   fi
56446 
56447       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56448     fi
56449 
56450     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56451     # defined in libawt_xawt.
56452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56453 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56454     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56455 /* end confdefs.h.  */
56456 #include <X11/extensions/Xrender.h>
56457 int
56458 main ()
56459 {
56460 XLinearGradient x;
56461   ;
56462   return 0;
56463 }
56464 _ACEOF
56465 if ac_fn_c_try_compile "$LINENO"; then :
56466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56467 $as_echo "yes" >&6; }
56468 else
56469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56470 $as_echo "no" >&6; }
56471          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56472 fi
56473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56474 
56475     CFLAGS="$OLD_CFLAGS"
56476     ac_ext=cpp
56477 ac_cpp='$CXXCPP $CPPFLAGS'
56478 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56479 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56480 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56481 
56482   fi # NEEDS_LIB_X11
56483 
56484 
56485 
56486 
56487 
56488 
56489 # Check whether --with-cups was given.
56490 if test "${with_cups+set}" = set; then :
56491   withval=$with_cups;
56492 fi
56493 
56494 
56495 # Check whether --with-cups-include was given.
56496 if test "${with_cups_include+set}" = set; then :
56497   withval=$with_cups_include;
56498 fi
56499 
56500 
56501   if test "x$NEEDS_LIB_CUPS" = xfalse; then
56502     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56503         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56504       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56505 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56506     fi
56507     CUPS_CFLAGS=
56508   else
56509     CUPS_FOUND=no
56510 
56511     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56512       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56513     fi
56514 
56515     if test "x${with_cups}" != x; then
56516       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56517 $as_echo_n "checking for cups headers... " >&6; }
56518       if test -s "${with_cups}/include/cups/cups.h"; then
56519         CUPS_CFLAGS="-I${with_cups}/include"
56520         CUPS_FOUND=yes
56521         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56522 $as_echo "$CUPS_FOUND" >&6; }
56523       else
56524         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56525       fi
56526     fi
56527     if test "x${with_cups_include}" != x; then
56528       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56529 $as_echo_n "checking for cups headers... " >&6; }
56530       if test -s "${with_cups_include}/cups/cups.h"; then
56531         CUPS_CFLAGS="-I${with_cups_include}"
56532         CUPS_FOUND=yes
56533         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56534 $as_echo "$CUPS_FOUND" >&6; }
56535       else
56536         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56537       fi
56538     fi
56539     if test "x$CUPS_FOUND" = xno; then
56540       # Are the cups headers installed in the default /usr/include location?
56541       for ac_header in cups/cups.h cups/ppd.h
56542 do :
56543   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56544 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56545 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56546   cat >>confdefs.h <<_ACEOF
56547 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56548 _ACEOF
56549 
56550           CUPS_FOUND=yes
56551           CUPS_CFLAGS=
56552           DEFAULT_CUPS=yes
56553 
56554 fi
56555 
56556 done
56557 
56558     fi
56559     if test "x$CUPS_FOUND" = xno; then
56560       # Getting nervous now? Lets poke around for standard Solaris third-party
56561       # package installation locations.
56562       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56563 $as_echo_n "checking for cups headers... " >&6; }
56564       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56565         # An SFW package seems to be installed!
56566         CUPS_FOUND=yes
56567         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56568       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56569         # A CSW package seems to be installed!
56570         CUPS_FOUND=yes
56571         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56572       fi
56573       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56574 $as_echo "$CUPS_FOUND" >&6; }
56575     fi
56576     if test "x$CUPS_FOUND" = xno; then
56577 
56578   # Print a helpful message on how to acquire the necessary build dependency.
56579   # cups is the help tag: freetype, cups, alsa etc
56580   MISSING_DEPENDENCY=cups
56581 
56582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56583     cygwin_help $MISSING_DEPENDENCY
56584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56585     msys_help $MISSING_DEPENDENCY
56586   else
56587     PKGHANDLER_COMMAND=
56588 
56589     case $PKGHANDLER in
56590       apt-get)
56591         apt_help     $MISSING_DEPENDENCY ;;
56592       yum)
56593         yum_help     $MISSING_DEPENDENCY ;;
56594       port)
56595         port_help    $MISSING_DEPENDENCY ;;
56596       pkgutil)
56597         pkgutil_help $MISSING_DEPENDENCY ;;
56598       pkgadd)
56599         pkgadd_help  $MISSING_DEPENDENCY ;;
56600     esac
56601 
56602     if test "x$PKGHANDLER_COMMAND" != x; then
56603       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56604     fi
56605   fi
56606 
56607       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56608     fi
56609   fi
56610 
56611 
56612 
56613 
56614 
56615 # Check whether --with-freetype was given.
56616 if test "${with_freetype+set}" = set; then :
56617   withval=$with_freetype;
56618 fi
56619 
56620 
56621 # Check whether --with-freetype-include was given.
56622 if test "${with_freetype_include+set}" = set; then :
56623   withval=$with_freetype_include;
56624 fi
56625 
56626 
56627 # Check whether --with-freetype-lib was given.
56628 if test "${with_freetype_lib+set}" = set; then :
56629   withval=$with_freetype_lib;
56630 fi
56631 
56632 
56633 # Check whether --with-freetype-src was given.
56634 if test "${with_freetype_src+set}" = set; then :
56635   withval=$with_freetype_src;
56636 fi
56637 
56638   # Check whether --enable-freetype-bundling was given.
56639 if test "${enable_freetype_bundling+set}" = set; then :
56640   enableval=$enable_freetype_bundling;
56641 fi
56642 
56643 
56644   # Need to specify explicitly since it needs to be overridden on some versions of macosx
56645   FREETYPE_BASE_NAME=freetype
56646   FREETYPE_CFLAGS=
56647   FREETYPE_LIBS=
56648   FREETYPE_BUNDLE_LIB_PATH=
56649 
56650   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56651     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56652         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56653         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56654         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56655       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56656 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56657     fi
56658     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56659       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56660 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56661     fi
56662   else
56663     # freetype is needed to build; go get it!
56664 
56665     BUNDLE_FREETYPE="$enable_freetype_bundling"
56666 
56667     if  test "x$with_freetype_src" != x; then
56668       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56669         # Try to build freetype if --with-freetype-src was given on Windows
56670 
56671   FREETYPE_SRC_PATH="$with_freetype_src"
56672   BUILD_FREETYPE=yes
56673 
56674   # Check if the freetype sources are acessible..
56675   if ! test -d $FREETYPE_SRC_PATH; then
56676     { $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
56677 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56678     BUILD_FREETYPE=no
56679   fi
56680   # ..and contain a vc2010 project file
56681   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56682   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56683     { $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
56684 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56685     BUILD_FREETYPE=no
56686   fi
56687   # Now check if configure found a version of 'msbuild.exe'
56688   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56689     { $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
56690 $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;}
56691     BUILD_FREETYPE=no
56692   fi
56693 
56694   # Ready to go..
56695   if test "x$BUILD_FREETYPE" = xyes; then
56696     # msbuild requires trailing slashes for output directories
56697     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56698     freetype_lib_path_unix="$freetype_lib_path"
56699     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56700 
56701   unix_path="$vcxproj_path"
56702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56703     windows_path=`$CYGPATH -m "$unix_path"`
56704     vcxproj_path="$windows_path"
56705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56706     windows_path=`cmd //c echo $unix_path`
56707     vcxproj_path="$windows_path"
56708   fi
56709 
56710 
56711   unix_path="$freetype_lib_path"
56712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56713     windows_path=`$CYGPATH -m "$unix_path"`
56714     freetype_lib_path="$windows_path"
56715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56716     windows_path=`cmd //c echo $unix_path`
56717     freetype_lib_path="$windows_path"
56718   fi
56719 
56720 
56721   unix_path="$freetype_obj_path"
56722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56723     windows_path=`$CYGPATH -m "$unix_path"`
56724     freetype_obj_path="$windows_path"
56725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56726     windows_path=`cmd //c echo $unix_path`
56727     freetype_obj_path="$windows_path"
56728   fi
56729 
56730     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56731       freetype_platform=x64
56732     else
56733       freetype_platform=win32
56734     fi
56735 
56736     # The original freetype project file is for VS 2010 (i.e. 'v100'),
56737     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56738     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56739     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56740     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56741 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56742 
56743     # First we try to build the freetype.dll
56744     $ECHO -e "@echo off\n"\
56745         "$MSBUILD $vcxproj_path "\
56746         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56747         "/p:Configuration=\"Release Multithreaded\" "\
56748         "/p:Platform=$freetype_platform "\
56749         "/p:ConfigurationType=DynamicLibrary "\
56750         "/p:TargetName=freetype "\
56751         "/p:OutDir=\"$freetype_lib_path\" "\
56752         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56753     cmd /c freetype.bat
56754 
56755     if test -s "$freetype_lib_path_unix/freetype.dll"; then
56756       # If that succeeds we also build freetype.lib
56757       $ECHO -e "@echo off\n"\
56758           "$MSBUILD $vcxproj_path "\
56759           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56760           "/p:Configuration=\"Release Multithreaded\" "\
56761           "/p:Platform=$freetype_platform "\
56762           "/p:ConfigurationType=StaticLibrary "\
56763           "/p:TargetName=freetype "\
56764           "/p:OutDir=\"$freetype_lib_path\" "\
56765           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56766       cmd /c freetype.bat
56767 
56768       if test -s "$freetype_lib_path_unix/freetype.lib"; then
56769         # Once we build both, lib and dll, set freetype lib and include path appropriately
56770         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56771         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56772         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56773 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56774       else
56775         BUILD_FREETYPE=no
56776       fi
56777     else
56778       BUILD_FREETYPE=no
56779     fi
56780   fi
56781 
56782         if test "x$BUILD_FREETYPE" = xyes; then
56783           # Okay, we built it. Check that it works.
56784 
56785   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56786   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56787   METHOD="--with-freetype-src"
56788 
56789   # Let's start with an optimistic view of the world :-)
56790   FOUND_FREETYPE=yes
56791 
56792   # First look for the canonical freetype main include file ft2build.h.
56793   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56794     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56795     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56796     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56797       # Fail.
56798       FOUND_FREETYPE=no
56799     fi
56800   fi
56801 
56802   if test "x$FOUND_FREETYPE" = xyes; then
56803     # Include file found, let's continue the sanity check.
56804     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56805 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56806 
56807     # Reset to default value
56808     FREETYPE_BASE_NAME=freetype
56809     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56810     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56811       if test "x$OPENJDK_TARGET_OS" = xmacosx \
56812           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56813         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56814         # for the .6 version explicitly.
56815         FREETYPE_BASE_NAME=freetype.6
56816         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56817         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56818 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56819       else
56820         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56821 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56822         FOUND_FREETYPE=no
56823       fi
56824     else
56825       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56826         # On Windows, we will need both .lib and .dll file.
56827         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56828           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56829 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56830           FOUND_FREETYPE=no
56831         fi
56832       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56833           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56834         # Found lib in isa dir, use that instead.
56835         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56836         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56837 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56838       fi
56839     fi
56840   fi
56841 
56842   if test "x$FOUND_FREETYPE" = xyes; then
56843 
56844   # Only process if variable expands to non-empty
56845 
56846   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56847     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56848 
56849   # Input might be given as Windows format, start by converting to
56850   # unix format.
56851   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56852   new_path=`$CYGPATH -u "$path"`
56853 
56854   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56855   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56856   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56857   # "foo.exe" is OK but "foo" is an error.
56858   #
56859   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56860   # It is also a way to make sure we got the proper file name for the real test later on.
56861   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56862   if test "x$test_shortpath" = x; then
56863     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56864 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56865     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56866   fi
56867 
56868   # Call helper function which possibly converts this using DOS-style short mode.
56869   # If so, the updated path is stored in $new_path.
56870 
56871   input_path="$new_path"
56872   # Check if we need to convert this using DOS-style short mode. If the path
56873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56874   # take no chances and rewrite it.
56875   # Note: m4 eats our [], so we need to use [ and ] instead.
56876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56877   if test "x$has_forbidden_chars" != x; then
56878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56879     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56880     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56881     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56882       # Going to short mode and back again did indeed matter. Since short mode is
56883       # case insensitive, let's make it lowercase to improve readability.
56884       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56885       # Now convert it back to Unix-style (cygpath)
56886       input_path=`$CYGPATH -u "$shortmode_path"`
56887       new_path="$input_path"
56888     fi
56889   fi
56890 
56891   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56892   if test "x$test_cygdrive_prefix" = x; then
56893     # As a simple fix, exclude /usr/bin since it's not a real path.
56894     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56895       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56896       # a path prefixed by /cygdrive for fixpath to work.
56897       new_path="$CYGWIN_ROOT_PATH$input_path"
56898     fi
56899   fi
56900 
56901 
56902   if test "x$path" != "x$new_path"; then
56903     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56904     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56905 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56906   fi
56907 
56908     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56909 
56910   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56911   has_colon=`$ECHO $path | $GREP ^.:`
56912   new_path="$path"
56913   if test "x$has_colon" = x; then
56914     # Not in mixed or Windows style, start by that.
56915     new_path=`cmd //c echo $path`
56916   fi
56917 
56918 
56919   input_path="$new_path"
56920   # Check if we need to convert this using DOS-style short mode. If the path
56921   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56922   # take no chances and rewrite it.
56923   # Note: m4 eats our [], so we need to use [ and ] instead.
56924   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56925   if test "x$has_forbidden_chars" != x; then
56926     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56927     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56928   fi
56929 
56930 
56931   windows_path="$new_path"
56932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56933     unix_path=`$CYGPATH -u "$windows_path"`
56934     new_path="$unix_path"
56935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56937     new_path="$unix_path"
56938   fi
56939 
56940   if test "x$path" != "x$new_path"; then
56941     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56942     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56943 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56944   fi
56945 
56946   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56947   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56948 
56949     else
56950       # We're on a unix platform. Hooray! :)
56951       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56952       has_space=`$ECHO "$path" | $GREP " "`
56953       if test "x$has_space" != x; then
56954         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56955 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56956         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56957       fi
56958 
56959       # Use eval to expand a potential ~
56960       eval path="$path"
56961       if test ! -f "$path" && test ! -d "$path"; then
56962         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56963       fi
56964 
56965       if test -d "$path"; then
56966         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56967       else
56968         dir="`$DIRNAME "$path"`"
56969         base="`$BASENAME "$path"`"
56970         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56971       fi
56972     fi
56973   fi
56974 
56975 
56976   # Only process if variable expands to non-empty
56977 
56978   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56979     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56980 
56981   # Input might be given as Windows format, start by converting to
56982   # unix format.
56983   path="$POTENTIAL_FREETYPE_LIB_PATH"
56984   new_path=`$CYGPATH -u "$path"`
56985 
56986   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56987   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56988   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56989   # "foo.exe" is OK but "foo" is an error.
56990   #
56991   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56992   # It is also a way to make sure we got the proper file name for the real test later on.
56993   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56994   if test "x$test_shortpath" = x; then
56995     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56996 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56997     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56998   fi
56999 
57000   # Call helper function which possibly converts this using DOS-style short mode.
57001   # If so, the updated path is stored in $new_path.
57002 
57003   input_path="$new_path"
57004   # Check if we need to convert this using DOS-style short mode. If the path
57005   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57006   # take no chances and rewrite it.
57007   # Note: m4 eats our [], so we need to use [ and ] instead.
57008   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57009   if test "x$has_forbidden_chars" != x; then
57010     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57011     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57012     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57013     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57014       # Going to short mode and back again did indeed matter. Since short mode is
57015       # case insensitive, let's make it lowercase to improve readability.
57016       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57017       # Now convert it back to Unix-style (cygpath)
57018       input_path=`$CYGPATH -u "$shortmode_path"`
57019       new_path="$input_path"
57020     fi
57021   fi
57022 
57023   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57024   if test "x$test_cygdrive_prefix" = x; then
57025     # As a simple fix, exclude /usr/bin since it's not a real path.
57026     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57027       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57028       # a path prefixed by /cygdrive for fixpath to work.
57029       new_path="$CYGWIN_ROOT_PATH$input_path"
57030     fi
57031   fi
57032 
57033 
57034   if test "x$path" != "x$new_path"; then
57035     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57036     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57037 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57038   fi
57039 
57040     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57041 
57042   path="$POTENTIAL_FREETYPE_LIB_PATH"
57043   has_colon=`$ECHO $path | $GREP ^.:`
57044   new_path="$path"
57045   if test "x$has_colon" = x; then
57046     # Not in mixed or Windows style, start by that.
57047     new_path=`cmd //c echo $path`
57048   fi
57049 
57050 
57051   input_path="$new_path"
57052   # Check if we need to convert this using DOS-style short mode. If the path
57053   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57054   # take no chances and rewrite it.
57055   # Note: m4 eats our [], so we need to use [ and ] instead.
57056   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57057   if test "x$has_forbidden_chars" != x; then
57058     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57059     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57060   fi
57061 
57062 
57063   windows_path="$new_path"
57064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57065     unix_path=`$CYGPATH -u "$windows_path"`
57066     new_path="$unix_path"
57067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57069     new_path="$unix_path"
57070   fi
57071 
57072   if test "x$path" != "x$new_path"; then
57073     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57074     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57075 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57076   fi
57077 
57078   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57079   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57080 
57081     else
57082       # We're on a unix platform. Hooray! :)
57083       path="$POTENTIAL_FREETYPE_LIB_PATH"
57084       has_space=`$ECHO "$path" | $GREP " "`
57085       if test "x$has_space" != x; then
57086         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57087 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57088         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57089       fi
57090 
57091       # Use eval to expand a potential ~
57092       eval path="$path"
57093       if test ! -f "$path" && test ! -d "$path"; then
57094         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57095       fi
57096 
57097       if test -d "$path"; then
57098         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57099       else
57100         dir="`$DIRNAME "$path"`"
57101         base="`$BASENAME "$path"`"
57102         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57103       fi
57104     fi
57105   fi
57106 
57107 
57108     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57109     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57110 $as_echo_n "checking for freetype includes... " >&6; }
57111     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57112 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57113     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57114     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57115 $as_echo_n "checking for freetype libraries... " >&6; }
57116     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57117 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57118   fi
57119 
57120           if test "x$FOUND_FREETYPE" != xyes; then
57121             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57122           fi
57123         else
57124           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57125 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57126           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57127         fi
57128       else
57129         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57130 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57131       fi
57132     fi
57133 
57134     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57135       # User has specified settings
57136 
57137       if test "x$BUNDLE_FREETYPE" = x; then
57138         # If not specified, default is to bundle freetype
57139         BUNDLE_FREETYPE=yes
57140       fi
57141 
57142       if test "x$with_freetype" != x; then
57143         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57144         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57145       fi
57146 
57147       # Allow --with-freetype-lib and --with-freetype-include to override
57148       if test "x$with_freetype_include" != x; then
57149         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57150       fi
57151       if test "x$with_freetype_lib" != x; then
57152         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57153       fi
57154 
57155       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57156         # Okay, we got it. Check that it works.
57157 
57158   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57159   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57160   METHOD="--with-freetype"
57161 
57162   # Let's start with an optimistic view of the world :-)
57163   FOUND_FREETYPE=yes
57164 
57165   # First look for the canonical freetype main include file ft2build.h.
57166   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57167     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57168     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57169     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57170       # Fail.
57171       FOUND_FREETYPE=no
57172     fi
57173   fi
57174 
57175   if test "x$FOUND_FREETYPE" = xyes; then
57176     # Include file found, let's continue the sanity check.
57177     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57178 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57179 
57180     # Reset to default value
57181     FREETYPE_BASE_NAME=freetype
57182     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57183     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57184       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57185           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57186         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57187         # for the .6 version explicitly.
57188         FREETYPE_BASE_NAME=freetype.6
57189         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57190         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57191 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57192       else
57193         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57194 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57195         FOUND_FREETYPE=no
57196       fi
57197     else
57198       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57199         # On Windows, we will need both .lib and .dll file.
57200         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57201           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57202 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57203           FOUND_FREETYPE=no
57204         fi
57205       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57206           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57207         # Found lib in isa dir, use that instead.
57208         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57209         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57210 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57211       fi
57212     fi
57213   fi
57214 
57215   if test "x$FOUND_FREETYPE" = xyes; then
57216 
57217   # Only process if variable expands to non-empty
57218 
57219   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57220     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57221 
57222   # Input might be given as Windows format, start by converting to
57223   # unix format.
57224   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57225   new_path=`$CYGPATH -u "$path"`
57226 
57227   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57228   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57229   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57230   # "foo.exe" is OK but "foo" is an error.
57231   #
57232   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57233   # It is also a way to make sure we got the proper file name for the real test later on.
57234   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57235   if test "x$test_shortpath" = x; then
57236     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57237 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57238     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57239   fi
57240 
57241   # Call helper function which possibly converts this using DOS-style short mode.
57242   # If so, the updated path is stored in $new_path.
57243 
57244   input_path="$new_path"
57245   # Check if we need to convert this using DOS-style short mode. If the path
57246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57247   # take no chances and rewrite it.
57248   # Note: m4 eats our [], so we need to use [ and ] instead.
57249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57250   if test "x$has_forbidden_chars" != x; then
57251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57252     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57253     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57254     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57255       # Going to short mode and back again did indeed matter. Since short mode is
57256       # case insensitive, let's make it lowercase to improve readability.
57257       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57258       # Now convert it back to Unix-style (cygpath)
57259       input_path=`$CYGPATH -u "$shortmode_path"`
57260       new_path="$input_path"
57261     fi
57262   fi
57263 
57264   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57265   if test "x$test_cygdrive_prefix" = x; then
57266     # As a simple fix, exclude /usr/bin since it's not a real path.
57267     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57268       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57269       # a path prefixed by /cygdrive for fixpath to work.
57270       new_path="$CYGWIN_ROOT_PATH$input_path"
57271     fi
57272   fi
57273 
57274 
57275   if test "x$path" != "x$new_path"; then
57276     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57277     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57278 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57279   fi
57280 
57281     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57282 
57283   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57284   has_colon=`$ECHO $path | $GREP ^.:`
57285   new_path="$path"
57286   if test "x$has_colon" = x; then
57287     # Not in mixed or Windows style, start by that.
57288     new_path=`cmd //c echo $path`
57289   fi
57290 
57291 
57292   input_path="$new_path"
57293   # Check if we need to convert this using DOS-style short mode. If the path
57294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57295   # take no chances and rewrite it.
57296   # Note: m4 eats our [], so we need to use [ and ] instead.
57297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57298   if test "x$has_forbidden_chars" != x; then
57299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57300     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57301   fi
57302 
57303 
57304   windows_path="$new_path"
57305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57306     unix_path=`$CYGPATH -u "$windows_path"`
57307     new_path="$unix_path"
57308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57310     new_path="$unix_path"
57311   fi
57312 
57313   if test "x$path" != "x$new_path"; then
57314     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57315     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57316 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57317   fi
57318 
57319   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57320   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57321 
57322     else
57323       # We're on a unix platform. Hooray! :)
57324       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57325       has_space=`$ECHO "$path" | $GREP " "`
57326       if test "x$has_space" != x; then
57327         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57328 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57329         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57330       fi
57331 
57332       # Use eval to expand a potential ~
57333       eval path="$path"
57334       if test ! -f "$path" && test ! -d "$path"; then
57335         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57336       fi
57337 
57338       if test -d "$path"; then
57339         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57340       else
57341         dir="`$DIRNAME "$path"`"
57342         base="`$BASENAME "$path"`"
57343         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57344       fi
57345     fi
57346   fi
57347 
57348 
57349   # Only process if variable expands to non-empty
57350 
57351   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57352     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57353 
57354   # Input might be given as Windows format, start by converting to
57355   # unix format.
57356   path="$POTENTIAL_FREETYPE_LIB_PATH"
57357   new_path=`$CYGPATH -u "$path"`
57358 
57359   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57360   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57361   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57362   # "foo.exe" is OK but "foo" is an error.
57363   #
57364   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57365   # It is also a way to make sure we got the proper file name for the real test later on.
57366   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57367   if test "x$test_shortpath" = x; then
57368     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57369 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57370     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57371   fi
57372 
57373   # Call helper function which possibly converts this using DOS-style short mode.
57374   # If so, the updated path is stored in $new_path.
57375 
57376   input_path="$new_path"
57377   # Check if we need to convert this using DOS-style short mode. If the path
57378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57379   # take no chances and rewrite it.
57380   # Note: m4 eats our [], so we need to use [ and ] instead.
57381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57382   if test "x$has_forbidden_chars" != x; then
57383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57384     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57385     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57386     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57387       # Going to short mode and back again did indeed matter. Since short mode is
57388       # case insensitive, let's make it lowercase to improve readability.
57389       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57390       # Now convert it back to Unix-style (cygpath)
57391       input_path=`$CYGPATH -u "$shortmode_path"`
57392       new_path="$input_path"
57393     fi
57394   fi
57395 
57396   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57397   if test "x$test_cygdrive_prefix" = x; then
57398     # As a simple fix, exclude /usr/bin since it's not a real path.
57399     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57400       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57401       # a path prefixed by /cygdrive for fixpath to work.
57402       new_path="$CYGWIN_ROOT_PATH$input_path"
57403     fi
57404   fi
57405 
57406 
57407   if test "x$path" != "x$new_path"; then
57408     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57410 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57411   fi
57412 
57413     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57414 
57415   path="$POTENTIAL_FREETYPE_LIB_PATH"
57416   has_colon=`$ECHO $path | $GREP ^.:`
57417   new_path="$path"
57418   if test "x$has_colon" = x; then
57419     # Not in mixed or Windows style, start by that.
57420     new_path=`cmd //c echo $path`
57421   fi
57422 
57423 
57424   input_path="$new_path"
57425   # Check if we need to convert this using DOS-style short mode. If the path
57426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57427   # take no chances and rewrite it.
57428   # Note: m4 eats our [], so we need to use [ and ] instead.
57429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57430   if test "x$has_forbidden_chars" != x; then
57431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57432     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57433   fi
57434 
57435 
57436   windows_path="$new_path"
57437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57438     unix_path=`$CYGPATH -u "$windows_path"`
57439     new_path="$unix_path"
57440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57442     new_path="$unix_path"
57443   fi
57444 
57445   if test "x$path" != "x$new_path"; then
57446     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57447     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57448 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57449   fi
57450 
57451   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57452   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57453 
57454     else
57455       # We're on a unix platform. Hooray! :)
57456       path="$POTENTIAL_FREETYPE_LIB_PATH"
57457       has_space=`$ECHO "$path" | $GREP " "`
57458       if test "x$has_space" != x; then
57459         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57460 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57461         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57462       fi
57463 
57464       # Use eval to expand a potential ~
57465       eval path="$path"
57466       if test ! -f "$path" && test ! -d "$path"; then
57467         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57468       fi
57469 
57470       if test -d "$path"; then
57471         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57472       else
57473         dir="`$DIRNAME "$path"`"
57474         base="`$BASENAME "$path"`"
57475         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57476       fi
57477     fi
57478   fi
57479 
57480 
57481     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57482     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57483 $as_echo_n "checking for freetype includes... " >&6; }
57484     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57485 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57486     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57487     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57488 $as_echo_n "checking for freetype libraries... " >&6; }
57489     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57490 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57491   fi
57492 
57493         if test "x$FOUND_FREETYPE" != xyes; then
57494           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57495         fi
57496       else
57497         # User specified only one of lib or include. This is an error.
57498         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57499           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57500 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57501           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57502         else
57503           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57504 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57505           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57506         fi
57507       fi
57508     else
57509       # User did not specify settings, but we need freetype. Try to locate it.
57510 
57511       if test "x$BUNDLE_FREETYPE" = x; then
57512         # If not specified, default is to bundle freetype only on windows
57513         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57514           BUNDLE_FREETYPE=yes
57515         else
57516           BUNDLE_FREETYPE=no
57517         fi
57518       fi
57519 
57520       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57521       if test "x$SYSROOT" = x; then
57522         if test "x$FOUND_FREETYPE" != xyes; then
57523           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57524           if test "x$PKG_CONFIG" != x; then
57525 
57526 pkg_failed=no
57527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57528 $as_echo_n "checking for FREETYPE... " >&6; }
57529 
57530 if test -n "$FREETYPE_CFLAGS"; then
57531     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57532  elif test -n "$PKG_CONFIG"; then
57533     if test -n "$PKG_CONFIG" && \
57534     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57535   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57536   ac_status=$?
57537   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57538   test $ac_status = 0; }; then
57539   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57540 else
57541   pkg_failed=yes
57542 fi
57543  else
57544     pkg_failed=untried
57545 fi
57546 if test -n "$FREETYPE_LIBS"; then
57547     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57548  elif test -n "$PKG_CONFIG"; then
57549     if test -n "$PKG_CONFIG" && \
57550     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57551   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57552   ac_status=$?
57553   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57554   test $ac_status = 0; }; then
57555   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57556 else
57557   pkg_failed=yes
57558 fi
57559  else
57560     pkg_failed=untried
57561 fi
57562 
57563 
57564 
57565 if test $pkg_failed = yes; then
57566 
57567 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57568         _pkg_short_errors_supported=yes
57569 else
57570         _pkg_short_errors_supported=no
57571 fi
57572         if test $_pkg_short_errors_supported = yes; then
57573                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57574         else
57575                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57576         fi
57577         # Put the nasty error message in config.log where it belongs
57578         echo "$FREETYPE_PKG_ERRORS" >&5
57579 
57580         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57581 $as_echo "no" >&6; }
57582                 FOUND_FREETYPE=no
57583 elif test $pkg_failed = untried; then
57584         FOUND_FREETYPE=no
57585 else
57586         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57587         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57588         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57589 $as_echo "yes" >&6; }
57590         FOUND_FREETYPE=yes
57591 fi
57592             if test "x$FOUND_FREETYPE" = xyes; then
57593               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57594               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57595               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57596               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57597                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57598               fi
57599               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57600               if test "x$BUNDLE_FREETYPE" = xyes; then
57601                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57602 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57603                 FOUND_FREETYPE=no
57604               else
57605                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57606 $as_echo_n "checking for freetype... " >&6; }
57607                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57608 $as_echo "yes (using pkg-config)" >&6; }
57609               fi
57610             fi
57611           fi
57612         fi
57613       fi
57614 
57615       if test "x$FOUND_FREETYPE" != xyes; then
57616         # Check in well-known locations
57617         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57618           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57619 
57620   windows_path="$FREETYPE_BASE_DIR"
57621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57622     unix_path=`$CYGPATH -u "$windows_path"`
57623     FREETYPE_BASE_DIR="$unix_path"
57624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57626     FREETYPE_BASE_DIR="$unix_path"
57627   fi
57628 
57629 
57630   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57631   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57632   METHOD="well-known location"
57633 
57634   # Let's start with an optimistic view of the world :-)
57635   FOUND_FREETYPE=yes
57636 
57637   # First look for the canonical freetype main include file ft2build.h.
57638   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57639     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57640     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57641     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57642       # Fail.
57643       FOUND_FREETYPE=no
57644     fi
57645   fi
57646 
57647   if test "x$FOUND_FREETYPE" = xyes; then
57648     # Include file found, let's continue the sanity check.
57649     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57650 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57651 
57652     # Reset to default value
57653     FREETYPE_BASE_NAME=freetype
57654     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57655     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57656       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57657           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57658         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57659         # for the .6 version explicitly.
57660         FREETYPE_BASE_NAME=freetype.6
57661         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57662         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57663 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57664       else
57665         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57666 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57667         FOUND_FREETYPE=no
57668       fi
57669     else
57670       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57671         # On Windows, we will need both .lib and .dll file.
57672         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57673           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57674 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57675           FOUND_FREETYPE=no
57676         fi
57677       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57678           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57679         # Found lib in isa dir, use that instead.
57680         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57681         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57682 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57683       fi
57684     fi
57685   fi
57686 
57687   if test "x$FOUND_FREETYPE" = xyes; then
57688 
57689   # Only process if variable expands to non-empty
57690 
57691   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57692     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57693 
57694   # Input might be given as Windows format, start by converting to
57695   # unix format.
57696   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57697   new_path=`$CYGPATH -u "$path"`
57698 
57699   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57700   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57701   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57702   # "foo.exe" is OK but "foo" is an error.
57703   #
57704   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57705   # It is also a way to make sure we got the proper file name for the real test later on.
57706   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57707   if test "x$test_shortpath" = x; then
57708     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57709 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57710     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57711   fi
57712 
57713   # Call helper function which possibly converts this using DOS-style short mode.
57714   # If so, the updated path is stored in $new_path.
57715 
57716   input_path="$new_path"
57717   # Check if we need to convert this using DOS-style short mode. If the path
57718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57719   # take no chances and rewrite it.
57720   # Note: m4 eats our [], so we need to use [ and ] instead.
57721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57722   if test "x$has_forbidden_chars" != x; then
57723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57724     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57725     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57726     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57727       # Going to short mode and back again did indeed matter. Since short mode is
57728       # case insensitive, let's make it lowercase to improve readability.
57729       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57730       # Now convert it back to Unix-style (cygpath)
57731       input_path=`$CYGPATH -u "$shortmode_path"`
57732       new_path="$input_path"
57733     fi
57734   fi
57735 
57736   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57737   if test "x$test_cygdrive_prefix" = x; then
57738     # As a simple fix, exclude /usr/bin since it's not a real path.
57739     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57740       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57741       # a path prefixed by /cygdrive for fixpath to work.
57742       new_path="$CYGWIN_ROOT_PATH$input_path"
57743     fi
57744   fi
57745 
57746 
57747   if test "x$path" != "x$new_path"; then
57748     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57749     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57750 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57751   fi
57752 
57753     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57754 
57755   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57756   has_colon=`$ECHO $path | $GREP ^.:`
57757   new_path="$path"
57758   if test "x$has_colon" = x; then
57759     # Not in mixed or Windows style, start by that.
57760     new_path=`cmd //c echo $path`
57761   fi
57762 
57763 
57764   input_path="$new_path"
57765   # Check if we need to convert this using DOS-style short mode. If the path
57766   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57767   # take no chances and rewrite it.
57768   # Note: m4 eats our [], so we need to use [ and ] instead.
57769   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57770   if test "x$has_forbidden_chars" != x; then
57771     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57772     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57773   fi
57774 
57775 
57776   windows_path="$new_path"
57777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57778     unix_path=`$CYGPATH -u "$windows_path"`
57779     new_path="$unix_path"
57780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57782     new_path="$unix_path"
57783   fi
57784 
57785   if test "x$path" != "x$new_path"; then
57786     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57787     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57788 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57789   fi
57790 
57791   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57792   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57793 
57794     else
57795       # We're on a unix platform. Hooray! :)
57796       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57797       has_space=`$ECHO "$path" | $GREP " "`
57798       if test "x$has_space" != x; then
57799         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57800 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57801         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57802       fi
57803 
57804       # Use eval to expand a potential ~
57805       eval path="$path"
57806       if test ! -f "$path" && test ! -d "$path"; then
57807         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57808       fi
57809 
57810       if test -d "$path"; then
57811         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57812       else
57813         dir="`$DIRNAME "$path"`"
57814         base="`$BASENAME "$path"`"
57815         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57816       fi
57817     fi
57818   fi
57819 
57820 
57821   # Only process if variable expands to non-empty
57822 
57823   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57824     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57825 
57826   # Input might be given as Windows format, start by converting to
57827   # unix format.
57828   path="$POTENTIAL_FREETYPE_LIB_PATH"
57829   new_path=`$CYGPATH -u "$path"`
57830 
57831   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57832   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57833   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57834   # "foo.exe" is OK but "foo" is an error.
57835   #
57836   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57837   # It is also a way to make sure we got the proper file name for the real test later on.
57838   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57839   if test "x$test_shortpath" = x; then
57840     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57841 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57842     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57843   fi
57844 
57845   # Call helper function which possibly converts this using DOS-style short mode.
57846   # If so, the updated path is stored in $new_path.
57847 
57848   input_path="$new_path"
57849   # Check if we need to convert this using DOS-style short mode. If the path
57850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57851   # take no chances and rewrite it.
57852   # Note: m4 eats our [], so we need to use [ and ] instead.
57853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57854   if test "x$has_forbidden_chars" != x; then
57855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57856     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57857     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57858     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57859       # Going to short mode and back again did indeed matter. Since short mode is
57860       # case insensitive, let's make it lowercase to improve readability.
57861       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57862       # Now convert it back to Unix-style (cygpath)
57863       input_path=`$CYGPATH -u "$shortmode_path"`
57864       new_path="$input_path"
57865     fi
57866   fi
57867 
57868   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57869   if test "x$test_cygdrive_prefix" = x; then
57870     # As a simple fix, exclude /usr/bin since it's not a real path.
57871     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57872       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57873       # a path prefixed by /cygdrive for fixpath to work.
57874       new_path="$CYGWIN_ROOT_PATH$input_path"
57875     fi
57876   fi
57877 
57878 
57879   if test "x$path" != "x$new_path"; then
57880     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57881     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57882 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57883   fi
57884 
57885     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57886 
57887   path="$POTENTIAL_FREETYPE_LIB_PATH"
57888   has_colon=`$ECHO $path | $GREP ^.:`
57889   new_path="$path"
57890   if test "x$has_colon" = x; then
57891     # Not in mixed or Windows style, start by that.
57892     new_path=`cmd //c echo $path`
57893   fi
57894 
57895 
57896   input_path="$new_path"
57897   # Check if we need to convert this using DOS-style short mode. If the path
57898   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57899   # take no chances and rewrite it.
57900   # Note: m4 eats our [], so we need to use [ and ] instead.
57901   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57902   if test "x$has_forbidden_chars" != x; then
57903     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57904     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57905   fi
57906 
57907 
57908   windows_path="$new_path"
57909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57910     unix_path=`$CYGPATH -u "$windows_path"`
57911     new_path="$unix_path"
57912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57914     new_path="$unix_path"
57915   fi
57916 
57917   if test "x$path" != "x$new_path"; then
57918     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57919     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57920 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57921   fi
57922 
57923   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57924   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57925 
57926     else
57927       # We're on a unix platform. Hooray! :)
57928       path="$POTENTIAL_FREETYPE_LIB_PATH"
57929       has_space=`$ECHO "$path" | $GREP " "`
57930       if test "x$has_space" != x; then
57931         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57932 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57933         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57934       fi
57935 
57936       # Use eval to expand a potential ~
57937       eval path="$path"
57938       if test ! -f "$path" && test ! -d "$path"; then
57939         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57940       fi
57941 
57942       if test -d "$path"; then
57943         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57944       else
57945         dir="`$DIRNAME "$path"`"
57946         base="`$BASENAME "$path"`"
57947         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57948       fi
57949     fi
57950   fi
57951 
57952 
57953     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57954     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57955 $as_echo_n "checking for freetype includes... " >&6; }
57956     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57957 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57958     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57959     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57960 $as_echo_n "checking for freetype libraries... " >&6; }
57961     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57962 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57963   fi
57964 
57965           if test "x$FOUND_FREETYPE" != xyes; then
57966             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57967 
57968   windows_path="$FREETYPE_BASE_DIR"
57969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57970     unix_path=`$CYGPATH -u "$windows_path"`
57971     FREETYPE_BASE_DIR="$unix_path"
57972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57974     FREETYPE_BASE_DIR="$unix_path"
57975   fi
57976 
57977 
57978   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57979   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57980   METHOD="well-known location"
57981 
57982   # Let's start with an optimistic view of the world :-)
57983   FOUND_FREETYPE=yes
57984 
57985   # First look for the canonical freetype main include file ft2build.h.
57986   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57987     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57988     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57989     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57990       # Fail.
57991       FOUND_FREETYPE=no
57992     fi
57993   fi
57994 
57995   if test "x$FOUND_FREETYPE" = xyes; then
57996     # Include file found, let's continue the sanity check.
57997     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57998 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57999 
58000     # Reset to default value
58001     FREETYPE_BASE_NAME=freetype
58002     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58003     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58004       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58005           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58006         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58007         # for the .6 version explicitly.
58008         FREETYPE_BASE_NAME=freetype.6
58009         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58010         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58011 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58012       else
58013         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58014 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58015         FOUND_FREETYPE=no
58016       fi
58017     else
58018       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58019         # On Windows, we will need both .lib and .dll file.
58020         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58021           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58022 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58023           FOUND_FREETYPE=no
58024         fi
58025       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58026           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58027         # Found lib in isa dir, use that instead.
58028         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58029         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58030 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58031       fi
58032     fi
58033   fi
58034 
58035   if test "x$FOUND_FREETYPE" = xyes; then
58036 
58037   # Only process if variable expands to non-empty
58038 
58039   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58040     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58041 
58042   # Input might be given as Windows format, start by converting to
58043   # unix format.
58044   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58045   new_path=`$CYGPATH -u "$path"`
58046 
58047   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58048   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58049   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58050   # "foo.exe" is OK but "foo" is an error.
58051   #
58052   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58053   # It is also a way to make sure we got the proper file name for the real test later on.
58054   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58055   if test "x$test_shortpath" = x; then
58056     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58057 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58058     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58059   fi
58060 
58061   # Call helper function which possibly converts this using DOS-style short mode.
58062   # If so, the updated path is stored in $new_path.
58063 
58064   input_path="$new_path"
58065   # Check if we need to convert this using DOS-style short mode. If the path
58066   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58067   # take no chances and rewrite it.
58068   # Note: m4 eats our [], so we need to use [ and ] instead.
58069   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58070   if test "x$has_forbidden_chars" != x; then
58071     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58072     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58073     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58074     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58075       # Going to short mode and back again did indeed matter. Since short mode is
58076       # case insensitive, let's make it lowercase to improve readability.
58077       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58078       # Now convert it back to Unix-style (cygpath)
58079       input_path=`$CYGPATH -u "$shortmode_path"`
58080       new_path="$input_path"
58081     fi
58082   fi
58083 
58084   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58085   if test "x$test_cygdrive_prefix" = x; then
58086     # As a simple fix, exclude /usr/bin since it's not a real path.
58087     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58088       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58089       # a path prefixed by /cygdrive for fixpath to work.
58090       new_path="$CYGWIN_ROOT_PATH$input_path"
58091     fi
58092   fi
58093 
58094 
58095   if test "x$path" != "x$new_path"; then
58096     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58097     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58098 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58099   fi
58100 
58101     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58102 
58103   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58104   has_colon=`$ECHO $path | $GREP ^.:`
58105   new_path="$path"
58106   if test "x$has_colon" = x; then
58107     # Not in mixed or Windows style, start by that.
58108     new_path=`cmd //c echo $path`
58109   fi
58110 
58111 
58112   input_path="$new_path"
58113   # Check if we need to convert this using DOS-style short mode. If the path
58114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58115   # take no chances and rewrite it.
58116   # Note: m4 eats our [], so we need to use [ and ] instead.
58117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58118   if test "x$has_forbidden_chars" != x; then
58119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58120     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58121   fi
58122 
58123 
58124   windows_path="$new_path"
58125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58126     unix_path=`$CYGPATH -u "$windows_path"`
58127     new_path="$unix_path"
58128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58130     new_path="$unix_path"
58131   fi
58132 
58133   if test "x$path" != "x$new_path"; then
58134     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58135     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58136 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58137   fi
58138 
58139   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58140   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58141 
58142     else
58143       # We're on a unix platform. Hooray! :)
58144       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58145       has_space=`$ECHO "$path" | $GREP " "`
58146       if test "x$has_space" != x; then
58147         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58148 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58149         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58150       fi
58151 
58152       # Use eval to expand a potential ~
58153       eval path="$path"
58154       if test ! -f "$path" && test ! -d "$path"; then
58155         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58156       fi
58157 
58158       if test -d "$path"; then
58159         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58160       else
58161         dir="`$DIRNAME "$path"`"
58162         base="`$BASENAME "$path"`"
58163         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58164       fi
58165     fi
58166   fi
58167 
58168 
58169   # Only process if variable expands to non-empty
58170 
58171   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58172     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58173 
58174   # Input might be given as Windows format, start by converting to
58175   # unix format.
58176   path="$POTENTIAL_FREETYPE_LIB_PATH"
58177   new_path=`$CYGPATH -u "$path"`
58178 
58179   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58180   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58181   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58182   # "foo.exe" is OK but "foo" is an error.
58183   #
58184   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58185   # It is also a way to make sure we got the proper file name for the real test later on.
58186   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58187   if test "x$test_shortpath" = x; then
58188     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58189 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58190     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58191   fi
58192 
58193   # Call helper function which possibly converts this using DOS-style short mode.
58194   # If so, the updated path is stored in $new_path.
58195 
58196   input_path="$new_path"
58197   # Check if we need to convert this using DOS-style short mode. If the path
58198   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58199   # take no chances and rewrite it.
58200   # Note: m4 eats our [], so we need to use [ and ] instead.
58201   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58202   if test "x$has_forbidden_chars" != x; then
58203     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58204     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58205     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58206     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58207       # Going to short mode and back again did indeed matter. Since short mode is
58208       # case insensitive, let's make it lowercase to improve readability.
58209       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58210       # Now convert it back to Unix-style (cygpath)
58211       input_path=`$CYGPATH -u "$shortmode_path"`
58212       new_path="$input_path"
58213     fi
58214   fi
58215 
58216   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58217   if test "x$test_cygdrive_prefix" = x; then
58218     # As a simple fix, exclude /usr/bin since it's not a real path.
58219     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58220       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58221       # a path prefixed by /cygdrive for fixpath to work.
58222       new_path="$CYGWIN_ROOT_PATH$input_path"
58223     fi
58224   fi
58225 
58226 
58227   if test "x$path" != "x$new_path"; then
58228     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58229     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58230 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58231   fi
58232 
58233     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58234 
58235   path="$POTENTIAL_FREETYPE_LIB_PATH"
58236   has_colon=`$ECHO $path | $GREP ^.:`
58237   new_path="$path"
58238   if test "x$has_colon" = x; then
58239     # Not in mixed or Windows style, start by that.
58240     new_path=`cmd //c echo $path`
58241   fi
58242 
58243 
58244   input_path="$new_path"
58245   # Check if we need to convert this using DOS-style short mode. If the path
58246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58247   # take no chances and rewrite it.
58248   # Note: m4 eats our [], so we need to use [ and ] instead.
58249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58250   if test "x$has_forbidden_chars" != x; then
58251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58252     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58253   fi
58254 
58255 
58256   windows_path="$new_path"
58257   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58258     unix_path=`$CYGPATH -u "$windows_path"`
58259     new_path="$unix_path"
58260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58261     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58262     new_path="$unix_path"
58263   fi
58264 
58265   if test "x$path" != "x$new_path"; then
58266     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58267     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58268 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58269   fi
58270 
58271   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58272   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58273 
58274     else
58275       # We're on a unix platform. Hooray! :)
58276       path="$POTENTIAL_FREETYPE_LIB_PATH"
58277       has_space=`$ECHO "$path" | $GREP " "`
58278       if test "x$has_space" != x; then
58279         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58280 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58281         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58282       fi
58283 
58284       # Use eval to expand a potential ~
58285       eval path="$path"
58286       if test ! -f "$path" && test ! -d "$path"; then
58287         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58288       fi
58289 
58290       if test -d "$path"; then
58291         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58292       else
58293         dir="`$DIRNAME "$path"`"
58294         base="`$BASENAME "$path"`"
58295         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58296       fi
58297     fi
58298   fi
58299 
58300 
58301     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58302     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58303 $as_echo_n "checking for freetype includes... " >&6; }
58304     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58305 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58306     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58307     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58308 $as_echo_n "checking for freetype libraries... " >&6; }
58309     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58310 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58311   fi
58312 
58313           fi
58314           if test "x$FOUND_FREETYPE" != xyes; then
58315             FREETYPE_BASE_DIR="$HOME/freetype"
58316 
58317   windows_path="$FREETYPE_BASE_DIR"
58318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58319     unix_path=`$CYGPATH -u "$windows_path"`
58320     FREETYPE_BASE_DIR="$unix_path"
58321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58323     FREETYPE_BASE_DIR="$unix_path"
58324   fi
58325 
58326             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58327 
58328   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58329   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58330   METHOD="well-known location"
58331 
58332   # Let's start with an optimistic view of the world :-)
58333   FOUND_FREETYPE=yes
58334 
58335   # First look for the canonical freetype main include file ft2build.h.
58336   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58337     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58338     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58339     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58340       # Fail.
58341       FOUND_FREETYPE=no
58342     fi
58343   fi
58344 
58345   if test "x$FOUND_FREETYPE" = xyes; then
58346     # Include file found, let's continue the sanity check.
58347     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58348 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58349 
58350     # Reset to default value
58351     FREETYPE_BASE_NAME=freetype
58352     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58353     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58354       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58355           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58356         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58357         # for the .6 version explicitly.
58358         FREETYPE_BASE_NAME=freetype.6
58359         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58360         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58361 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58362       else
58363         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58364 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58365         FOUND_FREETYPE=no
58366       fi
58367     else
58368       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58369         # On Windows, we will need both .lib and .dll file.
58370         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58371           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58372 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58373           FOUND_FREETYPE=no
58374         fi
58375       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58376           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58377         # Found lib in isa dir, use that instead.
58378         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58379         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58380 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58381       fi
58382     fi
58383   fi
58384 
58385   if test "x$FOUND_FREETYPE" = xyes; then
58386 
58387   # Only process if variable expands to non-empty
58388 
58389   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58390     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58391 
58392   # Input might be given as Windows format, start by converting to
58393   # unix format.
58394   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58395   new_path=`$CYGPATH -u "$path"`
58396 
58397   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58398   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58399   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58400   # "foo.exe" is OK but "foo" is an error.
58401   #
58402   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58403   # It is also a way to make sure we got the proper file name for the real test later on.
58404   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58405   if test "x$test_shortpath" = x; then
58406     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58407 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58408     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58409   fi
58410 
58411   # Call helper function which possibly converts this using DOS-style short mode.
58412   # If so, the updated path is stored in $new_path.
58413 
58414   input_path="$new_path"
58415   # Check if we need to convert this using DOS-style short mode. If the path
58416   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58417   # take no chances and rewrite it.
58418   # Note: m4 eats our [], so we need to use [ and ] instead.
58419   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58420   if test "x$has_forbidden_chars" != x; then
58421     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58422     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58423     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58424     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58425       # Going to short mode and back again did indeed matter. Since short mode is
58426       # case insensitive, let's make it lowercase to improve readability.
58427       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58428       # Now convert it back to Unix-style (cygpath)
58429       input_path=`$CYGPATH -u "$shortmode_path"`
58430       new_path="$input_path"
58431     fi
58432   fi
58433 
58434   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58435   if test "x$test_cygdrive_prefix" = x; then
58436     # As a simple fix, exclude /usr/bin since it's not a real path.
58437     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58438       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58439       # a path prefixed by /cygdrive for fixpath to work.
58440       new_path="$CYGWIN_ROOT_PATH$input_path"
58441     fi
58442   fi
58443 
58444 
58445   if test "x$path" != "x$new_path"; then
58446     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58447     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58448 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58449   fi
58450 
58451     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58452 
58453   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58454   has_colon=`$ECHO $path | $GREP ^.:`
58455   new_path="$path"
58456   if test "x$has_colon" = x; then
58457     # Not in mixed or Windows style, start by that.
58458     new_path=`cmd //c echo $path`
58459   fi
58460 
58461 
58462   input_path="$new_path"
58463   # Check if we need to convert this using DOS-style short mode. If the path
58464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58465   # take no chances and rewrite it.
58466   # Note: m4 eats our [], so we need to use [ and ] instead.
58467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58468   if test "x$has_forbidden_chars" != x; then
58469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58470     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58471   fi
58472 
58473 
58474   windows_path="$new_path"
58475   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58476     unix_path=`$CYGPATH -u "$windows_path"`
58477     new_path="$unix_path"
58478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58479     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58480     new_path="$unix_path"
58481   fi
58482 
58483   if test "x$path" != "x$new_path"; then
58484     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58485     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58486 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58487   fi
58488 
58489   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58490   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58491 
58492     else
58493       # We're on a unix platform. Hooray! :)
58494       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58495       has_space=`$ECHO "$path" | $GREP " "`
58496       if test "x$has_space" != x; then
58497         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58498 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58499         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58500       fi
58501 
58502       # Use eval to expand a potential ~
58503       eval path="$path"
58504       if test ! -f "$path" && test ! -d "$path"; then
58505         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58506       fi
58507 
58508       if test -d "$path"; then
58509         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58510       else
58511         dir="`$DIRNAME "$path"`"
58512         base="`$BASENAME "$path"`"
58513         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58514       fi
58515     fi
58516   fi
58517 
58518 
58519   # Only process if variable expands to non-empty
58520 
58521   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58522     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58523 
58524   # Input might be given as Windows format, start by converting to
58525   # unix format.
58526   path="$POTENTIAL_FREETYPE_LIB_PATH"
58527   new_path=`$CYGPATH -u "$path"`
58528 
58529   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58530   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58531   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58532   # "foo.exe" is OK but "foo" is an error.
58533   #
58534   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58535   # It is also a way to make sure we got the proper file name for the real test later on.
58536   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58537   if test "x$test_shortpath" = x; then
58538     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58539 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58540     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58541   fi
58542 
58543   # Call helper function which possibly converts this using DOS-style short mode.
58544   # If so, the updated path is stored in $new_path.
58545 
58546   input_path="$new_path"
58547   # Check if we need to convert this using DOS-style short mode. If the path
58548   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58549   # take no chances and rewrite it.
58550   # Note: m4 eats our [], so we need to use [ and ] instead.
58551   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58552   if test "x$has_forbidden_chars" != x; then
58553     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58554     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58555     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58556     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58557       # Going to short mode and back again did indeed matter. Since short mode is
58558       # case insensitive, let's make it lowercase to improve readability.
58559       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58560       # Now convert it back to Unix-style (cygpath)
58561       input_path=`$CYGPATH -u "$shortmode_path"`
58562       new_path="$input_path"
58563     fi
58564   fi
58565 
58566   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58567   if test "x$test_cygdrive_prefix" = x; then
58568     # As a simple fix, exclude /usr/bin since it's not a real path.
58569     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58570       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58571       # a path prefixed by /cygdrive for fixpath to work.
58572       new_path="$CYGWIN_ROOT_PATH$input_path"
58573     fi
58574   fi
58575 
58576 
58577   if test "x$path" != "x$new_path"; then
58578     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58579     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58580 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58581   fi
58582 
58583     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58584 
58585   path="$POTENTIAL_FREETYPE_LIB_PATH"
58586   has_colon=`$ECHO $path | $GREP ^.:`
58587   new_path="$path"
58588   if test "x$has_colon" = x; then
58589     # Not in mixed or Windows style, start by that.
58590     new_path=`cmd //c echo $path`
58591   fi
58592 
58593 
58594   input_path="$new_path"
58595   # Check if we need to convert this using DOS-style short mode. If the path
58596   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58597   # take no chances and rewrite it.
58598   # Note: m4 eats our [], so we need to use [ and ] instead.
58599   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58600   if test "x$has_forbidden_chars" != x; then
58601     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58602     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58603   fi
58604 
58605 
58606   windows_path="$new_path"
58607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58608     unix_path=`$CYGPATH -u "$windows_path"`
58609     new_path="$unix_path"
58610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58611     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58612     new_path="$unix_path"
58613   fi
58614 
58615   if test "x$path" != "x$new_path"; then
58616     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58617     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58618 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58619   fi
58620 
58621   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58622   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58623 
58624     else
58625       # We're on a unix platform. Hooray! :)
58626       path="$POTENTIAL_FREETYPE_LIB_PATH"
58627       has_space=`$ECHO "$path" | $GREP " "`
58628       if test "x$has_space" != x; then
58629         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58630 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58631         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58632       fi
58633 
58634       # Use eval to expand a potential ~
58635       eval path="$path"
58636       if test ! -f "$path" && test ! -d "$path"; then
58637         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58638       fi
58639 
58640       if test -d "$path"; then
58641         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58642       else
58643         dir="`$DIRNAME "$path"`"
58644         base="`$BASENAME "$path"`"
58645         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58646       fi
58647     fi
58648   fi
58649 
58650 
58651     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58652     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58653 $as_echo_n "checking for freetype includes... " >&6; }
58654     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58655 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58656     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58657     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58658 $as_echo_n "checking for freetype libraries... " >&6; }
58659     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58660 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58661   fi
58662 
58663             else
58664 
58665   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58666   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58667   METHOD="well-known location"
58668 
58669   # Let's start with an optimistic view of the world :-)
58670   FOUND_FREETYPE=yes
58671 
58672   # First look for the canonical freetype main include file ft2build.h.
58673   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58674     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58675     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58676     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58677       # Fail.
58678       FOUND_FREETYPE=no
58679     fi
58680   fi
58681 
58682   if test "x$FOUND_FREETYPE" = xyes; then
58683     # Include file found, let's continue the sanity check.
58684     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58685 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58686 
58687     # Reset to default value
58688     FREETYPE_BASE_NAME=freetype
58689     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58690     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58691       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58692           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58693         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58694         # for the .6 version explicitly.
58695         FREETYPE_BASE_NAME=freetype.6
58696         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58697         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58698 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58699       else
58700         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58701 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58702         FOUND_FREETYPE=no
58703       fi
58704     else
58705       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58706         # On Windows, we will need both .lib and .dll file.
58707         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58708           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58709 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58710           FOUND_FREETYPE=no
58711         fi
58712       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58713           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58714         # Found lib in isa dir, use that instead.
58715         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58716         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58717 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58718       fi
58719     fi
58720   fi
58721 
58722   if test "x$FOUND_FREETYPE" = xyes; then
58723 
58724   # Only process if variable expands to non-empty
58725 
58726   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58727     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58728 
58729   # Input might be given as Windows format, start by converting to
58730   # unix format.
58731   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58732   new_path=`$CYGPATH -u "$path"`
58733 
58734   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58735   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58736   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58737   # "foo.exe" is OK but "foo" is an error.
58738   #
58739   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58740   # It is also a way to make sure we got the proper file name for the real test later on.
58741   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58742   if test "x$test_shortpath" = x; then
58743     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58744 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58745     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58746   fi
58747 
58748   # Call helper function which possibly converts this using DOS-style short mode.
58749   # If so, the updated path is stored in $new_path.
58750 
58751   input_path="$new_path"
58752   # Check if we need to convert this using DOS-style short mode. If the path
58753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58754   # take no chances and rewrite it.
58755   # Note: m4 eats our [], so we need to use [ and ] instead.
58756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58757   if test "x$has_forbidden_chars" != x; then
58758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58759     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58760     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58761     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58762       # Going to short mode and back again did indeed matter. Since short mode is
58763       # case insensitive, let's make it lowercase to improve readability.
58764       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58765       # Now convert it back to Unix-style (cygpath)
58766       input_path=`$CYGPATH -u "$shortmode_path"`
58767       new_path="$input_path"
58768     fi
58769   fi
58770 
58771   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58772   if test "x$test_cygdrive_prefix" = x; then
58773     # As a simple fix, exclude /usr/bin since it's not a real path.
58774     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58775       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58776       # a path prefixed by /cygdrive for fixpath to work.
58777       new_path="$CYGWIN_ROOT_PATH$input_path"
58778     fi
58779   fi
58780 
58781 
58782   if test "x$path" != "x$new_path"; then
58783     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58784     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58785 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58786   fi
58787 
58788     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58789 
58790   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58791   has_colon=`$ECHO $path | $GREP ^.:`
58792   new_path="$path"
58793   if test "x$has_colon" = x; then
58794     # Not in mixed or Windows style, start by that.
58795     new_path=`cmd //c echo $path`
58796   fi
58797 
58798 
58799   input_path="$new_path"
58800   # Check if we need to convert this using DOS-style short mode. If the path
58801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58802   # take no chances and rewrite it.
58803   # Note: m4 eats our [], so we need to use [ and ] instead.
58804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58805   if test "x$has_forbidden_chars" != x; then
58806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58807     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58808   fi
58809 
58810 
58811   windows_path="$new_path"
58812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58813     unix_path=`$CYGPATH -u "$windows_path"`
58814     new_path="$unix_path"
58815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58817     new_path="$unix_path"
58818   fi
58819 
58820   if test "x$path" != "x$new_path"; then
58821     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58822     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58823 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58824   fi
58825 
58826   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58827   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58828 
58829     else
58830       # We're on a unix platform. Hooray! :)
58831       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58832       has_space=`$ECHO "$path" | $GREP " "`
58833       if test "x$has_space" != x; then
58834         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58835 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58836         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58837       fi
58838 
58839       # Use eval to expand a potential ~
58840       eval path="$path"
58841       if test ! -f "$path" && test ! -d "$path"; then
58842         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58843       fi
58844 
58845       if test -d "$path"; then
58846         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58847       else
58848         dir="`$DIRNAME "$path"`"
58849         base="`$BASENAME "$path"`"
58850         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58851       fi
58852     fi
58853   fi
58854 
58855 
58856   # Only process if variable expands to non-empty
58857 
58858   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58859     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58860 
58861   # Input might be given as Windows format, start by converting to
58862   # unix format.
58863   path="$POTENTIAL_FREETYPE_LIB_PATH"
58864   new_path=`$CYGPATH -u "$path"`
58865 
58866   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58867   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58868   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58869   # "foo.exe" is OK but "foo" is an error.
58870   #
58871   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58872   # It is also a way to make sure we got the proper file name for the real test later on.
58873   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58874   if test "x$test_shortpath" = x; then
58875     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58876 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58877     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58878   fi
58879 
58880   # Call helper function which possibly converts this using DOS-style short mode.
58881   # If so, the updated path is stored in $new_path.
58882 
58883   input_path="$new_path"
58884   # Check if we need to convert this using DOS-style short mode. If the path
58885   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58886   # take no chances and rewrite it.
58887   # Note: m4 eats our [], so we need to use [ and ] instead.
58888   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58889   if test "x$has_forbidden_chars" != x; then
58890     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58891     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58892     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58893     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58894       # Going to short mode and back again did indeed matter. Since short mode is
58895       # case insensitive, let's make it lowercase to improve readability.
58896       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58897       # Now convert it back to Unix-style (cygpath)
58898       input_path=`$CYGPATH -u "$shortmode_path"`
58899       new_path="$input_path"
58900     fi
58901   fi
58902 
58903   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58904   if test "x$test_cygdrive_prefix" = x; then
58905     # As a simple fix, exclude /usr/bin since it's not a real path.
58906     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58907       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58908       # a path prefixed by /cygdrive for fixpath to work.
58909       new_path="$CYGWIN_ROOT_PATH$input_path"
58910     fi
58911   fi
58912 
58913 
58914   if test "x$path" != "x$new_path"; then
58915     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58916     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58917 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58918   fi
58919 
58920     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58921 
58922   path="$POTENTIAL_FREETYPE_LIB_PATH"
58923   has_colon=`$ECHO $path | $GREP ^.:`
58924   new_path="$path"
58925   if test "x$has_colon" = x; then
58926     # Not in mixed or Windows style, start by that.
58927     new_path=`cmd //c echo $path`
58928   fi
58929 
58930 
58931   input_path="$new_path"
58932   # Check if we need to convert this using DOS-style short mode. If the path
58933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58934   # take no chances and rewrite it.
58935   # Note: m4 eats our [], so we need to use [ and ] instead.
58936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58937   if test "x$has_forbidden_chars" != x; then
58938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58939     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58940   fi
58941 
58942 
58943   windows_path="$new_path"
58944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58945     unix_path=`$CYGPATH -u "$windows_path"`
58946     new_path="$unix_path"
58947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58948     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58949     new_path="$unix_path"
58950   fi
58951 
58952   if test "x$path" != "x$new_path"; then
58953     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58954     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58955 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58956   fi
58957 
58958   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58959   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58960 
58961     else
58962       # We're on a unix platform. Hooray! :)
58963       path="$POTENTIAL_FREETYPE_LIB_PATH"
58964       has_space=`$ECHO "$path" | $GREP " "`
58965       if test "x$has_space" != x; then
58966         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58967 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58968         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58969       fi
58970 
58971       # Use eval to expand a potential ~
58972       eval path="$path"
58973       if test ! -f "$path" && test ! -d "$path"; then
58974         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58975       fi
58976 
58977       if test -d "$path"; then
58978         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58979       else
58980         dir="`$DIRNAME "$path"`"
58981         base="`$BASENAME "$path"`"
58982         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58983       fi
58984     fi
58985   fi
58986 
58987 
58988     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58989     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58990 $as_echo_n "checking for freetype includes... " >&6; }
58991     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58992 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58993     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58994     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58995 $as_echo_n "checking for freetype libraries... " >&6; }
58996     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58997 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58998   fi
58999 
59000             fi
59001             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59002                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59003               # Source is available, as a last resort try to build freetype in default location
59004 
59005   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59006   BUILD_FREETYPE=yes
59007 
59008   # Check if the freetype sources are acessible..
59009   if ! test -d $FREETYPE_SRC_PATH; then
59010     { $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
59011 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59012     BUILD_FREETYPE=no
59013   fi
59014   # ..and contain a vc2010 project file
59015   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59016   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59017     { $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
59018 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59019     BUILD_FREETYPE=no
59020   fi
59021   # Now check if configure found a version of 'msbuild.exe'
59022   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59023     { $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
59024 $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;}
59025     BUILD_FREETYPE=no
59026   fi
59027 
59028   # Ready to go..
59029   if test "x$BUILD_FREETYPE" = xyes; then
59030     # msbuild requires trailing slashes for output directories
59031     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59032     freetype_lib_path_unix="$freetype_lib_path"
59033     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59034 
59035   unix_path="$vcxproj_path"
59036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59037     windows_path=`$CYGPATH -m "$unix_path"`
59038     vcxproj_path="$windows_path"
59039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59040     windows_path=`cmd //c echo $unix_path`
59041     vcxproj_path="$windows_path"
59042   fi
59043 
59044 
59045   unix_path="$freetype_lib_path"
59046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59047     windows_path=`$CYGPATH -m "$unix_path"`
59048     freetype_lib_path="$windows_path"
59049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59050     windows_path=`cmd //c echo $unix_path`
59051     freetype_lib_path="$windows_path"
59052   fi
59053 
59054 
59055   unix_path="$freetype_obj_path"
59056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59057     windows_path=`$CYGPATH -m "$unix_path"`
59058     freetype_obj_path="$windows_path"
59059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59060     windows_path=`cmd //c echo $unix_path`
59061     freetype_obj_path="$windows_path"
59062   fi
59063 
59064     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59065       freetype_platform=x64
59066     else
59067       freetype_platform=win32
59068     fi
59069 
59070     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59071     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59072     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59073     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59074     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59075 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59076 
59077     # First we try to build the freetype.dll
59078     $ECHO -e "@echo off\n"\
59079         "$MSBUILD $vcxproj_path "\
59080         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59081         "/p:Configuration=\"Release Multithreaded\" "\
59082         "/p:Platform=$freetype_platform "\
59083         "/p:ConfigurationType=DynamicLibrary "\
59084         "/p:TargetName=freetype "\
59085         "/p:OutDir=\"$freetype_lib_path\" "\
59086         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59087     cmd /c freetype.bat
59088 
59089     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59090       # If that succeeds we also build freetype.lib
59091       $ECHO -e "@echo off\n"\
59092           "$MSBUILD $vcxproj_path "\
59093           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59094           "/p:Configuration=\"Release Multithreaded\" "\
59095           "/p:Platform=$freetype_platform "\
59096           "/p:ConfigurationType=StaticLibrary "\
59097           "/p:TargetName=freetype "\
59098           "/p:OutDir=\"$freetype_lib_path\" "\
59099           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59100       cmd /c freetype.bat
59101 
59102       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59103         # Once we build both, lib and dll, set freetype lib and include path appropriately
59104         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59105         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59106         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59107 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59108       else
59109         BUILD_FREETYPE=no
59110       fi
59111     else
59112       BUILD_FREETYPE=no
59113     fi
59114   fi
59115 
59116               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59117 
59118   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59119   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59120   METHOD="well-known location"
59121 
59122   # Let's start with an optimistic view of the world :-)
59123   FOUND_FREETYPE=yes
59124 
59125   # First look for the canonical freetype main include file ft2build.h.
59126   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59127     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59128     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59129     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59130       # Fail.
59131       FOUND_FREETYPE=no
59132     fi
59133   fi
59134 
59135   if test "x$FOUND_FREETYPE" = xyes; then
59136     # Include file found, let's continue the sanity check.
59137     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59138 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59139 
59140     # Reset to default value
59141     FREETYPE_BASE_NAME=freetype
59142     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59143     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59144       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59145           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59146         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59147         # for the .6 version explicitly.
59148         FREETYPE_BASE_NAME=freetype.6
59149         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59150         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59151 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59152       else
59153         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59154 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59155         FOUND_FREETYPE=no
59156       fi
59157     else
59158       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59159         # On Windows, we will need both .lib and .dll file.
59160         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59161           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59162 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59163           FOUND_FREETYPE=no
59164         fi
59165       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59166           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59167         # Found lib in isa dir, use that instead.
59168         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59169         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59170 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59171       fi
59172     fi
59173   fi
59174 
59175   if test "x$FOUND_FREETYPE" = xyes; then
59176 
59177   # Only process if variable expands to non-empty
59178 
59179   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59180     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59181 
59182   # Input might be given as Windows format, start by converting to
59183   # unix format.
59184   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59185   new_path=`$CYGPATH -u "$path"`
59186 
59187   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59188   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59189   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59190   # "foo.exe" is OK but "foo" is an error.
59191   #
59192   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59193   # It is also a way to make sure we got the proper file name for the real test later on.
59194   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59195   if test "x$test_shortpath" = x; then
59196     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59197 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59198     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59199   fi
59200 
59201   # Call helper function which possibly converts this using DOS-style short mode.
59202   # If so, the updated path is stored in $new_path.
59203 
59204   input_path="$new_path"
59205   # Check if we need to convert this using DOS-style short mode. If the path
59206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59207   # take no chances and rewrite it.
59208   # Note: m4 eats our [], so we need to use [ and ] instead.
59209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59210   if test "x$has_forbidden_chars" != x; then
59211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59212     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59213     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59214     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59215       # Going to short mode and back again did indeed matter. Since short mode is
59216       # case insensitive, let's make it lowercase to improve readability.
59217       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59218       # Now convert it back to Unix-style (cygpath)
59219       input_path=`$CYGPATH -u "$shortmode_path"`
59220       new_path="$input_path"
59221     fi
59222   fi
59223 
59224   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59225   if test "x$test_cygdrive_prefix" = x; then
59226     # As a simple fix, exclude /usr/bin since it's not a real path.
59227     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59228       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59229       # a path prefixed by /cygdrive for fixpath to work.
59230       new_path="$CYGWIN_ROOT_PATH$input_path"
59231     fi
59232   fi
59233 
59234 
59235   if test "x$path" != "x$new_path"; then
59236     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59237     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59238 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59239   fi
59240 
59241     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59242 
59243   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59244   has_colon=`$ECHO $path | $GREP ^.:`
59245   new_path="$path"
59246   if test "x$has_colon" = x; then
59247     # Not in mixed or Windows style, start by that.
59248     new_path=`cmd //c echo $path`
59249   fi
59250 
59251 
59252   input_path="$new_path"
59253   # Check if we need to convert this using DOS-style short mode. If the path
59254   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59255   # take no chances and rewrite it.
59256   # Note: m4 eats our [], so we need to use [ and ] instead.
59257   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59258   if test "x$has_forbidden_chars" != x; then
59259     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59260     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59261   fi
59262 
59263 
59264   windows_path="$new_path"
59265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59266     unix_path=`$CYGPATH -u "$windows_path"`
59267     new_path="$unix_path"
59268   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59269     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59270     new_path="$unix_path"
59271   fi
59272 
59273   if test "x$path" != "x$new_path"; then
59274     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59275     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59276 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59277   fi
59278 
59279   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59280   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59281 
59282     else
59283       # We're on a unix platform. Hooray! :)
59284       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59285       has_space=`$ECHO "$path" | $GREP " "`
59286       if test "x$has_space" != x; then
59287         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59288 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59289         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59290       fi
59291 
59292       # Use eval to expand a potential ~
59293       eval path="$path"
59294       if test ! -f "$path" && test ! -d "$path"; then
59295         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59296       fi
59297 
59298       if test -d "$path"; then
59299         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59300       else
59301         dir="`$DIRNAME "$path"`"
59302         base="`$BASENAME "$path"`"
59303         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59304       fi
59305     fi
59306   fi
59307 
59308 
59309   # Only process if variable expands to non-empty
59310 
59311   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59312     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59313 
59314   # Input might be given as Windows format, start by converting to
59315   # unix format.
59316   path="$POTENTIAL_FREETYPE_LIB_PATH"
59317   new_path=`$CYGPATH -u "$path"`
59318 
59319   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59320   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59321   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59322   # "foo.exe" is OK but "foo" is an error.
59323   #
59324   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59325   # It is also a way to make sure we got the proper file name for the real test later on.
59326   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59327   if test "x$test_shortpath" = x; then
59328     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59329 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59330     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59331   fi
59332 
59333   # Call helper function which possibly converts this using DOS-style short mode.
59334   # If so, the updated path is stored in $new_path.
59335 
59336   input_path="$new_path"
59337   # Check if we need to convert this using DOS-style short mode. If the path
59338   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59339   # take no chances and rewrite it.
59340   # Note: m4 eats our [], so we need to use [ and ] instead.
59341   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59342   if test "x$has_forbidden_chars" != x; then
59343     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59344     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59345     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59346     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59347       # Going to short mode and back again did indeed matter. Since short mode is
59348       # case insensitive, let's make it lowercase to improve readability.
59349       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59350       # Now convert it back to Unix-style (cygpath)
59351       input_path=`$CYGPATH -u "$shortmode_path"`
59352       new_path="$input_path"
59353     fi
59354   fi
59355 
59356   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59357   if test "x$test_cygdrive_prefix" = x; then
59358     # As a simple fix, exclude /usr/bin since it's not a real path.
59359     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59360       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59361       # a path prefixed by /cygdrive for fixpath to work.
59362       new_path="$CYGWIN_ROOT_PATH$input_path"
59363     fi
59364   fi
59365 
59366 
59367   if test "x$path" != "x$new_path"; then
59368     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59369     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59370 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59371   fi
59372 
59373     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59374 
59375   path="$POTENTIAL_FREETYPE_LIB_PATH"
59376   has_colon=`$ECHO $path | $GREP ^.:`
59377   new_path="$path"
59378   if test "x$has_colon" = x; then
59379     # Not in mixed or Windows style, start by that.
59380     new_path=`cmd //c echo $path`
59381   fi
59382 
59383 
59384   input_path="$new_path"
59385   # Check if we need to convert this using DOS-style short mode. If the path
59386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59387   # take no chances and rewrite it.
59388   # Note: m4 eats our [], so we need to use [ and ] instead.
59389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59390   if test "x$has_forbidden_chars" != x; then
59391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59392     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59393   fi
59394 
59395 
59396   windows_path="$new_path"
59397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59398     unix_path=`$CYGPATH -u "$windows_path"`
59399     new_path="$unix_path"
59400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59402     new_path="$unix_path"
59403   fi
59404 
59405   if test "x$path" != "x$new_path"; then
59406     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59408 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59409   fi
59410 
59411   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59412   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59413 
59414     else
59415       # We're on a unix platform. Hooray! :)
59416       path="$POTENTIAL_FREETYPE_LIB_PATH"
59417       has_space=`$ECHO "$path" | $GREP " "`
59418       if test "x$has_space" != x; then
59419         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59420 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59421         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59422       fi
59423 
59424       # Use eval to expand a potential ~
59425       eval path="$path"
59426       if test ! -f "$path" && test ! -d "$path"; then
59427         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59428       fi
59429 
59430       if test -d "$path"; then
59431         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59432       else
59433         dir="`$DIRNAME "$path"`"
59434         base="`$BASENAME "$path"`"
59435         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59436       fi
59437     fi
59438   fi
59439 
59440 
59441     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59442     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59443 $as_echo_n "checking for freetype includes... " >&6; }
59444     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59445 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59446     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59447     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59448 $as_echo_n "checking for freetype libraries... " >&6; }
59449     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59450 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59451   fi
59452 
59453               else
59454 
59455   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59456   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59457   METHOD="well-known location"
59458 
59459   # Let's start with an optimistic view of the world :-)
59460   FOUND_FREETYPE=yes
59461 
59462   # First look for the canonical freetype main include file ft2build.h.
59463   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59464     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59465     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59466     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59467       # Fail.
59468       FOUND_FREETYPE=no
59469     fi
59470   fi
59471 
59472   if test "x$FOUND_FREETYPE" = xyes; then
59473     # Include file found, let's continue the sanity check.
59474     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59475 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59476 
59477     # Reset to default value
59478     FREETYPE_BASE_NAME=freetype
59479     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59480     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59481       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59482           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59483         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59484         # for the .6 version explicitly.
59485         FREETYPE_BASE_NAME=freetype.6
59486         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59487         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59488 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59489       else
59490         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59491 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59492         FOUND_FREETYPE=no
59493       fi
59494     else
59495       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59496         # On Windows, we will need both .lib and .dll file.
59497         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59498           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59499 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59500           FOUND_FREETYPE=no
59501         fi
59502       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59503           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59504         # Found lib in isa dir, use that instead.
59505         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59506         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59507 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59508       fi
59509     fi
59510   fi
59511 
59512   if test "x$FOUND_FREETYPE" = xyes; then
59513 
59514   # Only process if variable expands to non-empty
59515 
59516   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59517     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59518 
59519   # Input might be given as Windows format, start by converting to
59520   # unix format.
59521   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59522   new_path=`$CYGPATH -u "$path"`
59523 
59524   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59525   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59526   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59527   # "foo.exe" is OK but "foo" is an error.
59528   #
59529   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59530   # It is also a way to make sure we got the proper file name for the real test later on.
59531   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59532   if test "x$test_shortpath" = x; then
59533     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59534 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59535     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59536   fi
59537 
59538   # Call helper function which possibly converts this using DOS-style short mode.
59539   # If so, the updated path is stored in $new_path.
59540 
59541   input_path="$new_path"
59542   # Check if we need to convert this using DOS-style short mode. If the path
59543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59544   # take no chances and rewrite it.
59545   # Note: m4 eats our [], so we need to use [ and ] instead.
59546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59547   if test "x$has_forbidden_chars" != x; then
59548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59549     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59550     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59551     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59552       # Going to short mode and back again did indeed matter. Since short mode is
59553       # case insensitive, let's make it lowercase to improve readability.
59554       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59555       # Now convert it back to Unix-style (cygpath)
59556       input_path=`$CYGPATH -u "$shortmode_path"`
59557       new_path="$input_path"
59558     fi
59559   fi
59560 
59561   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59562   if test "x$test_cygdrive_prefix" = x; then
59563     # As a simple fix, exclude /usr/bin since it's not a real path.
59564     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59565       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59566       # a path prefixed by /cygdrive for fixpath to work.
59567       new_path="$CYGWIN_ROOT_PATH$input_path"
59568     fi
59569   fi
59570 
59571 
59572   if test "x$path" != "x$new_path"; then
59573     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59574     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59575 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59576   fi
59577 
59578     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59579 
59580   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59581   has_colon=`$ECHO $path | $GREP ^.:`
59582   new_path="$path"
59583   if test "x$has_colon" = x; then
59584     # Not in mixed or Windows style, start by that.
59585     new_path=`cmd //c echo $path`
59586   fi
59587 
59588 
59589   input_path="$new_path"
59590   # Check if we need to convert this using DOS-style short mode. If the path
59591   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59592   # take no chances and rewrite it.
59593   # Note: m4 eats our [], so we need to use [ and ] instead.
59594   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59595   if test "x$has_forbidden_chars" != x; then
59596     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59597     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59598   fi
59599 
59600 
59601   windows_path="$new_path"
59602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59603     unix_path=`$CYGPATH -u "$windows_path"`
59604     new_path="$unix_path"
59605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59607     new_path="$unix_path"
59608   fi
59609 
59610   if test "x$path" != "x$new_path"; then
59611     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59612     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59613 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59614   fi
59615 
59616   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59617   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59618 
59619     else
59620       # We're on a unix platform. Hooray! :)
59621       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59622       has_space=`$ECHO "$path" | $GREP " "`
59623       if test "x$has_space" != x; then
59624         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59625 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59626         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59627       fi
59628 
59629       # Use eval to expand a potential ~
59630       eval path="$path"
59631       if test ! -f "$path" && test ! -d "$path"; then
59632         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59633       fi
59634 
59635       if test -d "$path"; then
59636         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59637       else
59638         dir="`$DIRNAME "$path"`"
59639         base="`$BASENAME "$path"`"
59640         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59641       fi
59642     fi
59643   fi
59644 
59645 
59646   # Only process if variable expands to non-empty
59647 
59648   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59649     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59650 
59651   # Input might be given as Windows format, start by converting to
59652   # unix format.
59653   path="$POTENTIAL_FREETYPE_LIB_PATH"
59654   new_path=`$CYGPATH -u "$path"`
59655 
59656   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59657   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59658   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59659   # "foo.exe" is OK but "foo" is an error.
59660   #
59661   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59662   # It is also a way to make sure we got the proper file name for the real test later on.
59663   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59664   if test "x$test_shortpath" = x; then
59665     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59666 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59667     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59668   fi
59669 
59670   # Call helper function which possibly converts this using DOS-style short mode.
59671   # If so, the updated path is stored in $new_path.
59672 
59673   input_path="$new_path"
59674   # Check if we need to convert this using DOS-style short mode. If the path
59675   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59676   # take no chances and rewrite it.
59677   # Note: m4 eats our [], so we need to use [ and ] instead.
59678   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59679   if test "x$has_forbidden_chars" != x; then
59680     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59681     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59682     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59683     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59684       # Going to short mode and back again did indeed matter. Since short mode is
59685       # case insensitive, let's make it lowercase to improve readability.
59686       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59687       # Now convert it back to Unix-style (cygpath)
59688       input_path=`$CYGPATH -u "$shortmode_path"`
59689       new_path="$input_path"
59690     fi
59691   fi
59692 
59693   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59694   if test "x$test_cygdrive_prefix" = x; then
59695     # As a simple fix, exclude /usr/bin since it's not a real path.
59696     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59697       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59698       # a path prefixed by /cygdrive for fixpath to work.
59699       new_path="$CYGWIN_ROOT_PATH$input_path"
59700     fi
59701   fi
59702 
59703 
59704   if test "x$path" != "x$new_path"; then
59705     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59706     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59707 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59708   fi
59709 
59710     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59711 
59712   path="$POTENTIAL_FREETYPE_LIB_PATH"
59713   has_colon=`$ECHO $path | $GREP ^.:`
59714   new_path="$path"
59715   if test "x$has_colon" = x; then
59716     # Not in mixed or Windows style, start by that.
59717     new_path=`cmd //c echo $path`
59718   fi
59719 
59720 
59721   input_path="$new_path"
59722   # Check if we need to convert this using DOS-style short mode. If the path
59723   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59724   # take no chances and rewrite it.
59725   # Note: m4 eats our [], so we need to use [ and ] instead.
59726   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59727   if test "x$has_forbidden_chars" != x; then
59728     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59729     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59730   fi
59731 
59732 
59733   windows_path="$new_path"
59734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59735     unix_path=`$CYGPATH -u "$windows_path"`
59736     new_path="$unix_path"
59737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59738     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59739     new_path="$unix_path"
59740   fi
59741 
59742   if test "x$path" != "x$new_path"; then
59743     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59744     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59745 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59746   fi
59747 
59748   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59749   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59750 
59751     else
59752       # We're on a unix platform. Hooray! :)
59753       path="$POTENTIAL_FREETYPE_LIB_PATH"
59754       has_space=`$ECHO "$path" | $GREP " "`
59755       if test "x$has_space" != x; then
59756         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59757 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59758         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59759       fi
59760 
59761       # Use eval to expand a potential ~
59762       eval path="$path"
59763       if test ! -f "$path" && test ! -d "$path"; then
59764         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59765       fi
59766 
59767       if test -d "$path"; then
59768         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59769       else
59770         dir="`$DIRNAME "$path"`"
59771         base="`$BASENAME "$path"`"
59772         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59773       fi
59774     fi
59775   fi
59776 
59777 
59778     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59780 $as_echo_n "checking for freetype includes... " >&6; }
59781     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59782 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59783     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59784     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59785 $as_echo_n "checking for freetype libraries... " >&6; }
59786     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59787 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59788   fi
59789 
59790               fi
59791             fi
59792           fi
59793         else
59794           FREETYPE_BASE_DIR="$SYSROOT/usr"
59795 
59796   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59797   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59798   METHOD="well-known location"
59799 
59800   # Let's start with an optimistic view of the world :-)
59801   FOUND_FREETYPE=yes
59802 
59803   # First look for the canonical freetype main include file ft2build.h.
59804   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59805     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59806     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59807     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59808       # Fail.
59809       FOUND_FREETYPE=no
59810     fi
59811   fi
59812 
59813   if test "x$FOUND_FREETYPE" = xyes; then
59814     # Include file found, let's continue the sanity check.
59815     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59816 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59817 
59818     # Reset to default value
59819     FREETYPE_BASE_NAME=freetype
59820     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59821     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59822       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59823           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59824         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59825         # for the .6 version explicitly.
59826         FREETYPE_BASE_NAME=freetype.6
59827         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59828         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59829 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59830       else
59831         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59832 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59833         FOUND_FREETYPE=no
59834       fi
59835     else
59836       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59837         # On Windows, we will need both .lib and .dll file.
59838         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59839           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59840 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59841           FOUND_FREETYPE=no
59842         fi
59843       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59844           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59845         # Found lib in isa dir, use that instead.
59846         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59847         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59848 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59849       fi
59850     fi
59851   fi
59852 
59853   if test "x$FOUND_FREETYPE" = xyes; then
59854 
59855   # Only process if variable expands to non-empty
59856 
59857   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59858     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59859 
59860   # Input might be given as Windows format, start by converting to
59861   # unix format.
59862   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59863   new_path=`$CYGPATH -u "$path"`
59864 
59865   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59866   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59867   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59868   # "foo.exe" is OK but "foo" is an error.
59869   #
59870   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59871   # It is also a way to make sure we got the proper file name for the real test later on.
59872   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59873   if test "x$test_shortpath" = x; then
59874     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59875 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59876     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59877   fi
59878 
59879   # Call helper function which possibly converts this using DOS-style short mode.
59880   # If so, the updated path is stored in $new_path.
59881 
59882   input_path="$new_path"
59883   # Check if we need to convert this using DOS-style short mode. If the path
59884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59885   # take no chances and rewrite it.
59886   # Note: m4 eats our [], so we need to use [ and ] instead.
59887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59888   if test "x$has_forbidden_chars" != x; then
59889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59890     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59891     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59892     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59893       # Going to short mode and back again did indeed matter. Since short mode is
59894       # case insensitive, let's make it lowercase to improve readability.
59895       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59896       # Now convert it back to Unix-style (cygpath)
59897       input_path=`$CYGPATH -u "$shortmode_path"`
59898       new_path="$input_path"
59899     fi
59900   fi
59901 
59902   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59903   if test "x$test_cygdrive_prefix" = x; then
59904     # As a simple fix, exclude /usr/bin since it's not a real path.
59905     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59906       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59907       # a path prefixed by /cygdrive for fixpath to work.
59908       new_path="$CYGWIN_ROOT_PATH$input_path"
59909     fi
59910   fi
59911 
59912 
59913   if test "x$path" != "x$new_path"; then
59914     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59915     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59916 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59917   fi
59918 
59919     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59920 
59921   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59922   has_colon=`$ECHO $path | $GREP ^.:`
59923   new_path="$path"
59924   if test "x$has_colon" = x; then
59925     # Not in mixed or Windows style, start by that.
59926     new_path=`cmd //c echo $path`
59927   fi
59928 
59929 
59930   input_path="$new_path"
59931   # Check if we need to convert this using DOS-style short mode. If the path
59932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59933   # take no chances and rewrite it.
59934   # Note: m4 eats our [], so we need to use [ and ] instead.
59935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59936   if test "x$has_forbidden_chars" != x; then
59937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59938     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59939   fi
59940 
59941 
59942   windows_path="$new_path"
59943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59944     unix_path=`$CYGPATH -u "$windows_path"`
59945     new_path="$unix_path"
59946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59948     new_path="$unix_path"
59949   fi
59950 
59951   if test "x$path" != "x$new_path"; then
59952     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59953     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59954 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59955   fi
59956 
59957   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59958   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59959 
59960     else
59961       # We're on a unix platform. Hooray! :)
59962       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59963       has_space=`$ECHO "$path" | $GREP " "`
59964       if test "x$has_space" != x; then
59965         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59966 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59967         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59968       fi
59969 
59970       # Use eval to expand a potential ~
59971       eval path="$path"
59972       if test ! -f "$path" && test ! -d "$path"; then
59973         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59974       fi
59975 
59976       if test -d "$path"; then
59977         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59978       else
59979         dir="`$DIRNAME "$path"`"
59980         base="`$BASENAME "$path"`"
59981         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59982       fi
59983     fi
59984   fi
59985 
59986 
59987   # Only process if variable expands to non-empty
59988 
59989   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59990     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59991 
59992   # Input might be given as Windows format, start by converting to
59993   # unix format.
59994   path="$POTENTIAL_FREETYPE_LIB_PATH"
59995   new_path=`$CYGPATH -u "$path"`
59996 
59997   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59998   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59999   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60000   # "foo.exe" is OK but "foo" is an error.
60001   #
60002   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60003   # It is also a way to make sure we got the proper file name for the real test later on.
60004   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60005   if test "x$test_shortpath" = x; then
60006     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60007 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60008     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60009   fi
60010 
60011   # Call helper function which possibly converts this using DOS-style short mode.
60012   # If so, the updated path is stored in $new_path.
60013 
60014   input_path="$new_path"
60015   # Check if we need to convert this using DOS-style short mode. If the path
60016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60017   # take no chances and rewrite it.
60018   # Note: m4 eats our [], so we need to use [ and ] instead.
60019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60020   if test "x$has_forbidden_chars" != x; then
60021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60022     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60023     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60024     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60025       # Going to short mode and back again did indeed matter. Since short mode is
60026       # case insensitive, let's make it lowercase to improve readability.
60027       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60028       # Now convert it back to Unix-style (cygpath)
60029       input_path=`$CYGPATH -u "$shortmode_path"`
60030       new_path="$input_path"
60031     fi
60032   fi
60033 
60034   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60035   if test "x$test_cygdrive_prefix" = x; then
60036     # As a simple fix, exclude /usr/bin since it's not a real path.
60037     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60038       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60039       # a path prefixed by /cygdrive for fixpath to work.
60040       new_path="$CYGWIN_ROOT_PATH$input_path"
60041     fi
60042   fi
60043 
60044 
60045   if test "x$path" != "x$new_path"; then
60046     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60047     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60048 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60049   fi
60050 
60051     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60052 
60053   path="$POTENTIAL_FREETYPE_LIB_PATH"
60054   has_colon=`$ECHO $path | $GREP ^.:`
60055   new_path="$path"
60056   if test "x$has_colon" = x; then
60057     # Not in mixed or Windows style, start by that.
60058     new_path=`cmd //c echo $path`
60059   fi
60060 
60061 
60062   input_path="$new_path"
60063   # Check if we need to convert this using DOS-style short mode. If the path
60064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60065   # take no chances and rewrite it.
60066   # Note: m4 eats our [], so we need to use [ and ] instead.
60067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60068   if test "x$has_forbidden_chars" != x; then
60069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60070     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60071   fi
60072 
60073 
60074   windows_path="$new_path"
60075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60076     unix_path=`$CYGPATH -u "$windows_path"`
60077     new_path="$unix_path"
60078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60080     new_path="$unix_path"
60081   fi
60082 
60083   if test "x$path" != "x$new_path"; then
60084     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60085     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60086 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60087   fi
60088 
60089   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60090   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60091 
60092     else
60093       # We're on a unix platform. Hooray! :)
60094       path="$POTENTIAL_FREETYPE_LIB_PATH"
60095       has_space=`$ECHO "$path" | $GREP " "`
60096       if test "x$has_space" != x; then
60097         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60098 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60099         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60100       fi
60101 
60102       # Use eval to expand a potential ~
60103       eval path="$path"
60104       if test ! -f "$path" && test ! -d "$path"; then
60105         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60106       fi
60107 
60108       if test -d "$path"; then
60109         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60110       else
60111         dir="`$DIRNAME "$path"`"
60112         base="`$BASENAME "$path"`"
60113         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60114       fi
60115     fi
60116   fi
60117 
60118 
60119     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60120     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60121 $as_echo_n "checking for freetype includes... " >&6; }
60122     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60123 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60124     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60125     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60126 $as_echo_n "checking for freetype libraries... " >&6; }
60127     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60128 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60129   fi
60130 
60131 
60132           if test "x$FOUND_FREETYPE" != xyes; then
60133             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60134 
60135   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60136   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60137   METHOD="well-known location"
60138 
60139   # Let's start with an optimistic view of the world :-)
60140   FOUND_FREETYPE=yes
60141 
60142   # First look for the canonical freetype main include file ft2build.h.
60143   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60144     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60145     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60146     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60147       # Fail.
60148       FOUND_FREETYPE=no
60149     fi
60150   fi
60151 
60152   if test "x$FOUND_FREETYPE" = xyes; then
60153     # Include file found, let's continue the sanity check.
60154     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60155 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60156 
60157     # Reset to default value
60158     FREETYPE_BASE_NAME=freetype
60159     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60160     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60161       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60162           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60163         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60164         # for the .6 version explicitly.
60165         FREETYPE_BASE_NAME=freetype.6
60166         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60167         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60168 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60169       else
60170         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60171 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60172         FOUND_FREETYPE=no
60173       fi
60174     else
60175       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60176         # On Windows, we will need both .lib and .dll file.
60177         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60178           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60179 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60180           FOUND_FREETYPE=no
60181         fi
60182       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60183           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60184         # Found lib in isa dir, use that instead.
60185         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60186         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60187 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60188       fi
60189     fi
60190   fi
60191 
60192   if test "x$FOUND_FREETYPE" = xyes; then
60193 
60194   # Only process if variable expands to non-empty
60195 
60196   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60197     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60198 
60199   # Input might be given as Windows format, start by converting to
60200   # unix format.
60201   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60202   new_path=`$CYGPATH -u "$path"`
60203 
60204   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60205   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60206   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60207   # "foo.exe" is OK but "foo" is an error.
60208   #
60209   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60210   # It is also a way to make sure we got the proper file name for the real test later on.
60211   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60212   if test "x$test_shortpath" = x; then
60213     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60214 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60215     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60216   fi
60217 
60218   # Call helper function which possibly converts this using DOS-style short mode.
60219   # If so, the updated path is stored in $new_path.
60220 
60221   input_path="$new_path"
60222   # Check if we need to convert this using DOS-style short mode. If the path
60223   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60224   # take no chances and rewrite it.
60225   # Note: m4 eats our [], so we need to use [ and ] instead.
60226   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60227   if test "x$has_forbidden_chars" != x; then
60228     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60229     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60230     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60231     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60232       # Going to short mode and back again did indeed matter. Since short mode is
60233       # case insensitive, let's make it lowercase to improve readability.
60234       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60235       # Now convert it back to Unix-style (cygpath)
60236       input_path=`$CYGPATH -u "$shortmode_path"`
60237       new_path="$input_path"
60238     fi
60239   fi
60240 
60241   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60242   if test "x$test_cygdrive_prefix" = x; then
60243     # As a simple fix, exclude /usr/bin since it's not a real path.
60244     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60245       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60246       # a path prefixed by /cygdrive for fixpath to work.
60247       new_path="$CYGWIN_ROOT_PATH$input_path"
60248     fi
60249   fi
60250 
60251 
60252   if test "x$path" != "x$new_path"; then
60253     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60254     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60255 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60256   fi
60257 
60258     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60259 
60260   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60261   has_colon=`$ECHO $path | $GREP ^.:`
60262   new_path="$path"
60263   if test "x$has_colon" = x; then
60264     # Not in mixed or Windows style, start by that.
60265     new_path=`cmd //c echo $path`
60266   fi
60267 
60268 
60269   input_path="$new_path"
60270   # Check if we need to convert this using DOS-style short mode. If the path
60271   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60272   # take no chances and rewrite it.
60273   # Note: m4 eats our [], so we need to use [ and ] instead.
60274   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60275   if test "x$has_forbidden_chars" != x; then
60276     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60277     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60278   fi
60279 
60280 
60281   windows_path="$new_path"
60282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60283     unix_path=`$CYGPATH -u "$windows_path"`
60284     new_path="$unix_path"
60285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60286     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60287     new_path="$unix_path"
60288   fi
60289 
60290   if test "x$path" != "x$new_path"; then
60291     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60292     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60293 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60294   fi
60295 
60296   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60297   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60298 
60299     else
60300       # We're on a unix platform. Hooray! :)
60301       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60302       has_space=`$ECHO "$path" | $GREP " "`
60303       if test "x$has_space" != x; then
60304         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60305 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60306         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60307       fi
60308 
60309       # Use eval to expand a potential ~
60310       eval path="$path"
60311       if test ! -f "$path" && test ! -d "$path"; then
60312         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60313       fi
60314 
60315       if test -d "$path"; then
60316         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60317       else
60318         dir="`$DIRNAME "$path"`"
60319         base="`$BASENAME "$path"`"
60320         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60321       fi
60322     fi
60323   fi
60324 
60325 
60326   # Only process if variable expands to non-empty
60327 
60328   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60329     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60330 
60331   # Input might be given as Windows format, start by converting to
60332   # unix format.
60333   path="$POTENTIAL_FREETYPE_LIB_PATH"
60334   new_path=`$CYGPATH -u "$path"`
60335 
60336   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60337   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60338   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60339   # "foo.exe" is OK but "foo" is an error.
60340   #
60341   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60342   # It is also a way to make sure we got the proper file name for the real test later on.
60343   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60344   if test "x$test_shortpath" = x; then
60345     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60346 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60347     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60348   fi
60349 
60350   # Call helper function which possibly converts this using DOS-style short mode.
60351   # If so, the updated path is stored in $new_path.
60352 
60353   input_path="$new_path"
60354   # Check if we need to convert this using DOS-style short mode. If the path
60355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60356   # take no chances and rewrite it.
60357   # Note: m4 eats our [], so we need to use [ and ] instead.
60358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60359   if test "x$has_forbidden_chars" != x; then
60360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60361     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60362     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60363     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60364       # Going to short mode and back again did indeed matter. Since short mode is
60365       # case insensitive, let's make it lowercase to improve readability.
60366       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60367       # Now convert it back to Unix-style (cygpath)
60368       input_path=`$CYGPATH -u "$shortmode_path"`
60369       new_path="$input_path"
60370     fi
60371   fi
60372 
60373   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60374   if test "x$test_cygdrive_prefix" = x; then
60375     # As a simple fix, exclude /usr/bin since it's not a real path.
60376     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60377       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60378       # a path prefixed by /cygdrive for fixpath to work.
60379       new_path="$CYGWIN_ROOT_PATH$input_path"
60380     fi
60381   fi
60382 
60383 
60384   if test "x$path" != "x$new_path"; then
60385     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60386     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60387 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60388   fi
60389 
60390     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60391 
60392   path="$POTENTIAL_FREETYPE_LIB_PATH"
60393   has_colon=`$ECHO $path | $GREP ^.:`
60394   new_path="$path"
60395   if test "x$has_colon" = x; then
60396     # Not in mixed or Windows style, start by that.
60397     new_path=`cmd //c echo $path`
60398   fi
60399 
60400 
60401   input_path="$new_path"
60402   # Check if we need to convert this using DOS-style short mode. If the path
60403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60404   # take no chances and rewrite it.
60405   # Note: m4 eats our [], so we need to use [ and ] instead.
60406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60407   if test "x$has_forbidden_chars" != x; then
60408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60410   fi
60411 
60412 
60413   windows_path="$new_path"
60414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60415     unix_path=`$CYGPATH -u "$windows_path"`
60416     new_path="$unix_path"
60417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60418     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60419     new_path="$unix_path"
60420   fi
60421 
60422   if test "x$path" != "x$new_path"; then
60423     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60424     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60425 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60426   fi
60427 
60428   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60429   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60430 
60431     else
60432       # We're on a unix platform. Hooray! :)
60433       path="$POTENTIAL_FREETYPE_LIB_PATH"
60434       has_space=`$ECHO "$path" | $GREP " "`
60435       if test "x$has_space" != x; then
60436         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60437 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60438         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60439       fi
60440 
60441       # Use eval to expand a potential ~
60442       eval path="$path"
60443       if test ! -f "$path" && test ! -d "$path"; then
60444         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60445       fi
60446 
60447       if test -d "$path"; then
60448         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60449       else
60450         dir="`$DIRNAME "$path"`"
60451         base="`$BASENAME "$path"`"
60452         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60453       fi
60454     fi
60455   fi
60456 
60457 
60458     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60459     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60460 $as_echo_n "checking for freetype includes... " >&6; }
60461     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60462 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60463     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60464     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60465 $as_echo_n "checking for freetype libraries... " >&6; }
60466     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60467 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60468   fi
60469 
60470           fi
60471 
60472           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60473             if test "x$FOUND_FREETYPE" != xyes; then
60474               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60475               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60476 
60477   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60478   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60479   METHOD="well-known location"
60480 
60481   # Let's start with an optimistic view of the world :-)
60482   FOUND_FREETYPE=yes
60483 
60484   # First look for the canonical freetype main include file ft2build.h.
60485   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60486     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60487     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60488     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60489       # Fail.
60490       FOUND_FREETYPE=no
60491     fi
60492   fi
60493 
60494   if test "x$FOUND_FREETYPE" = xyes; then
60495     # Include file found, let's continue the sanity check.
60496     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60497 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60498 
60499     # Reset to default value
60500     FREETYPE_BASE_NAME=freetype
60501     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60502     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60503       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60504           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60505         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60506         # for the .6 version explicitly.
60507         FREETYPE_BASE_NAME=freetype.6
60508         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60509         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60510 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60511       else
60512         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60513 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60514         FOUND_FREETYPE=no
60515       fi
60516     else
60517       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60518         # On Windows, we will need both .lib and .dll file.
60519         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60520           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60521 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60522           FOUND_FREETYPE=no
60523         fi
60524       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60525           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60526         # Found lib in isa dir, use that instead.
60527         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60528         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60529 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60530       fi
60531     fi
60532   fi
60533 
60534   if test "x$FOUND_FREETYPE" = xyes; then
60535 
60536   # Only process if variable expands to non-empty
60537 
60538   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60539     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60540 
60541   # Input might be given as Windows format, start by converting to
60542   # unix format.
60543   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60544   new_path=`$CYGPATH -u "$path"`
60545 
60546   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60547   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60548   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60549   # "foo.exe" is OK but "foo" is an error.
60550   #
60551   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60552   # It is also a way to make sure we got the proper file name for the real test later on.
60553   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60554   if test "x$test_shortpath" = x; then
60555     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60556 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60557     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60558   fi
60559 
60560   # Call helper function which possibly converts this using DOS-style short mode.
60561   # If so, the updated path is stored in $new_path.
60562 
60563   input_path="$new_path"
60564   # Check if we need to convert this using DOS-style short mode. If the path
60565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60566   # take no chances and rewrite it.
60567   # Note: m4 eats our [], so we need to use [ and ] instead.
60568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60569   if test "x$has_forbidden_chars" != x; then
60570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60571     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60572     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60573     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60574       # Going to short mode and back again did indeed matter. Since short mode is
60575       # case insensitive, let's make it lowercase to improve readability.
60576       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60577       # Now convert it back to Unix-style (cygpath)
60578       input_path=`$CYGPATH -u "$shortmode_path"`
60579       new_path="$input_path"
60580     fi
60581   fi
60582 
60583   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60584   if test "x$test_cygdrive_prefix" = x; then
60585     # As a simple fix, exclude /usr/bin since it's not a real path.
60586     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60587       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60588       # a path prefixed by /cygdrive for fixpath to work.
60589       new_path="$CYGWIN_ROOT_PATH$input_path"
60590     fi
60591   fi
60592 
60593 
60594   if test "x$path" != "x$new_path"; then
60595     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60596     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60597 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60598   fi
60599 
60600     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60601 
60602   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60603   has_colon=`$ECHO $path | $GREP ^.:`
60604   new_path="$path"
60605   if test "x$has_colon" = x; then
60606     # Not in mixed or Windows style, start by that.
60607     new_path=`cmd //c echo $path`
60608   fi
60609 
60610 
60611   input_path="$new_path"
60612   # Check if we need to convert this using DOS-style short mode. If the path
60613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60614   # take no chances and rewrite it.
60615   # Note: m4 eats our [], so we need to use [ and ] instead.
60616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60617   if test "x$has_forbidden_chars" != x; then
60618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60619     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60620   fi
60621 
60622 
60623   windows_path="$new_path"
60624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60625     unix_path=`$CYGPATH -u "$windows_path"`
60626     new_path="$unix_path"
60627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60629     new_path="$unix_path"
60630   fi
60631 
60632   if test "x$path" != "x$new_path"; then
60633     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60635 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60636   fi
60637 
60638   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60639   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60640 
60641     else
60642       # We're on a unix platform. Hooray! :)
60643       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60644       has_space=`$ECHO "$path" | $GREP " "`
60645       if test "x$has_space" != x; then
60646         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60647 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60648         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60649       fi
60650 
60651       # Use eval to expand a potential ~
60652       eval path="$path"
60653       if test ! -f "$path" && test ! -d "$path"; then
60654         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60655       fi
60656 
60657       if test -d "$path"; then
60658         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60659       else
60660         dir="`$DIRNAME "$path"`"
60661         base="`$BASENAME "$path"`"
60662         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60663       fi
60664     fi
60665   fi
60666 
60667 
60668   # Only process if variable expands to non-empty
60669 
60670   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60671     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60672 
60673   # Input might be given as Windows format, start by converting to
60674   # unix format.
60675   path="$POTENTIAL_FREETYPE_LIB_PATH"
60676   new_path=`$CYGPATH -u "$path"`
60677 
60678   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60679   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60680   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60681   # "foo.exe" is OK but "foo" is an error.
60682   #
60683   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60684   # It is also a way to make sure we got the proper file name for the real test later on.
60685   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60686   if test "x$test_shortpath" = x; then
60687     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60688 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60689     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60690   fi
60691 
60692   # Call helper function which possibly converts this using DOS-style short mode.
60693   # If so, the updated path is stored in $new_path.
60694 
60695   input_path="$new_path"
60696   # Check if we need to convert this using DOS-style short mode. If the path
60697   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60698   # take no chances and rewrite it.
60699   # Note: m4 eats our [], so we need to use [ and ] instead.
60700   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60701   if test "x$has_forbidden_chars" != x; then
60702     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60703     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60704     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60705     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60706       # Going to short mode and back again did indeed matter. Since short mode is
60707       # case insensitive, let's make it lowercase to improve readability.
60708       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60709       # Now convert it back to Unix-style (cygpath)
60710       input_path=`$CYGPATH -u "$shortmode_path"`
60711       new_path="$input_path"
60712     fi
60713   fi
60714 
60715   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60716   if test "x$test_cygdrive_prefix" = x; then
60717     # As a simple fix, exclude /usr/bin since it's not a real path.
60718     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60719       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60720       # a path prefixed by /cygdrive for fixpath to work.
60721       new_path="$CYGWIN_ROOT_PATH$input_path"
60722     fi
60723   fi
60724 
60725 
60726   if test "x$path" != "x$new_path"; then
60727     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60728     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60729 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60730   fi
60731 
60732     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60733 
60734   path="$POTENTIAL_FREETYPE_LIB_PATH"
60735   has_colon=`$ECHO $path | $GREP ^.:`
60736   new_path="$path"
60737   if test "x$has_colon" = x; then
60738     # Not in mixed or Windows style, start by that.
60739     new_path=`cmd //c echo $path`
60740   fi
60741 
60742 
60743   input_path="$new_path"
60744   # Check if we need to convert this using DOS-style short mode. If the path
60745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60746   # take no chances and rewrite it.
60747   # Note: m4 eats our [], so we need to use [ and ] instead.
60748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60749   if test "x$has_forbidden_chars" != x; then
60750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60751     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60752   fi
60753 
60754 
60755   windows_path="$new_path"
60756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60757     unix_path=`$CYGPATH -u "$windows_path"`
60758     new_path="$unix_path"
60759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60761     new_path="$unix_path"
60762   fi
60763 
60764   if test "x$path" != "x$new_path"; then
60765     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60767 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60768   fi
60769 
60770   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60771   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60772 
60773     else
60774       # We're on a unix platform. Hooray! :)
60775       path="$POTENTIAL_FREETYPE_LIB_PATH"
60776       has_space=`$ECHO "$path" | $GREP " "`
60777       if test "x$has_space" != x; then
60778         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60779 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60780         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60781       fi
60782 
60783       # Use eval to expand a potential ~
60784       eval path="$path"
60785       if test ! -f "$path" && test ! -d "$path"; then
60786         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60787       fi
60788 
60789       if test -d "$path"; then
60790         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60791       else
60792         dir="`$DIRNAME "$path"`"
60793         base="`$BASENAME "$path"`"
60794         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60795       fi
60796     fi
60797   fi
60798 
60799 
60800     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60801     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60802 $as_echo_n "checking for freetype includes... " >&6; }
60803     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60804 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60805     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60806     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60807 $as_echo_n "checking for freetype libraries... " >&6; }
60808     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60809 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60810   fi
60811 
60812             fi
60813           fi
60814 
60815           if test "x$FOUND_FREETYPE" != xyes; then
60816             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
60817 
60818   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60819   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60820   METHOD="well-known location"
60821 
60822   # Let's start with an optimistic view of the world :-)
60823   FOUND_FREETYPE=yes
60824 
60825   # First look for the canonical freetype main include file ft2build.h.
60826   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60827     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60828     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60829     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60830       # Fail.
60831       FOUND_FREETYPE=no
60832     fi
60833   fi
60834 
60835   if test "x$FOUND_FREETYPE" = xyes; then
60836     # Include file found, let's continue the sanity check.
60837     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60838 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60839 
60840     # Reset to default value
60841     FREETYPE_BASE_NAME=freetype
60842     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60843     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60844       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60845           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60846         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60847         # for the .6 version explicitly.
60848         FREETYPE_BASE_NAME=freetype.6
60849         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60850         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60851 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60852       else
60853         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60854 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60855         FOUND_FREETYPE=no
60856       fi
60857     else
60858       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60859         # On Windows, we will need both .lib and .dll file.
60860         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60861           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60862 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60863           FOUND_FREETYPE=no
60864         fi
60865       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60866           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60867         # Found lib in isa dir, use that instead.
60868         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60869         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60870 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60871       fi
60872     fi
60873   fi
60874 
60875   if test "x$FOUND_FREETYPE" = xyes; then
60876 
60877   # Only process if variable expands to non-empty
60878 
60879   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60880     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60881 
60882   # Input might be given as Windows format, start by converting to
60883   # unix format.
60884   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60885   new_path=`$CYGPATH -u "$path"`
60886 
60887   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60888   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60889   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60890   # "foo.exe" is OK but "foo" is an error.
60891   #
60892   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60893   # It is also a way to make sure we got the proper file name for the real test later on.
60894   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60895   if test "x$test_shortpath" = x; then
60896     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60897 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60898     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60899   fi
60900 
60901   # Call helper function which possibly converts this using DOS-style short mode.
60902   # If so, the updated path is stored in $new_path.
60903 
60904   input_path="$new_path"
60905   # Check if we need to convert this using DOS-style short mode. If the path
60906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60907   # take no chances and rewrite it.
60908   # Note: m4 eats our [], so we need to use [ and ] instead.
60909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60910   if test "x$has_forbidden_chars" != x; then
60911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60912     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60913     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60914     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60915       # Going to short mode and back again did indeed matter. Since short mode is
60916       # case insensitive, let's make it lowercase to improve readability.
60917       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60918       # Now convert it back to Unix-style (cygpath)
60919       input_path=`$CYGPATH -u "$shortmode_path"`
60920       new_path="$input_path"
60921     fi
60922   fi
60923 
60924   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60925   if test "x$test_cygdrive_prefix" = x; then
60926     # As a simple fix, exclude /usr/bin since it's not a real path.
60927     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60928       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60929       # a path prefixed by /cygdrive for fixpath to work.
60930       new_path="$CYGWIN_ROOT_PATH$input_path"
60931     fi
60932   fi
60933 
60934 
60935   if test "x$path" != "x$new_path"; then
60936     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60937     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60938 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60939   fi
60940 
60941     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60942 
60943   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60944   has_colon=`$ECHO $path | $GREP ^.:`
60945   new_path="$path"
60946   if test "x$has_colon" = x; then
60947     # Not in mixed or Windows style, start by that.
60948     new_path=`cmd //c echo $path`
60949   fi
60950 
60951 
60952   input_path="$new_path"
60953   # Check if we need to convert this using DOS-style short mode. If the path
60954   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60955   # take no chances and rewrite it.
60956   # Note: m4 eats our [], so we need to use [ and ] instead.
60957   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60958   if test "x$has_forbidden_chars" != x; then
60959     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60960     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60961   fi
60962 
60963 
60964   windows_path="$new_path"
60965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60966     unix_path=`$CYGPATH -u "$windows_path"`
60967     new_path="$unix_path"
60968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60970     new_path="$unix_path"
60971   fi
60972 
60973   if test "x$path" != "x$new_path"; then
60974     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60975     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60976 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60977   fi
60978 
60979   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60980   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60981 
60982     else
60983       # We're on a unix platform. Hooray! :)
60984       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60985       has_space=`$ECHO "$path" | $GREP " "`
60986       if test "x$has_space" != x; then
60987         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60988 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60989         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60990       fi
60991 
60992       # Use eval to expand a potential ~
60993       eval path="$path"
60994       if test ! -f "$path" && test ! -d "$path"; then
60995         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60996       fi
60997 
60998       if test -d "$path"; then
60999         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61000       else
61001         dir="`$DIRNAME "$path"`"
61002         base="`$BASENAME "$path"`"
61003         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61004       fi
61005     fi
61006   fi
61007 
61008 
61009   # Only process if variable expands to non-empty
61010 
61011   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61012     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61013 
61014   # Input might be given as Windows format, start by converting to
61015   # unix format.
61016   path="$POTENTIAL_FREETYPE_LIB_PATH"
61017   new_path=`$CYGPATH -u "$path"`
61018 
61019   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61020   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61021   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61022   # "foo.exe" is OK but "foo" is an error.
61023   #
61024   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61025   # It is also a way to make sure we got the proper file name for the real test later on.
61026   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61027   if test "x$test_shortpath" = x; then
61028     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61029 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61030     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61031   fi
61032 
61033   # Call helper function which possibly converts this using DOS-style short mode.
61034   # If so, the updated path is stored in $new_path.
61035 
61036   input_path="$new_path"
61037   # Check if we need to convert this using DOS-style short mode. If the path
61038   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61039   # take no chances and rewrite it.
61040   # Note: m4 eats our [], so we need to use [ and ] instead.
61041   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61042   if test "x$has_forbidden_chars" != x; then
61043     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61044     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61045     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61046     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61047       # Going to short mode and back again did indeed matter. Since short mode is
61048       # case insensitive, let's make it lowercase to improve readability.
61049       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61050       # Now convert it back to Unix-style (cygpath)
61051       input_path=`$CYGPATH -u "$shortmode_path"`
61052       new_path="$input_path"
61053     fi
61054   fi
61055 
61056   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61057   if test "x$test_cygdrive_prefix" = x; then
61058     # As a simple fix, exclude /usr/bin since it's not a real path.
61059     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61060       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61061       # a path prefixed by /cygdrive for fixpath to work.
61062       new_path="$CYGWIN_ROOT_PATH$input_path"
61063     fi
61064   fi
61065 
61066 
61067   if test "x$path" != "x$new_path"; then
61068     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61069     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61070 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61071   fi
61072 
61073     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61074 
61075   path="$POTENTIAL_FREETYPE_LIB_PATH"
61076   has_colon=`$ECHO $path | $GREP ^.:`
61077   new_path="$path"
61078   if test "x$has_colon" = x; then
61079     # Not in mixed or Windows style, start by that.
61080     new_path=`cmd //c echo $path`
61081   fi
61082 
61083 
61084   input_path="$new_path"
61085   # Check if we need to convert this using DOS-style short mode. If the path
61086   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61087   # take no chances and rewrite it.
61088   # Note: m4 eats our [], so we need to use [ and ] instead.
61089   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61090   if test "x$has_forbidden_chars" != x; then
61091     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61092     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61093   fi
61094 
61095 
61096   windows_path="$new_path"
61097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61098     unix_path=`$CYGPATH -u "$windows_path"`
61099     new_path="$unix_path"
61100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61101     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61102     new_path="$unix_path"
61103   fi
61104 
61105   if test "x$path" != "x$new_path"; then
61106     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61107     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61108 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61109   fi
61110 
61111   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61112   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61113 
61114     else
61115       # We're on a unix platform. Hooray! :)
61116       path="$POTENTIAL_FREETYPE_LIB_PATH"
61117       has_space=`$ECHO "$path" | $GREP " "`
61118       if test "x$has_space" != x; then
61119         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61120 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61121         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61122       fi
61123 
61124       # Use eval to expand a potential ~
61125       eval path="$path"
61126       if test ! -f "$path" && test ! -d "$path"; then
61127         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61128       fi
61129 
61130       if test -d "$path"; then
61131         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61132       else
61133         dir="`$DIRNAME "$path"`"
61134         base="`$BASENAME "$path"`"
61135         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61136       fi
61137     fi
61138   fi
61139 
61140 
61141     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61142     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61143 $as_echo_n "checking for freetype includes... " >&6; }
61144     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61145 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61146     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61147     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61148 $as_echo_n "checking for freetype libraries... " >&6; }
61149     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61150 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61151   fi
61152 
61153           fi
61154 
61155           if test "x$FOUND_FREETYPE" != xyes; then
61156             FREETYPE_BASE_DIR="$SYSROOT/usr"
61157             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61158 
61159   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61160   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61161   METHOD="well-known location"
61162 
61163   # Let's start with an optimistic view of the world :-)
61164   FOUND_FREETYPE=yes
61165 
61166   # First look for the canonical freetype main include file ft2build.h.
61167   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61168     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61169     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61170     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61171       # Fail.
61172       FOUND_FREETYPE=no
61173     fi
61174   fi
61175 
61176   if test "x$FOUND_FREETYPE" = xyes; then
61177     # Include file found, let's continue the sanity check.
61178     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61179 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61180 
61181     # Reset to default value
61182     FREETYPE_BASE_NAME=freetype
61183     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61184     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61185       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61186           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61187         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61188         # for the .6 version explicitly.
61189         FREETYPE_BASE_NAME=freetype.6
61190         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61191         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61192 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61193       else
61194         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61195 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61196         FOUND_FREETYPE=no
61197       fi
61198     else
61199       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61200         # On Windows, we will need both .lib and .dll file.
61201         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61202           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61203 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61204           FOUND_FREETYPE=no
61205         fi
61206       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61207           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61208         # Found lib in isa dir, use that instead.
61209         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61210         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61211 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61212       fi
61213     fi
61214   fi
61215 
61216   if test "x$FOUND_FREETYPE" = xyes; then
61217 
61218   # Only process if variable expands to non-empty
61219 
61220   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61221     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61222 
61223   # Input might be given as Windows format, start by converting to
61224   # unix format.
61225   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61226   new_path=`$CYGPATH -u "$path"`
61227 
61228   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61229   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61230   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61231   # "foo.exe" is OK but "foo" is an error.
61232   #
61233   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61234   # It is also a way to make sure we got the proper file name for the real test later on.
61235   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61236   if test "x$test_shortpath" = x; then
61237     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61238 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61239     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61240   fi
61241 
61242   # Call helper function which possibly converts this using DOS-style short mode.
61243   # If so, the updated path is stored in $new_path.
61244 
61245   input_path="$new_path"
61246   # Check if we need to convert this using DOS-style short mode. If the path
61247   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61248   # take no chances and rewrite it.
61249   # Note: m4 eats our [], so we need to use [ and ] instead.
61250   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61251   if test "x$has_forbidden_chars" != x; then
61252     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61253     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61254     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61255     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61256       # Going to short mode and back again did indeed matter. Since short mode is
61257       # case insensitive, let's make it lowercase to improve readability.
61258       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61259       # Now convert it back to Unix-style (cygpath)
61260       input_path=`$CYGPATH -u "$shortmode_path"`
61261       new_path="$input_path"
61262     fi
61263   fi
61264 
61265   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61266   if test "x$test_cygdrive_prefix" = x; then
61267     # As a simple fix, exclude /usr/bin since it's not a real path.
61268     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61269       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61270       # a path prefixed by /cygdrive for fixpath to work.
61271       new_path="$CYGWIN_ROOT_PATH$input_path"
61272     fi
61273   fi
61274 
61275 
61276   if test "x$path" != "x$new_path"; then
61277     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61278     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61279 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61280   fi
61281 
61282     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61283 
61284   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61285   has_colon=`$ECHO $path | $GREP ^.:`
61286   new_path="$path"
61287   if test "x$has_colon" = x; then
61288     # Not in mixed or Windows style, start by that.
61289     new_path=`cmd //c echo $path`
61290   fi
61291 
61292 
61293   input_path="$new_path"
61294   # Check if we need to convert this using DOS-style short mode. If the path
61295   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61296   # take no chances and rewrite it.
61297   # Note: m4 eats our [], so we need to use [ and ] instead.
61298   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61299   if test "x$has_forbidden_chars" != x; then
61300     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61301     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61302   fi
61303 
61304 
61305   windows_path="$new_path"
61306   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61307     unix_path=`$CYGPATH -u "$windows_path"`
61308     new_path="$unix_path"
61309   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61310     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61311     new_path="$unix_path"
61312   fi
61313 
61314   if test "x$path" != "x$new_path"; then
61315     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61316     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61317 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61318   fi
61319 
61320   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61321   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61322 
61323     else
61324       # We're on a unix platform. Hooray! :)
61325       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61326       has_space=`$ECHO "$path" | $GREP " "`
61327       if test "x$has_space" != x; then
61328         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61329 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61330         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61331       fi
61332 
61333       # Use eval to expand a potential ~
61334       eval path="$path"
61335       if test ! -f "$path" && test ! -d "$path"; then
61336         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61337       fi
61338 
61339       if test -d "$path"; then
61340         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61341       else
61342         dir="`$DIRNAME "$path"`"
61343         base="`$BASENAME "$path"`"
61344         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61345       fi
61346     fi
61347   fi
61348 
61349 
61350   # Only process if variable expands to non-empty
61351 
61352   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61353     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61354 
61355   # Input might be given as Windows format, start by converting to
61356   # unix format.
61357   path="$POTENTIAL_FREETYPE_LIB_PATH"
61358   new_path=`$CYGPATH -u "$path"`
61359 
61360   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61361   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61362   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61363   # "foo.exe" is OK but "foo" is an error.
61364   #
61365   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61366   # It is also a way to make sure we got the proper file name for the real test later on.
61367   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61368   if test "x$test_shortpath" = x; then
61369     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61370 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61371     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61372   fi
61373 
61374   # Call helper function which possibly converts this using DOS-style short mode.
61375   # If so, the updated path is stored in $new_path.
61376 
61377   input_path="$new_path"
61378   # Check if we need to convert this using DOS-style short mode. If the path
61379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61380   # take no chances and rewrite it.
61381   # Note: m4 eats our [], so we need to use [ and ] instead.
61382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61383   if test "x$has_forbidden_chars" != x; then
61384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61385     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61386     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61387     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61388       # Going to short mode and back again did indeed matter. Since short mode is
61389       # case insensitive, let's make it lowercase to improve readability.
61390       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61391       # Now convert it back to Unix-style (cygpath)
61392       input_path=`$CYGPATH -u "$shortmode_path"`
61393       new_path="$input_path"
61394     fi
61395   fi
61396 
61397   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61398   if test "x$test_cygdrive_prefix" = x; then
61399     # As a simple fix, exclude /usr/bin since it's not a real path.
61400     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61401       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61402       # a path prefixed by /cygdrive for fixpath to work.
61403       new_path="$CYGWIN_ROOT_PATH$input_path"
61404     fi
61405   fi
61406 
61407 
61408   if test "x$path" != "x$new_path"; then
61409     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61410     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61411 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61412   fi
61413 
61414     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61415 
61416   path="$POTENTIAL_FREETYPE_LIB_PATH"
61417   has_colon=`$ECHO $path | $GREP ^.:`
61418   new_path="$path"
61419   if test "x$has_colon" = x; then
61420     # Not in mixed or Windows style, start by that.
61421     new_path=`cmd //c echo $path`
61422   fi
61423 
61424 
61425   input_path="$new_path"
61426   # Check if we need to convert this using DOS-style short mode. If the path
61427   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61428   # take no chances and rewrite it.
61429   # Note: m4 eats our [], so we need to use [ and ] instead.
61430   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61431   if test "x$has_forbidden_chars" != x; then
61432     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61433     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61434   fi
61435 
61436 
61437   windows_path="$new_path"
61438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61439     unix_path=`$CYGPATH -u "$windows_path"`
61440     new_path="$unix_path"
61441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61443     new_path="$unix_path"
61444   fi
61445 
61446   if test "x$path" != "x$new_path"; then
61447     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61448     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61449 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61450   fi
61451 
61452   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61453   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61454 
61455     else
61456       # We're on a unix platform. Hooray! :)
61457       path="$POTENTIAL_FREETYPE_LIB_PATH"
61458       has_space=`$ECHO "$path" | $GREP " "`
61459       if test "x$has_space" != x; then
61460         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61461 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61462         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61463       fi
61464 
61465       # Use eval to expand a potential ~
61466       eval path="$path"
61467       if test ! -f "$path" && test ! -d "$path"; then
61468         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61469       fi
61470 
61471       if test -d "$path"; then
61472         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61473       else
61474         dir="`$DIRNAME "$path"`"
61475         base="`$BASENAME "$path"`"
61476         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61477       fi
61478     fi
61479   fi
61480 
61481 
61482     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61483     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61484 $as_echo_n "checking for freetype includes... " >&6; }
61485     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61486 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61487     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61488     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61489 $as_echo_n "checking for freetype libraries... " >&6; }
61490     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61491 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61492   fi
61493 
61494             else
61495 
61496   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61497   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61498   METHOD="well-known location"
61499 
61500   # Let's start with an optimistic view of the world :-)
61501   FOUND_FREETYPE=yes
61502 
61503   # First look for the canonical freetype main include file ft2build.h.
61504   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61505     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61506     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61507     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61508       # Fail.
61509       FOUND_FREETYPE=no
61510     fi
61511   fi
61512 
61513   if test "x$FOUND_FREETYPE" = xyes; then
61514     # Include file found, let's continue the sanity check.
61515     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61516 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61517 
61518     # Reset to default value
61519     FREETYPE_BASE_NAME=freetype
61520     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61521     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61522       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61523           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61524         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61525         # for the .6 version explicitly.
61526         FREETYPE_BASE_NAME=freetype.6
61527         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61528         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61529 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61530       else
61531         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61532 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61533         FOUND_FREETYPE=no
61534       fi
61535     else
61536       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61537         # On Windows, we will need both .lib and .dll file.
61538         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61539           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61540 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61541           FOUND_FREETYPE=no
61542         fi
61543       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61544           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61545         # Found lib in isa dir, use that instead.
61546         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61547         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61548 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61549       fi
61550     fi
61551   fi
61552 
61553   if test "x$FOUND_FREETYPE" = xyes; then
61554 
61555   # Only process if variable expands to non-empty
61556 
61557   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61558     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61559 
61560   # Input might be given as Windows format, start by converting to
61561   # unix format.
61562   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61563   new_path=`$CYGPATH -u "$path"`
61564 
61565   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61566   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61567   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61568   # "foo.exe" is OK but "foo" is an error.
61569   #
61570   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61571   # It is also a way to make sure we got the proper file name for the real test later on.
61572   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61573   if test "x$test_shortpath" = x; then
61574     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61575 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61576     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61577   fi
61578 
61579   # Call helper function which possibly converts this using DOS-style short mode.
61580   # If so, the updated path is stored in $new_path.
61581 
61582   input_path="$new_path"
61583   # Check if we need to convert this using DOS-style short mode. If the path
61584   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61585   # take no chances and rewrite it.
61586   # Note: m4 eats our [], so we need to use [ and ] instead.
61587   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61588   if test "x$has_forbidden_chars" != x; then
61589     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61590     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61591     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61592     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61593       # Going to short mode and back again did indeed matter. Since short mode is
61594       # case insensitive, let's make it lowercase to improve readability.
61595       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61596       # Now convert it back to Unix-style (cygpath)
61597       input_path=`$CYGPATH -u "$shortmode_path"`
61598       new_path="$input_path"
61599     fi
61600   fi
61601 
61602   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61603   if test "x$test_cygdrive_prefix" = x; then
61604     # As a simple fix, exclude /usr/bin since it's not a real path.
61605     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61606       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61607       # a path prefixed by /cygdrive for fixpath to work.
61608       new_path="$CYGWIN_ROOT_PATH$input_path"
61609     fi
61610   fi
61611 
61612 
61613   if test "x$path" != "x$new_path"; then
61614     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61615     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61616 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61617   fi
61618 
61619     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61620 
61621   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61622   has_colon=`$ECHO $path | $GREP ^.:`
61623   new_path="$path"
61624   if test "x$has_colon" = x; then
61625     # Not in mixed or Windows style, start by that.
61626     new_path=`cmd //c echo $path`
61627   fi
61628 
61629 
61630   input_path="$new_path"
61631   # Check if we need to convert this using DOS-style short mode. If the path
61632   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61633   # take no chances and rewrite it.
61634   # Note: m4 eats our [], so we need to use [ and ] instead.
61635   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61636   if test "x$has_forbidden_chars" != x; then
61637     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61638     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61639   fi
61640 
61641 
61642   windows_path="$new_path"
61643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61644     unix_path=`$CYGPATH -u "$windows_path"`
61645     new_path="$unix_path"
61646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61648     new_path="$unix_path"
61649   fi
61650 
61651   if test "x$path" != "x$new_path"; then
61652     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61653     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61654 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61655   fi
61656 
61657   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61658   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61659 
61660     else
61661       # We're on a unix platform. Hooray! :)
61662       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61663       has_space=`$ECHO "$path" | $GREP " "`
61664       if test "x$has_space" != x; then
61665         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61666 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61667         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61668       fi
61669 
61670       # Use eval to expand a potential ~
61671       eval path="$path"
61672       if test ! -f "$path" && test ! -d "$path"; then
61673         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61674       fi
61675 
61676       if test -d "$path"; then
61677         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61678       else
61679         dir="`$DIRNAME "$path"`"
61680         base="`$BASENAME "$path"`"
61681         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61682       fi
61683     fi
61684   fi
61685 
61686 
61687   # Only process if variable expands to non-empty
61688 
61689   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61690     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61691 
61692   # Input might be given as Windows format, start by converting to
61693   # unix format.
61694   path="$POTENTIAL_FREETYPE_LIB_PATH"
61695   new_path=`$CYGPATH -u "$path"`
61696 
61697   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61698   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61699   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61700   # "foo.exe" is OK but "foo" is an error.
61701   #
61702   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61703   # It is also a way to make sure we got the proper file name for the real test later on.
61704   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61705   if test "x$test_shortpath" = x; then
61706     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61707 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61708     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61709   fi
61710 
61711   # Call helper function which possibly converts this using DOS-style short mode.
61712   # If so, the updated path is stored in $new_path.
61713 
61714   input_path="$new_path"
61715   # Check if we need to convert this using DOS-style short mode. If the path
61716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61717   # take no chances and rewrite it.
61718   # Note: m4 eats our [], so we need to use [ and ] instead.
61719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61720   if test "x$has_forbidden_chars" != x; then
61721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61722     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61723     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61724     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61725       # Going to short mode and back again did indeed matter. Since short mode is
61726       # case insensitive, let's make it lowercase to improve readability.
61727       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61728       # Now convert it back to Unix-style (cygpath)
61729       input_path=`$CYGPATH -u "$shortmode_path"`
61730       new_path="$input_path"
61731     fi
61732   fi
61733 
61734   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61735   if test "x$test_cygdrive_prefix" = x; then
61736     # As a simple fix, exclude /usr/bin since it's not a real path.
61737     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61738       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61739       # a path prefixed by /cygdrive for fixpath to work.
61740       new_path="$CYGWIN_ROOT_PATH$input_path"
61741     fi
61742   fi
61743 
61744 
61745   if test "x$path" != "x$new_path"; then
61746     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61747     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61748 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61749   fi
61750 
61751     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61752 
61753   path="$POTENTIAL_FREETYPE_LIB_PATH"
61754   has_colon=`$ECHO $path | $GREP ^.:`
61755   new_path="$path"
61756   if test "x$has_colon" = x; then
61757     # Not in mixed or Windows style, start by that.
61758     new_path=`cmd //c echo $path`
61759   fi
61760 
61761 
61762   input_path="$new_path"
61763   # Check if we need to convert this using DOS-style short mode. If the path
61764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61765   # take no chances and rewrite it.
61766   # Note: m4 eats our [], so we need to use [ and ] instead.
61767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61768   if test "x$has_forbidden_chars" != x; then
61769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61770     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61771   fi
61772 
61773 
61774   windows_path="$new_path"
61775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61776     unix_path=`$CYGPATH -u "$windows_path"`
61777     new_path="$unix_path"
61778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61780     new_path="$unix_path"
61781   fi
61782 
61783   if test "x$path" != "x$new_path"; then
61784     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61785     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61786 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61787   fi
61788 
61789   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61790   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61791 
61792     else
61793       # We're on a unix platform. Hooray! :)
61794       path="$POTENTIAL_FREETYPE_LIB_PATH"
61795       has_space=`$ECHO "$path" | $GREP " "`
61796       if test "x$has_space" != x; then
61797         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61798 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61799         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61800       fi
61801 
61802       # Use eval to expand a potential ~
61803       eval path="$path"
61804       if test ! -f "$path" && test ! -d "$path"; then
61805         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61806       fi
61807 
61808       if test -d "$path"; then
61809         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61810       else
61811         dir="`$DIRNAME "$path"`"
61812         base="`$BASENAME "$path"`"
61813         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61814       fi
61815     fi
61816   fi
61817 
61818 
61819     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61820     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61821 $as_echo_n "checking for freetype includes... " >&6; }
61822     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61823 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61824     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61825     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61826 $as_echo_n "checking for freetype libraries... " >&6; }
61827     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61828 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61829   fi
61830 
61831               if test "x$FOUND_FREETYPE" != xyes; then
61832 
61833   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61834   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61835   METHOD="well-known location"
61836 
61837   # Let's start with an optimistic view of the world :-)
61838   FOUND_FREETYPE=yes
61839 
61840   # First look for the canonical freetype main include file ft2build.h.
61841   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61842     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61843     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61844     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61845       # Fail.
61846       FOUND_FREETYPE=no
61847     fi
61848   fi
61849 
61850   if test "x$FOUND_FREETYPE" = xyes; then
61851     # Include file found, let's continue the sanity check.
61852     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61853 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61854 
61855     # Reset to default value
61856     FREETYPE_BASE_NAME=freetype
61857     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61858     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61859       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61860           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61861         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61862         # for the .6 version explicitly.
61863         FREETYPE_BASE_NAME=freetype.6
61864         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61865         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61866 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61867       else
61868         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61869 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61870         FOUND_FREETYPE=no
61871       fi
61872     else
61873       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61874         # On Windows, we will need both .lib and .dll file.
61875         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61876           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61877 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61878           FOUND_FREETYPE=no
61879         fi
61880       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61881           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61882         # Found lib in isa dir, use that instead.
61883         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61884         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61885 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61886       fi
61887     fi
61888   fi
61889 
61890   if test "x$FOUND_FREETYPE" = xyes; then
61891 
61892   # Only process if variable expands to non-empty
61893 
61894   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61895     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61896 
61897   # Input might be given as Windows format, start by converting to
61898   # unix format.
61899   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61900   new_path=`$CYGPATH -u "$path"`
61901 
61902   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61903   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61904   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61905   # "foo.exe" is OK but "foo" is an error.
61906   #
61907   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61908   # It is also a way to make sure we got the proper file name for the real test later on.
61909   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61910   if test "x$test_shortpath" = x; then
61911     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61912 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61913     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61914   fi
61915 
61916   # Call helper function which possibly converts this using DOS-style short mode.
61917   # If so, the updated path is stored in $new_path.
61918 
61919   input_path="$new_path"
61920   # Check if we need to convert this using DOS-style short mode. If the path
61921   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61922   # take no chances and rewrite it.
61923   # Note: m4 eats our [], so we need to use [ and ] instead.
61924   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61925   if test "x$has_forbidden_chars" != x; then
61926     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61927     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61928     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61929     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61930       # Going to short mode and back again did indeed matter. Since short mode is
61931       # case insensitive, let's make it lowercase to improve readability.
61932       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61933       # Now convert it back to Unix-style (cygpath)
61934       input_path=`$CYGPATH -u "$shortmode_path"`
61935       new_path="$input_path"
61936     fi
61937   fi
61938 
61939   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61940   if test "x$test_cygdrive_prefix" = x; then
61941     # As a simple fix, exclude /usr/bin since it's not a real path.
61942     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61943       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61944       # a path prefixed by /cygdrive for fixpath to work.
61945       new_path="$CYGWIN_ROOT_PATH$input_path"
61946     fi
61947   fi
61948 
61949 
61950   if test "x$path" != "x$new_path"; then
61951     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61952     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61953 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61954   fi
61955 
61956     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61957 
61958   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61959   has_colon=`$ECHO $path | $GREP ^.:`
61960   new_path="$path"
61961   if test "x$has_colon" = x; then
61962     # Not in mixed or Windows style, start by that.
61963     new_path=`cmd //c echo $path`
61964   fi
61965 
61966 
61967   input_path="$new_path"
61968   # Check if we need to convert this using DOS-style short mode. If the path
61969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61970   # take no chances and rewrite it.
61971   # Note: m4 eats our [], so we need to use [ and ] instead.
61972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61973   if test "x$has_forbidden_chars" != x; then
61974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61975     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61976   fi
61977 
61978 
61979   windows_path="$new_path"
61980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61981     unix_path=`$CYGPATH -u "$windows_path"`
61982     new_path="$unix_path"
61983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61984     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61985     new_path="$unix_path"
61986   fi
61987 
61988   if test "x$path" != "x$new_path"; then
61989     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61990     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61991 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61992   fi
61993 
61994   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61995   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61996 
61997     else
61998       # We're on a unix platform. Hooray! :)
61999       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62000       has_space=`$ECHO "$path" | $GREP " "`
62001       if test "x$has_space" != x; then
62002         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62003 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62004         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62005       fi
62006 
62007       # Use eval to expand a potential ~
62008       eval path="$path"
62009       if test ! -f "$path" && test ! -d "$path"; then
62010         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62011       fi
62012 
62013       if test -d "$path"; then
62014         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62015       else
62016         dir="`$DIRNAME "$path"`"
62017         base="`$BASENAME "$path"`"
62018         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62019       fi
62020     fi
62021   fi
62022 
62023 
62024   # Only process if variable expands to non-empty
62025 
62026   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62027     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62028 
62029   # Input might be given as Windows format, start by converting to
62030   # unix format.
62031   path="$POTENTIAL_FREETYPE_LIB_PATH"
62032   new_path=`$CYGPATH -u "$path"`
62033 
62034   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62035   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62036   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62037   # "foo.exe" is OK but "foo" is an error.
62038   #
62039   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62040   # It is also a way to make sure we got the proper file name for the real test later on.
62041   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62042   if test "x$test_shortpath" = x; then
62043     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62044 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62045     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62046   fi
62047 
62048   # Call helper function which possibly converts this using DOS-style short mode.
62049   # If so, the updated path is stored in $new_path.
62050 
62051   input_path="$new_path"
62052   # Check if we need to convert this using DOS-style short mode. If the path
62053   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62054   # take no chances and rewrite it.
62055   # Note: m4 eats our [], so we need to use [ and ] instead.
62056   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62057   if test "x$has_forbidden_chars" != x; then
62058     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62059     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62060     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62061     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62062       # Going to short mode and back again did indeed matter. Since short mode is
62063       # case insensitive, let's make it lowercase to improve readability.
62064       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62065       # Now convert it back to Unix-style (cygpath)
62066       input_path=`$CYGPATH -u "$shortmode_path"`
62067       new_path="$input_path"
62068     fi
62069   fi
62070 
62071   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62072   if test "x$test_cygdrive_prefix" = x; then
62073     # As a simple fix, exclude /usr/bin since it's not a real path.
62074     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62075       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62076       # a path prefixed by /cygdrive for fixpath to work.
62077       new_path="$CYGWIN_ROOT_PATH$input_path"
62078     fi
62079   fi
62080 
62081 
62082   if test "x$path" != "x$new_path"; then
62083     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62084     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62085 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62086   fi
62087 
62088     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62089 
62090   path="$POTENTIAL_FREETYPE_LIB_PATH"
62091   has_colon=`$ECHO $path | $GREP ^.:`
62092   new_path="$path"
62093   if test "x$has_colon" = x; then
62094     # Not in mixed or Windows style, start by that.
62095     new_path=`cmd //c echo $path`
62096   fi
62097 
62098 
62099   input_path="$new_path"
62100   # Check if we need to convert this using DOS-style short mode. If the path
62101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62102   # take no chances and rewrite it.
62103   # Note: m4 eats our [], so we need to use [ and ] instead.
62104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62105   if test "x$has_forbidden_chars" != x; then
62106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62107     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62108   fi
62109 
62110 
62111   windows_path="$new_path"
62112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62113     unix_path=`$CYGPATH -u "$windows_path"`
62114     new_path="$unix_path"
62115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62116     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62117     new_path="$unix_path"
62118   fi
62119 
62120   if test "x$path" != "x$new_path"; then
62121     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62122     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62123 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62124   fi
62125 
62126   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62127   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62128 
62129     else
62130       # We're on a unix platform. Hooray! :)
62131       path="$POTENTIAL_FREETYPE_LIB_PATH"
62132       has_space=`$ECHO "$path" | $GREP " "`
62133       if test "x$has_space" != x; then
62134         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62135 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62136         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62137       fi
62138 
62139       # Use eval to expand a potential ~
62140       eval path="$path"
62141       if test ! -f "$path" && test ! -d "$path"; then
62142         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62143       fi
62144 
62145       if test -d "$path"; then
62146         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62147       else
62148         dir="`$DIRNAME "$path"`"
62149         base="`$BASENAME "$path"`"
62150         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62151       fi
62152     fi
62153   fi
62154 
62155 
62156     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62158 $as_echo_n "checking for freetype includes... " >&6; }
62159     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62160 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62161     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62162     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62163 $as_echo_n "checking for freetype libraries... " >&6; }
62164     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62165 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62166   fi
62167 
62168               fi
62169             fi
62170           fi
62171         fi
62172       fi # end check in well-known locations
62173 
62174       if test "x$FOUND_FREETYPE" != xyes; then
62175 
62176   # Print a helpful message on how to acquire the necessary build dependency.
62177   # freetype is the help tag: freetype, cups, alsa etc
62178   MISSING_DEPENDENCY=freetype
62179 
62180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62181     cygwin_help $MISSING_DEPENDENCY
62182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62183     msys_help $MISSING_DEPENDENCY
62184   else
62185     PKGHANDLER_COMMAND=
62186 
62187     case $PKGHANDLER in
62188       apt-get)
62189         apt_help     $MISSING_DEPENDENCY ;;
62190       yum)
62191         yum_help     $MISSING_DEPENDENCY ;;
62192       port)
62193         port_help    $MISSING_DEPENDENCY ;;
62194       pkgutil)
62195         pkgutil_help $MISSING_DEPENDENCY ;;
62196       pkgadd)
62197         pkgadd_help  $MISSING_DEPENDENCY ;;
62198     esac
62199 
62200     if test "x$PKGHANDLER_COMMAND" != x; then
62201       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62202     fi
62203   fi
62204 
62205         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62206       fi
62207     fi # end user specified settings
62208 
62209     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62210     if test "x$FREETYPE_CFLAGS" = x; then
62211 
62212   # Only process if variable expands to non-empty
62213 
62214   if test "x$FREETYPE_INCLUDE_PATH" != x; then
62215     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62216 
62217   # Input might be given as Windows format, start by converting to
62218   # unix format.
62219   path="$FREETYPE_INCLUDE_PATH"
62220   new_path=`$CYGPATH -u "$path"`
62221 
62222   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62223   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62224   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62225   # "foo.exe" is OK but "foo" is an error.
62226   #
62227   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62228   # It is also a way to make sure we got the proper file name for the real test later on.
62229   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62230   if test "x$test_shortpath" = x; then
62231     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62232 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62233     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62234   fi
62235 
62236   # Call helper function which possibly converts this using DOS-style short mode.
62237   # If so, the updated path is stored in $new_path.
62238 
62239   input_path="$new_path"
62240   # Check if we need to convert this using DOS-style short mode. If the path
62241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62242   # take no chances and rewrite it.
62243   # Note: m4 eats our [], so we need to use [ and ] instead.
62244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62245   if test "x$has_forbidden_chars" != x; then
62246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62247     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62248     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62249     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62250       # Going to short mode and back again did indeed matter. Since short mode is
62251       # case insensitive, let's make it lowercase to improve readability.
62252       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62253       # Now convert it back to Unix-style (cygpath)
62254       input_path=`$CYGPATH -u "$shortmode_path"`
62255       new_path="$input_path"
62256     fi
62257   fi
62258 
62259   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62260   if test "x$test_cygdrive_prefix" = x; then
62261     # As a simple fix, exclude /usr/bin since it's not a real path.
62262     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62263       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62264       # a path prefixed by /cygdrive for fixpath to work.
62265       new_path="$CYGWIN_ROOT_PATH$input_path"
62266     fi
62267   fi
62268 
62269 
62270   if test "x$path" != "x$new_path"; then
62271     FREETYPE_INCLUDE_PATH="$new_path"
62272     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62273 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62274   fi
62275 
62276     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62277 
62278   path="$FREETYPE_INCLUDE_PATH"
62279   has_colon=`$ECHO $path | $GREP ^.:`
62280   new_path="$path"
62281   if test "x$has_colon" = x; then
62282     # Not in mixed or Windows style, start by that.
62283     new_path=`cmd //c echo $path`
62284   fi
62285 
62286 
62287   input_path="$new_path"
62288   # Check if we need to convert this using DOS-style short mode. If the path
62289   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62290   # take no chances and rewrite it.
62291   # Note: m4 eats our [], so we need to use [ and ] instead.
62292   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62293   if test "x$has_forbidden_chars" != x; then
62294     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62295     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62296   fi
62297 
62298 
62299   windows_path="$new_path"
62300   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62301     unix_path=`$CYGPATH -u "$windows_path"`
62302     new_path="$unix_path"
62303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62304     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62305     new_path="$unix_path"
62306   fi
62307 
62308   if test "x$path" != "x$new_path"; then
62309     FREETYPE_INCLUDE_PATH="$new_path"
62310     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62311 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62312   fi
62313 
62314   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62315   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62316 
62317     else
62318       # We're on a unix platform. Hooray! :)
62319       path="$FREETYPE_INCLUDE_PATH"
62320       has_space=`$ECHO "$path" | $GREP " "`
62321       if test "x$has_space" != x; then
62322         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62323 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62324         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62325       fi
62326 
62327       # Use eval to expand a potential ~
62328       eval path="$path"
62329       if test ! -f "$path" && test ! -d "$path"; then
62330         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62331       fi
62332 
62333       if test -d "$path"; then
62334         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62335       else
62336         dir="`$DIRNAME "$path"`"
62337         base="`$BASENAME "$path"`"
62338         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62339       fi
62340     fi
62341   fi
62342 
62343       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62344         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62345       else
62346         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62347       fi
62348     fi
62349 
62350     if test "x$FREETYPE_LIBS" = x; then
62351 
62352   # Only process if variable expands to non-empty
62353 
62354   if test "x$FREETYPE_LIB_PATH" != x; then
62355     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62356 
62357   # Input might be given as Windows format, start by converting to
62358   # unix format.
62359   path="$FREETYPE_LIB_PATH"
62360   new_path=`$CYGPATH -u "$path"`
62361 
62362   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62363   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62364   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62365   # "foo.exe" is OK but "foo" is an error.
62366   #
62367   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62368   # It is also a way to make sure we got the proper file name for the real test later on.
62369   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62370   if test "x$test_shortpath" = x; then
62371     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62372 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62373     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62374   fi
62375 
62376   # Call helper function which possibly converts this using DOS-style short mode.
62377   # If so, the updated path is stored in $new_path.
62378 
62379   input_path="$new_path"
62380   # Check if we need to convert this using DOS-style short mode. If the path
62381   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62382   # take no chances and rewrite it.
62383   # Note: m4 eats our [], so we need to use [ and ] instead.
62384   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62385   if test "x$has_forbidden_chars" != x; then
62386     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62387     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62388     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62389     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62390       # Going to short mode and back again did indeed matter. Since short mode is
62391       # case insensitive, let's make it lowercase to improve readability.
62392       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62393       # Now convert it back to Unix-style (cygpath)
62394       input_path=`$CYGPATH -u "$shortmode_path"`
62395       new_path="$input_path"
62396     fi
62397   fi
62398 
62399   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62400   if test "x$test_cygdrive_prefix" = x; then
62401     # As a simple fix, exclude /usr/bin since it's not a real path.
62402     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62403       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62404       # a path prefixed by /cygdrive for fixpath to work.
62405       new_path="$CYGWIN_ROOT_PATH$input_path"
62406     fi
62407   fi
62408 
62409 
62410   if test "x$path" != "x$new_path"; then
62411     FREETYPE_LIB_PATH="$new_path"
62412     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62413 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62414   fi
62415 
62416     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62417 
62418   path="$FREETYPE_LIB_PATH"
62419   has_colon=`$ECHO $path | $GREP ^.:`
62420   new_path="$path"
62421   if test "x$has_colon" = x; then
62422     # Not in mixed or Windows style, start by that.
62423     new_path=`cmd //c echo $path`
62424   fi
62425 
62426 
62427   input_path="$new_path"
62428   # Check if we need to convert this using DOS-style short mode. If the path
62429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62430   # take no chances and rewrite it.
62431   # Note: m4 eats our [], so we need to use [ and ] instead.
62432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62433   if test "x$has_forbidden_chars" != x; then
62434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62435     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62436   fi
62437 
62438 
62439   windows_path="$new_path"
62440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62441     unix_path=`$CYGPATH -u "$windows_path"`
62442     new_path="$unix_path"
62443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62445     new_path="$unix_path"
62446   fi
62447 
62448   if test "x$path" != "x$new_path"; then
62449     FREETYPE_LIB_PATH="$new_path"
62450     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62451 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62452   fi
62453 
62454   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62455   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62456 
62457     else
62458       # We're on a unix platform. Hooray! :)
62459       path="$FREETYPE_LIB_PATH"
62460       has_space=`$ECHO "$path" | $GREP " "`
62461       if test "x$has_space" != x; then
62462         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62463 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62464         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62465       fi
62466 
62467       # Use eval to expand a potential ~
62468       eval path="$path"
62469       if test ! -f "$path" && test ! -d "$path"; then
62470         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62471       fi
62472 
62473       if test -d "$path"; then
62474         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62475       else
62476         dir="`$DIRNAME "$path"`"
62477         base="`$BASENAME "$path"`"
62478         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62479       fi
62480     fi
62481   fi
62482 
62483       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62484         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62485       else
62486         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62487       fi
62488     fi
62489 
62490     # Try to compile it
62491     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62492 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
62493     ac_ext=cpp
62494 ac_cpp='$CXXCPP $CPPFLAGS'
62495 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62496 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62497 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62498 
62499     PREV_CXXCFLAGS="$CXXFLAGS"
62500     PREV_LIBS="$LIBS"
62501     PREV_CXX="$CXX"
62502     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62503     LIBS="$LIBS $FREETYPE_LIBS"
62504     CXX="$FIXPATH $CXX"
62505     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62506 /* end confdefs.h.  */
62507 
62508           #include<ft2build.h>
62509           #include FT_FREETYPE_H
62510           int main () {
62511             FT_Init_FreeType(NULL);
62512             return 0;
62513           }
62514 
62515 _ACEOF
62516 if ac_fn_cxx_try_link "$LINENO"; then :
62517 
62518           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62519 $as_echo "yes" >&6; }
62520 
62521 else
62522 
62523           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62524 $as_echo "no" >&6; }
62525           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62526 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62527           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62528 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62529 
62530 
62531   # Print a helpful message on how to acquire the necessary build dependency.
62532   # freetype is the help tag: freetype, cups, alsa etc
62533   MISSING_DEPENDENCY=freetype
62534 
62535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62536     cygwin_help $MISSING_DEPENDENCY
62537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62538     msys_help $MISSING_DEPENDENCY
62539   else
62540     PKGHANDLER_COMMAND=
62541 
62542     case $PKGHANDLER in
62543       apt-get)
62544         apt_help     $MISSING_DEPENDENCY ;;
62545       yum)
62546         yum_help     $MISSING_DEPENDENCY ;;
62547       port)
62548         port_help    $MISSING_DEPENDENCY ;;
62549       pkgutil)
62550         pkgutil_help $MISSING_DEPENDENCY ;;
62551       pkgadd)
62552         pkgadd_help  $MISSING_DEPENDENCY ;;
62553     esac
62554 
62555     if test "x$PKGHANDLER_COMMAND" != x; then
62556       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62557     fi
62558   fi
62559 
62560 
62561           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62562 
62563 
62564 fi
62565 rm -f core conftest.err conftest.$ac_objext \
62566     conftest$ac_exeext conftest.$ac_ext
62567     CXXCFLAGS="$PREV_CXXFLAGS"
62568     LIBS="$PREV_LIBS"
62569     CXX="$PREV_CXX"
62570     ac_ext=cpp
62571 ac_cpp='$CXXCPP $CPPFLAGS'
62572 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62573 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62574 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62575 
62576 
62577     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62578 $as_echo_n "checking if we should bundle freetype... " >&6; }
62579     if test "x$BUNDLE_FREETYPE" = xyes; then
62580       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62581     fi
62582     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62583 $as_echo "$BUNDLE_FREETYPE" >&6; }
62584 
62585   fi # end freetype needed
62586 
62587 
62588 
62589 
62590 
62591 
62592 
62593 # Check whether --with-alsa was given.
62594 if test "${with_alsa+set}" = set; then :
62595   withval=$with_alsa;
62596 fi
62597 
62598 
62599 # Check whether --with-alsa-include was given.
62600 if test "${with_alsa_include+set}" = set; then :
62601   withval=$with_alsa_include;
62602 fi
62603 
62604 
62605 # Check whether --with-alsa-lib was given.
62606 if test "${with_alsa_lib+set}" = set; then :
62607   withval=$with_alsa_lib;
62608 fi
62609 
62610 
62611   if test "x$NEEDS_LIB_ALSA" = xfalse; then
62612     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62613         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62614         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62615       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62616 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62617     fi
62618     ALSA_CFLAGS=
62619     ALSA_LIBS=
62620   else
62621     ALSA_FOUND=no
62622 
62623     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62624       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62625     fi
62626 
62627     if test "x${with_alsa}" != x; then
62628       ALSA_LIBS="-L${with_alsa}/lib -lasound"
62629       ALSA_CFLAGS="-I${with_alsa}/include"
62630       ALSA_FOUND=yes
62631     fi
62632     if test "x${with_alsa_include}" != x; then
62633       ALSA_CFLAGS="-I${with_alsa_include}"
62634       ALSA_FOUND=yes
62635     fi
62636     if test "x${with_alsa_lib}" != x; then
62637       ALSA_LIBS="-L${with_alsa_lib} -lasound"
62638       ALSA_FOUND=yes
62639     fi
62640     # Do not try pkg-config if we have a sysroot set.
62641     if test "x$SYSROOT" = x; then
62642       if test "x$ALSA_FOUND" = xno; then
62643 
62644 pkg_failed=no
62645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62646 $as_echo_n "checking for ALSA... " >&6; }
62647 
62648 if test -n "$ALSA_CFLAGS"; then
62649     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62650  elif test -n "$PKG_CONFIG"; then
62651     if test -n "$PKG_CONFIG" && \
62652     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62653   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62654   ac_status=$?
62655   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62656   test $ac_status = 0; }; then
62657   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62658 else
62659   pkg_failed=yes
62660 fi
62661  else
62662     pkg_failed=untried
62663 fi
62664 if test -n "$ALSA_LIBS"; then
62665     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62666  elif test -n "$PKG_CONFIG"; then
62667     if test -n "$PKG_CONFIG" && \
62668     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62669   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62670   ac_status=$?
62671   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62672   test $ac_status = 0; }; then
62673   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62674 else
62675   pkg_failed=yes
62676 fi
62677  else
62678     pkg_failed=untried
62679 fi
62680 
62681 
62682 
62683 if test $pkg_failed = yes; then
62684 
62685 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62686         _pkg_short_errors_supported=yes
62687 else
62688         _pkg_short_errors_supported=no
62689 fi
62690         if test $_pkg_short_errors_supported = yes; then
62691                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62692         else
62693                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62694         fi
62695         # Put the nasty error message in config.log where it belongs
62696         echo "$ALSA_PKG_ERRORS" >&5
62697 
62698         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62699 $as_echo "no" >&6; }
62700                 ALSA_FOUND=no
62701 elif test $pkg_failed = untried; then
62702         ALSA_FOUND=no
62703 else
62704         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62705         ALSA_LIBS=$pkg_cv_ALSA_LIBS
62706         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62707 $as_echo "yes" >&6; }
62708         ALSA_FOUND=yes
62709 fi
62710       fi
62711     fi
62712     if test "x$ALSA_FOUND" = xno; then
62713       for ac_header in alsa/asoundlib.h
62714 do :
62715   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62716 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62717   cat >>confdefs.h <<_ACEOF
62718 #define HAVE_ALSA_ASOUNDLIB_H 1
62719 _ACEOF
62720 
62721             ALSA_FOUND=yes
62722             ALSA_CFLAGS=-Iignoreme
62723             ALSA_LIBS=-lasound
62724             DEFAULT_ALSA=yes
62725 
62726 else
62727   ALSA_FOUND=no
62728 
62729 fi
62730 
62731 done
62732 
62733     fi
62734     if test "x$ALSA_FOUND" = xno; then
62735 
62736   # Print a helpful message on how to acquire the necessary build dependency.
62737   # alsa is the help tag: freetype, cups, alsa etc
62738   MISSING_DEPENDENCY=alsa
62739 
62740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62741     cygwin_help $MISSING_DEPENDENCY
62742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62743     msys_help $MISSING_DEPENDENCY
62744   else
62745     PKGHANDLER_COMMAND=
62746 
62747     case $PKGHANDLER in
62748       apt-get)
62749         apt_help     $MISSING_DEPENDENCY ;;
62750       yum)
62751         yum_help     $MISSING_DEPENDENCY ;;
62752       port)
62753         port_help    $MISSING_DEPENDENCY ;;
62754       pkgutil)
62755         pkgutil_help $MISSING_DEPENDENCY ;;
62756       pkgadd)
62757         pkgadd_help  $MISSING_DEPENDENCY ;;
62758     esac
62759 
62760     if test "x$PKGHANDLER_COMMAND" != x; then
62761       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62762     fi
62763   fi
62764 
62765       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62766     fi
62767   fi
62768 
62769 
62770 
62771 
62772 
62773 
62774 # Check whether --with-libffi was given.
62775 if test "${with_libffi+set}" = set; then :
62776   withval=$with_libffi;
62777 fi
62778 
62779 
62780 # Check whether --with-libffi-include was given.
62781 if test "${with_libffi_include+set}" = set; then :
62782   withval=$with_libffi_include;
62783 fi
62784 
62785 
62786 # Check whether --with-libffi-lib was given.
62787 if test "${with_libffi_lib+set}" = set; then :
62788   withval=$with_libffi_lib;
62789 fi
62790 
62791 
62792   if test "x$NEEDS_LIB_FFI" = xfalse; then
62793     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62794         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62795         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62796       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62797 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62798     fi
62799     LIBFFI_CFLAGS=
62800     LIBFFI_LIBS=
62801   else
62802     LIBFFI_FOUND=no
62803 
62804     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62805       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62806     fi
62807 
62808     if test "x${with_libffi}" != x; then
62809       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62810       LIBFFI_CFLAGS="-I${with_libffi}/include"
62811       LIBFFI_FOUND=yes
62812     fi
62813     if test "x${with_libffi_include}" != x; then
62814       LIBFFI_CFLAGS="-I${with_libffi_include}"
62815       LIBFFI_FOUND=yes
62816     fi
62817     if test "x${with_libffi_lib}" != x; then
62818       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62819       LIBFFI_FOUND=yes
62820     fi
62821     # Do not try pkg-config if we have a sysroot set.
62822     if test "x$SYSROOT" = x; then
62823       if test "x$LIBFFI_FOUND" = xno; then
62824         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62825 
62826 pkg_failed=no
62827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62828 $as_echo_n "checking for LIBFFI... " >&6; }
62829 
62830 if test -n "$LIBFFI_CFLAGS"; then
62831     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62832  elif test -n "$PKG_CONFIG"; then
62833     if test -n "$PKG_CONFIG" && \
62834     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62835   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62836   ac_status=$?
62837   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62838   test $ac_status = 0; }; then
62839   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62840 else
62841   pkg_failed=yes
62842 fi
62843  else
62844     pkg_failed=untried
62845 fi
62846 if test -n "$LIBFFI_LIBS"; then
62847     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62848  elif test -n "$PKG_CONFIG"; then
62849     if test -n "$PKG_CONFIG" && \
62850     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62851   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62852   ac_status=$?
62853   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62854   test $ac_status = 0; }; then
62855   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62856 else
62857   pkg_failed=yes
62858 fi
62859  else
62860     pkg_failed=untried
62861 fi
62862 
62863 
62864 
62865 if test $pkg_failed = yes; then
62866 
62867 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62868         _pkg_short_errors_supported=yes
62869 else
62870         _pkg_short_errors_supported=no
62871 fi
62872         if test $_pkg_short_errors_supported = yes; then
62873                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62874         else
62875                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62876         fi
62877         # Put the nasty error message in config.log where it belongs
62878         echo "$LIBFFI_PKG_ERRORS" >&5
62879 
62880         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62881 $as_echo "no" >&6; }
62882                 LIBFFI_FOUND=no
62883 elif test $pkg_failed = untried; then
62884         LIBFFI_FOUND=no
62885 else
62886         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62887         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62888         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62889 $as_echo "yes" >&6; }
62890         LIBFFI_FOUND=yes
62891 fi
62892       fi
62893     fi
62894     if test "x$LIBFFI_FOUND" = xno; then
62895       for ac_header in ffi.h
62896 do :
62897   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62898 if test "x$ac_cv_header_ffi_h" = xyes; then :
62899   cat >>confdefs.h <<_ACEOF
62900 #define HAVE_FFI_H 1
62901 _ACEOF
62902 
62903             LIBFFI_FOUND=yes
62904             LIBFFI_CFLAGS=
62905             LIBFFI_LIBS=-lffi
62906 
62907 else
62908   LIBFFI_FOUND=no
62909 
62910 fi
62911 
62912 done
62913 
62914     fi
62915     if test "x$LIBFFI_FOUND" = xno; then
62916 
62917   # Print a helpful message on how to acquire the necessary build dependency.
62918   # ffi is the help tag: freetype, cups, alsa etc
62919   MISSING_DEPENDENCY=ffi
62920 
62921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62922     cygwin_help $MISSING_DEPENDENCY
62923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62924     msys_help $MISSING_DEPENDENCY
62925   else
62926     PKGHANDLER_COMMAND=
62927 
62928     case $PKGHANDLER in
62929       apt-get)
62930         apt_help     $MISSING_DEPENDENCY ;;
62931       yum)
62932         yum_help     $MISSING_DEPENDENCY ;;
62933       port)
62934         port_help    $MISSING_DEPENDENCY ;;
62935       pkgutil)
62936         pkgutil_help $MISSING_DEPENDENCY ;;
62937       pkgadd)
62938         pkgadd_help  $MISSING_DEPENDENCY ;;
62939     esac
62940 
62941     if test "x$PKGHANDLER_COMMAND" != x; then
62942       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62943     fi
62944   fi
62945 
62946       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62947     fi
62948 
62949     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62950 $as_echo_n "checking if libffi works... " >&6; }
62951     ac_ext=c
62952 ac_cpp='$CPP $CPPFLAGS'
62953 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62954 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62955 ac_compiler_gnu=$ac_cv_c_compiler_gnu
62956 
62957     OLD_CFLAGS="$CFLAGS"
62958     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62959     OLD_LIBS="$LIBS"
62960     LIBS="$LIBS $LIBFFI_LIBS"
62961     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62962 /* end confdefs.h.  */
62963 #include <ffi.h>
62964 int
62965 main ()
62966 {
62967 
62968           ffi_call(NULL, NULL, NULL, NULL);
62969           return 0;
62970 
62971   ;
62972   return 0;
62973 }
62974 _ACEOF
62975 if ac_fn_c_try_link "$LINENO"; then :
62976   LIBFFI_WORKS=yes
62977 else
62978   LIBFFI_WORKS=no
62979 
62980 fi
62981 rm -f core conftest.err conftest.$ac_objext \
62982     conftest$ac_exeext conftest.$ac_ext
62983     CFLAGS="$OLD_CFLAGS"
62984     LIBS="$OLD_LIBS"
62985     ac_ext=cpp
62986 ac_cpp='$CXXCPP $CPPFLAGS'
62987 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62988 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62989 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62990 
62991     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62992 $as_echo "$LIBFFI_WORKS" >&6; }
62993 
62994     if test "x$LIBFFI_WORKS" = xno; then
62995 
62996   # Print a helpful message on how to acquire the necessary build dependency.
62997   # ffi is the help tag: freetype, cups, alsa etc
62998   MISSING_DEPENDENCY=ffi
62999 
63000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63001     cygwin_help $MISSING_DEPENDENCY
63002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63003     msys_help $MISSING_DEPENDENCY
63004   else
63005     PKGHANDLER_COMMAND=
63006 
63007     case $PKGHANDLER in
63008       apt-get)
63009         apt_help     $MISSING_DEPENDENCY ;;
63010       yum)
63011         yum_help     $MISSING_DEPENDENCY ;;
63012       port)
63013         port_help    $MISSING_DEPENDENCY ;;
63014       pkgutil)
63015         pkgutil_help $MISSING_DEPENDENCY ;;
63016       pkgadd)
63017         pkgadd_help  $MISSING_DEPENDENCY ;;
63018     esac
63019 
63020     if test "x$PKGHANDLER_COMMAND" != x; then
63021       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63022     fi
63023   fi
63024 
63025       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63026     fi
63027   fi
63028 
63029 
63030 
63031 
63032 
63033   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63034     # Extract the first word of "llvm-config", so it can be a program name with args.
63035 set dummy llvm-config; ac_word=$2
63036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63037 $as_echo_n "checking for $ac_word... " >&6; }
63038 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63039   $as_echo_n "(cached) " >&6
63040 else
63041   if test -n "$LLVM_CONFIG"; then
63042   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63043 else
63044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63045 for as_dir in $PATH
63046 do
63047   IFS=$as_save_IFS
63048   test -z "$as_dir" && as_dir=.
63049     for ac_exec_ext in '' $ac_executable_extensions; do
63050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63051     ac_cv_prog_LLVM_CONFIG="llvm-config"
63052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63053     break 2
63054   fi
63055 done
63056   done
63057 IFS=$as_save_IFS
63058 
63059 fi
63060 fi
63061 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63062 if test -n "$LLVM_CONFIG"; then
63063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63064 $as_echo "$LLVM_CONFIG" >&6; }
63065 else
63066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63067 $as_echo "no" >&6; }
63068 fi
63069 
63070 
63071 
63072     if test "x$LLVM_CONFIG" != xllvm-config; then
63073       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63074     fi
63075 
63076     llvm_components="jit mcjit engine nativecodegen native"
63077     unset LLVM_CFLAGS
63078     for flag in $("$LLVM_CONFIG" --cxxflags); do
63079       if echo "${flag}" | grep -q '^-[ID]'; then
63080         if test "${flag}" != "-D_DEBUG" ; then
63081           if test "${LLVM_CFLAGS}" != "" ; then
63082             LLVM_CFLAGS="${LLVM_CFLAGS} "
63083           fi
63084           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63085         fi
63086       fi
63087     done
63088     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63089     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63090 
63091     unset LLVM_LDFLAGS
63092     for flag in $("${LLVM_CONFIG}" --ldflags); do
63093       if echo "${flag}" | grep -q '^-L'; then
63094         if test "${LLVM_LDFLAGS}" != ""; then
63095           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63096         fi
63097         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63098       fi
63099     done
63100 
63101     unset LLVM_LIBS
63102     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63103       if echo "${flag}" | grep -q '^-l'; then
63104         if test "${LLVM_LIBS}" != ""; then
63105           LLVM_LIBS="${LLVM_LIBS} "
63106         fi
63107         LLVM_LIBS="${LLVM_LIBS}${flag}"
63108       fi
63109     done
63110 
63111     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63112     # always properly detect -ltinfo
63113     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63114 
63115 
63116 
63117 
63118   fi
63119 
63120 
63121 
63122 # Check whether --with-libjpeg was given.
63123 if test "${with_libjpeg+set}" = set; then :
63124   withval=$with_libjpeg;
63125 fi
63126 
63127 
63128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63129 $as_echo_n "checking for which libjpeg to use... " >&6; }
63130   # default is bundled
63131   DEFAULT_LIBJPEG=bundled
63132   # if user didn't specify, use DEFAULT_LIBJPEG
63133   if test "x${with_libjpeg}" = "x"; then
63134     with_libjpeg=${DEFAULT_LIBJPEG}
63135   fi
63136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63137 $as_echo "${with_libjpeg}" >&6; }
63138 
63139   if test "x${with_libjpeg}" = "xbundled"; then
63140     USE_EXTERNAL_LIBJPEG=false
63141   elif test "x${with_libjpeg}" = "xsystem"; then
63142     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63143 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63144 
63145 else
63146    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63147 fi
63148 
63149 
63150     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63151 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63152 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63153   $as_echo_n "(cached) " >&6
63154 else
63155   ac_check_lib_save_LIBS=$LIBS
63156 LIBS="-ljpeg  $LIBS"
63157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63158 /* end confdefs.h.  */
63159 
63160 /* Override any GCC internal prototype to avoid an error.
63161    Use char because int might match the return type of a GCC
63162    builtin and then its argument prototype would still apply.  */
63163 #ifdef __cplusplus
63164 extern "C"
63165 #endif
63166 char jpeg_CreateDecompress ();
63167 int
63168 main ()
63169 {
63170 return jpeg_CreateDecompress ();
63171   ;
63172   return 0;
63173 }
63174 _ACEOF
63175 if ac_fn_cxx_try_link "$LINENO"; then :
63176   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63177 else
63178   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63179 fi
63180 rm -f core conftest.err conftest.$ac_objext \
63181     conftest$ac_exeext conftest.$ac_ext
63182 LIBS=$ac_check_lib_save_LIBS
63183 fi
63184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63185 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63186 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63187   cat >>confdefs.h <<_ACEOF
63188 #define HAVE_LIBJPEG 1
63189 _ACEOF
63190 
63191   LIBS="-ljpeg $LIBS"
63192 
63193 else
63194    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63195 fi
63196 
63197 
63198     USE_EXTERNAL_LIBJPEG=true
63199   else
63200     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63201   fi
63202 
63203 
63204 
63205 
63206 
63207 # Check whether --with-giflib was given.
63208 if test "${with_giflib+set}" = set; then :
63209   withval=$with_giflib;
63210 fi
63211 
63212 
63213   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63214 $as_echo_n "checking for which giflib to use... " >&6; }
63215   # default is bundled
63216   DEFAULT_GIFLIB=bundled
63217   # if user didn't specify, use DEFAULT_GIFLIB
63218   if test "x${with_giflib}" = "x"; then
63219     with_giflib=${DEFAULT_GIFLIB}
63220   fi
63221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63222 $as_echo "${with_giflib}" >&6; }
63223 
63224   if test "x${with_giflib}" = "xbundled"; then
63225     USE_EXTERNAL_LIBGIF=false
63226   elif test "x${with_giflib}" = "xsystem"; then
63227     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63228 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63229 
63230 else
63231    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63232 fi
63233 
63234 
63235     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63236 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63237 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63238   $as_echo_n "(cached) " >&6
63239 else
63240   ac_check_lib_save_LIBS=$LIBS
63241 LIBS="-lgif  $LIBS"
63242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63243 /* end confdefs.h.  */
63244 
63245 /* Override any GCC internal prototype to avoid an error.
63246    Use char because int might match the return type of a GCC
63247    builtin and then its argument prototype would still apply.  */
63248 #ifdef __cplusplus
63249 extern "C"
63250 #endif
63251 char DGifGetCode ();
63252 int
63253 main ()
63254 {
63255 return DGifGetCode ();
63256   ;
63257   return 0;
63258 }
63259 _ACEOF
63260 if ac_fn_cxx_try_link "$LINENO"; then :
63261   ac_cv_lib_gif_DGifGetCode=yes
63262 else
63263   ac_cv_lib_gif_DGifGetCode=no
63264 fi
63265 rm -f core conftest.err conftest.$ac_objext \
63266     conftest$ac_exeext conftest.$ac_ext
63267 LIBS=$ac_check_lib_save_LIBS
63268 fi
63269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63270 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63271 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63272   cat >>confdefs.h <<_ACEOF
63273 #define HAVE_LIBGIF 1
63274 _ACEOF
63275 
63276   LIBS="-lgif $LIBS"
63277 
63278 else
63279    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63280 fi
63281 
63282 
63283     USE_EXTERNAL_LIBGIF=true
63284   else
63285     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63286   fi
63287 
63288 
63289 
63290 
63291 
63292 # Check whether --with-libpng was given.
63293 if test "${with_libpng+set}" = set; then :
63294   withval=$with_libpng;
63295 fi
63296 
63297 
63298   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63299 $as_echo_n "checking for which libpng to use... " >&6; }
63300 
63301   # default is bundled
63302   DEFAULT_LIBPNG=bundled
63303   # if user didn't specify, use DEFAULT_LIBPNG
63304   if test "x${with_libpng}" = "x"; then
63305       with_libpng=${DEFAULT_LIBPNG}
63306   fi
63307 
63308   if test "x${with_libpng}" = "xbundled"; then
63309       USE_EXTERNAL_LIBPNG=false
63310       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63311 $as_echo "bundled" >&6; }
63312   elif test "x${with_libpng}" = "xsystem"; then
63313 
63314 pkg_failed=no
63315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63316 $as_echo_n "checking for PNG... " >&6; }
63317 
63318 if test -n "$PNG_CFLAGS"; then
63319     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63320  elif test -n "$PKG_CONFIG"; then
63321     if test -n "$PKG_CONFIG" && \
63322     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63323   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63324   ac_status=$?
63325   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63326   test $ac_status = 0; }; then
63327   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63328 else
63329   pkg_failed=yes
63330 fi
63331  else
63332     pkg_failed=untried
63333 fi
63334 if test -n "$PNG_LIBS"; then
63335     pkg_cv_PNG_LIBS="$PNG_LIBS"
63336  elif test -n "$PKG_CONFIG"; then
63337     if test -n "$PKG_CONFIG" && \
63338     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63339   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63340   ac_status=$?
63341   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63342   test $ac_status = 0; }; then
63343   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63344 else
63345   pkg_failed=yes
63346 fi
63347  else
63348     pkg_failed=untried
63349 fi
63350 
63351 
63352 
63353 if test $pkg_failed = yes; then
63354 
63355 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63356         _pkg_short_errors_supported=yes
63357 else
63358         _pkg_short_errors_supported=no
63359 fi
63360         if test $_pkg_short_errors_supported = yes; then
63361                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63362         else
63363                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63364         fi
63365         # Put the nasty error message in config.log where it belongs
63366         echo "$PNG_PKG_ERRORS" >&5
63367 
63368         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63369 $as_echo "no" >&6; }
63370                  LIBPNG_FOUND=no
63371 elif test $pkg_failed = untried; then
63372          LIBPNG_FOUND=no
63373 else
63374         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63375         PNG_LIBS=$pkg_cv_PNG_LIBS
63376         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63377 $as_echo "yes" >&6; }
63378          LIBPNG_FOUND=yes
63379 fi
63380       if test "x${LIBPNG_FOUND}" = "xyes"; then
63381           USE_EXTERNAL_LIBPNG=true
63382           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63383 $as_echo "system" >&6; }
63384       else
63385           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63386 $as_echo "system not found" >&6; }
63387           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63388       fi
63389   else
63390       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63391   fi
63392 
63393 
63394 
63395 
63396 
63397 # Check whether --with-zlib was given.
63398 if test "${with_zlib+set}" = set; then :
63399   withval=$with_zlib;
63400 fi
63401 
63402 
63403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63404 $as_echo_n "checking for compress in -lz... " >&6; }
63405 if ${ac_cv_lib_z_compress+:} false; then :
63406   $as_echo_n "(cached) " >&6
63407 else
63408   ac_check_lib_save_LIBS=$LIBS
63409 LIBS="-lz  $LIBS"
63410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63411 /* end confdefs.h.  */
63412 
63413 /* Override any GCC internal prototype to avoid an error.
63414    Use char because int might match the return type of a GCC
63415    builtin and then its argument prototype would still apply.  */
63416 #ifdef __cplusplus
63417 extern "C"
63418 #endif
63419 char compress ();
63420 int
63421 main ()
63422 {
63423 return compress ();
63424   ;
63425   return 0;
63426 }
63427 _ACEOF
63428 if ac_fn_cxx_try_link "$LINENO"; then :
63429   ac_cv_lib_z_compress=yes
63430 else
63431   ac_cv_lib_z_compress=no
63432 fi
63433 rm -f core conftest.err conftest.$ac_objext \
63434     conftest$ac_exeext conftest.$ac_ext
63435 LIBS=$ac_check_lib_save_LIBS
63436 fi
63437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63438 $as_echo "$ac_cv_lib_z_compress" >&6; }
63439 if test "x$ac_cv_lib_z_compress" = xyes; then :
63440    ZLIB_FOUND=yes
63441 else
63442    ZLIB_FOUND=no
63443 fi
63444 
63445 
63446   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63447 $as_echo_n "checking for which zlib to use... " >&6; }
63448 
63449   DEFAULT_ZLIB=system
63450   if test "x$OPENJDK_TARGET_OS" = xwindows; then
63451     # On windows default is bundled...on others default is system
63452     DEFAULT_ZLIB=bundled
63453   fi
63454 
63455   if test "x${ZLIB_FOUND}" != "xyes"; then
63456     # If we don't find any system...set default to bundled
63457     DEFAULT_ZLIB=bundled
63458   fi
63459 
63460   # If user didn't specify, use DEFAULT_ZLIB
63461   if test "x${with_zlib}" = "x"; then
63462     with_zlib=${DEFAULT_ZLIB}
63463   fi
63464 
63465   if test "x${with_zlib}" = "xbundled"; then
63466     USE_EXTERNAL_LIBZ=false
63467     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63468 $as_echo "bundled" >&6; }
63469   elif test "x${with_zlib}" = "xsystem"; then
63470     if test "x${ZLIB_FOUND}" = "xyes"; then
63471       USE_EXTERNAL_LIBZ=true
63472       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63473 $as_echo "system" >&6; }
63474     else
63475       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63476 $as_echo "system not found" >&6; }
63477       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63478     fi
63479   else
63480     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63481   fi
63482 
63483 
63484 
63485 
63486 
63487 # Check whether --with-lcms was given.
63488 if test "${with_lcms+set}" = set; then :
63489   withval=$with_lcms;
63490 fi
63491 
63492 
63493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63494 $as_echo_n "checking for which lcms to use... " >&6; }
63495 
63496   DEFAULT_LCMS=bundled
63497   # If user didn't specify, use DEFAULT_LCMS
63498   if test "x${with_lcms}" = "x"; then
63499       with_lcms=${DEFAULT_LCMS}
63500   fi
63501 
63502   if test "x${with_lcms}" = "xbundled"; then
63503     USE_EXTERNAL_LCMS=false
63504     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63505 $as_echo "bundled" >&6; }
63506   elif test "x${with_lcms}" = "xsystem"; then
63507     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63508 $as_echo "system" >&6; }
63509 
63510 pkg_failed=no
63511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63512 $as_echo_n "checking for LCMS... " >&6; }
63513 
63514 if test -n "$LCMS_CFLAGS"; then
63515     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63516  elif test -n "$PKG_CONFIG"; then
63517     if test -n "$PKG_CONFIG" && \
63518     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63519   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63520   ac_status=$?
63521   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63522   test $ac_status = 0; }; then
63523   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63524 else
63525   pkg_failed=yes
63526 fi
63527  else
63528     pkg_failed=untried
63529 fi
63530 if test -n "$LCMS_LIBS"; then
63531     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63532  elif test -n "$PKG_CONFIG"; then
63533     if test -n "$PKG_CONFIG" && \
63534     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63535   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63536   ac_status=$?
63537   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63538   test $ac_status = 0; }; then
63539   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63540 else
63541   pkg_failed=yes
63542 fi
63543  else
63544     pkg_failed=untried
63545 fi
63546 
63547 
63548 
63549 if test $pkg_failed = yes; then
63550 
63551 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63552         _pkg_short_errors_supported=yes
63553 else
63554         _pkg_short_errors_supported=no
63555 fi
63556         if test $_pkg_short_errors_supported = yes; then
63557                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63558         else
63559                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63560         fi
63561         # Put the nasty error message in config.log where it belongs
63562         echo "$LCMS_PKG_ERRORS" >&5
63563 
63564         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63565 $as_echo "no" >&6; }
63566                 LCMS_FOUND=no
63567 elif test $pkg_failed = untried; then
63568         LCMS_FOUND=no
63569 else
63570         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63571         LCMS_LIBS=$pkg_cv_LCMS_LIBS
63572         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63573 $as_echo "yes" >&6; }
63574         LCMS_FOUND=yes
63575 fi
63576     if test "x${LCMS_FOUND}" = "xyes"; then
63577       USE_EXTERNAL_LCMS=true
63578     else
63579       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63580     fi
63581   else
63582     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63583   fi
63584 
63585 
63586 
63587 
63588 
63589 
63590 
63591 
63592 
63593 
63594 
63595   # Setup libm (the maths library)
63596   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63597     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63598 $as_echo_n "checking for cos in -lm... " >&6; }
63599 if ${ac_cv_lib_m_cos+:} false; then :
63600   $as_echo_n "(cached) " >&6
63601 else
63602   ac_check_lib_save_LIBS=$LIBS
63603 LIBS="-lm  $LIBS"
63604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63605 /* end confdefs.h.  */
63606 
63607 /* Override any GCC internal prototype to avoid an error.
63608    Use char because int might match the return type of a GCC
63609    builtin and then its argument prototype would still apply.  */
63610 #ifdef __cplusplus
63611 extern "C"
63612 #endif
63613 char cos ();
63614 int
63615 main ()
63616 {
63617 return cos ();
63618   ;
63619   return 0;
63620 }
63621 _ACEOF
63622 if ac_fn_cxx_try_link "$LINENO"; then :
63623   ac_cv_lib_m_cos=yes
63624 else
63625   ac_cv_lib_m_cos=no
63626 fi
63627 rm -f core conftest.err conftest.$ac_objext \
63628     conftest$ac_exeext conftest.$ac_ext
63629 LIBS=$ac_check_lib_save_LIBS
63630 fi
63631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63632 $as_echo "$ac_cv_lib_m_cos" >&6; }
63633 if test "x$ac_cv_lib_m_cos" = xyes; then :
63634   cat >>confdefs.h <<_ACEOF
63635 #define HAVE_LIBM 1
63636 _ACEOF
63637 
63638   LIBS="-lm $LIBS"
63639 
63640 else
63641 
63642         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63643 $as_echo "$as_me: Maths library was not found" >&6;}
63644 
63645 fi
63646 
63647     LIBM="-lm"
63648   else
63649     LIBM=""
63650   fi
63651 
63652 
63653   # Setup libdl (for dynamic library loading)
63654   save_LIBS="$LIBS"
63655   LIBS=""
63656   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63657 $as_echo_n "checking for dlopen in -ldl... " >&6; }
63658 if ${ac_cv_lib_dl_dlopen+:} false; then :
63659   $as_echo_n "(cached) " >&6
63660 else
63661   ac_check_lib_save_LIBS=$LIBS
63662 LIBS="-ldl  $LIBS"
63663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63664 /* end confdefs.h.  */
63665 
63666 /* Override any GCC internal prototype to avoid an error.
63667    Use char because int might match the return type of a GCC
63668    builtin and then its argument prototype would still apply.  */
63669 #ifdef __cplusplus
63670 extern "C"
63671 #endif
63672 char dlopen ();
63673 int
63674 main ()
63675 {
63676 return dlopen ();
63677   ;
63678   return 0;
63679 }
63680 _ACEOF
63681 if ac_fn_cxx_try_link "$LINENO"; then :
63682   ac_cv_lib_dl_dlopen=yes
63683 else
63684   ac_cv_lib_dl_dlopen=no
63685 fi
63686 rm -f core conftest.err conftest.$ac_objext \
63687     conftest$ac_exeext conftest.$ac_ext
63688 LIBS=$ac_check_lib_save_LIBS
63689 fi
63690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63691 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63692 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63693   cat >>confdefs.h <<_ACEOF
63694 #define HAVE_LIBDL 1
63695 _ACEOF
63696 
63697   LIBS="-ldl $LIBS"
63698 
63699 fi
63700 
63701   LIBDL="$LIBS"
63702 
63703   LIBS="$save_LIBS"
63704 
63705   # Deprecated libraries, keep the flags for backwards compatibility
63706   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63707 
63708 
63709 # Check whether --with-dxsdk was given.
63710 if test "${with_dxsdk+set}" = set; then :
63711   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63712 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63713 fi
63714 
63715 
63716 
63717 
63718 # Check whether --with-dxsdk-lib was given.
63719 if test "${with_dxsdk_lib+set}" = set; then :
63720   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63721 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63722 fi
63723 
63724 
63725 
63726 
63727 # Check whether --with-dxsdk-include was given.
63728 if test "${with_dxsdk_include+set}" = set; then :
63729   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63730 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63731 fi
63732 
63733 
63734   fi
63735 
63736   # Control if libzip can use mmap. Available for purposes of overriding.
63737   LIBZIP_CAN_USE_MMAP=true
63738 
63739 
63740 
63741 
63742 
63743 
63744 
63745 
63746 
63747 
63748 
63749 
63750 
63751 
63752 ###############################################################################
63753 #
63754 # We need to do some final tweaking, when everything else is done.
63755 #
63756 ###############################################################################
63757 
63758 
63759   # Check whether --enable-new-hotspot-build was given.
63760 if test "${enable_new_hotspot_build+set}" = set; then :
63761   enableval=$enable_new_hotspot_build;
63762 fi
63763 
63764 
63765    if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
63766      USE_NEW_HOTSPOT_BUILD=true
63767    else
63768      USE_NEW_HOTSPOT_BUILD=false
63769    fi
63770 
63771 
63772   case $HOTSPOT_DEBUG_LEVEL in
63773     product )
63774       VARIANT="OPT"
63775       FASTDEBUG="false"
63776       DEBUG_CLASSFILES="false"
63777       ;;
63778     fastdebug )
63779       VARIANT="DBG"
63780       FASTDEBUG="true"
63781       DEBUG_CLASSFILES="true"
63782       ;;
63783     debug )
63784       VARIANT="DBG"
63785       FASTDEBUG="false"
63786       DEBUG_CLASSFILES="true"
63787       ;;
63788     optimized )
63789       VARIANT="OPT"
63790       FASTDEBUG="false"
63791       DEBUG_CLASSFILES="false"
63792       ;;
63793   esac
63794 
63795 
63796 
63797 
63798   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
63799     MACOSX_UNIVERSAL="true"
63800   fi
63801 
63802 
63803 
63804   # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
63805   JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
63806 
63807   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
63808   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
63809   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
63810   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
63811   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
63812   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
63813   JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
63814 
63815   #####
63816   # Generate the legacy makefile targets for hotspot.
63817   HOTSPOT_TARGET=""
63818 
63819   if test "x$JVM_VARIANT_SERVER" = xtrue; then
63820     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
63821   fi
63822 
63823   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63824     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
63825   fi
63826 
63827   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63828     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
63829   fi
63830 
63831   if test "x$JVM_VARIANT_ZERO" = xtrue; then
63832     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
63833   fi
63834 
63835   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
63836     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
63837   fi
63838 
63839   if test "x$JVM_VARIANT_CORE" = xtrue; then
63840     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
63841   fi
63842 
63843   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
63844 
63845   # On Macosx universal binaries are produced, but they only contain
63846   # 64 bit intel. This invalidates control of which jvms are built
63847   # from configure, but only server is valid anyway. Fix this
63848   # when hotspot makefiles are rewritten.
63849   if test "x$MACOSX_UNIVERSAL" = xtrue; then
63850     HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
63851   fi
63852 
63853   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
63854 
63855 
63856   # Control wether Hotspot runs Queens test after build.
63857   # Check whether --enable-hotspot-test-in-build was given.
63858 if test "${enable_hotspot_test_in_build+set}" = set; then :
63859   enableval=$enable_hotspot_test_in_build;
63860 else
63861   enable_hotspot_test_in_build=no
63862 fi
63863 
63864   if test "x$enable_hotspot_test_in_build" = "xyes"; then
63865     TEST_IN_BUILD=true
63866   else
63867     TEST_IN_BUILD=false
63868   fi
63869 
63870 
63871   if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
63872     if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63873       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63874         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
63875       fi
63876     fi
63877     if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63878       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63879         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
63880       fi
63881     fi
63882     if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
63883         as_fn_error $? "You cannot build a custom JVM using the old hotspot build system." "$LINENO" 5
63884     fi
63885   fi
63886 
63887 
63888 
63889 
63890 
63891 
63892 
63893 
63894 
63895 
63896 
63897   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63898 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63899 
63900   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63901     ENABLE_INTREE_EC=yes
63902     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63903 $as_echo "yes" >&6; }
63904   else
63905     ENABLE_INTREE_EC=no
63906     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63907 $as_echo "no" >&6; }
63908   fi
63909 
63910 
63911 
63912 
63913   # Check whether --enable-jtreg-failure-handler was given.
63914 if test "${enable_jtreg_failure_handler+set}" = set; then :
63915   enableval=$enable_jtreg_failure_handler;
63916 fi
63917 
63918 
63919   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63920 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63921 
63922   if test "x$enable_jtreg_failure_handler" = "xyes"; then
63923     if test "x$JT_HOME" = "x"; then
63924       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63925     else
63926       BUILD_FAILURE_HANDLER=true
63927       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63928 $as_echo "yes, forced" >&6; }
63929     fi
63930   elif test "x$enable_jtreg_failure_handler" = "xno"; then
63931     BUILD_FAILURE_HANDLER=false
63932     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63933 $as_echo "no, forced" >&6; }
63934   elif test "x$enable_jtreg_failure_handler" = "xauto" \
63935       || test "x$enable_jtreg_failure_handler" = "x"; then
63936     if test "x$JT_HOME" = "x"; then
63937       BUILD_FAILURE_HANDLER=false
63938       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63939 $as_echo "no, missing jtreg" >&6; }
63940     else
63941       BUILD_FAILURE_HANDLER=true
63942       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63943 $as_echo "yes, jtreg present" >&6; }
63944     fi
63945   else
63946     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63947   fi
63948 
63949 
63950 
63951 
63952 ###############################################################################
63953 #
63954 # Configure parts of the build that only affect the build performance,
63955 # not the result.
63956 #
63957 ###############################################################################
63958 
63959 
63960   # How many cores do we have on this build system?
63961 
63962 # Check whether --with-num-cores was given.
63963 if test "${with_num_cores+set}" = set; then :
63964   withval=$with_num_cores;
63965 fi
63966 
63967   if test "x$with_num_cores" = x; then
63968     # The number of cores were not specified, try to probe them.
63969 
63970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63971 $as_echo_n "checking for number of cores... " >&6; }
63972   NUM_CORES=1
63973   FOUND_CORES=no
63974 
63975   if test -f /proc/cpuinfo; then
63976     # Looks like a Linux (or cygwin) system
63977     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63978     FOUND_CORES=yes
63979   elif test -x /usr/sbin/psrinfo; then
63980     # Looks like a Solaris system
63981     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63982     FOUND_CORES=yes
63983   elif test -x /usr/sbin/sysctl; then
63984     # Looks like a MacOSX system
63985     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63986     FOUND_CORES=yes
63987   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63988     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63989     FOUND_CORES=yes
63990   elif test -n "$NUMBER_OF_PROCESSORS"; then
63991     # On windows, look in the env
63992     NUM_CORES=$NUMBER_OF_PROCESSORS
63993     FOUND_CORES=yes
63994   fi
63995 
63996   if test "x$FOUND_CORES" = xyes; then
63997     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63998 $as_echo "$NUM_CORES" >&6; }
63999   else
64000     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64001 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
64002     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64003 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64004   fi
64005 
64006   else
64007     NUM_CORES=$with_num_cores
64008   fi
64009 
64010 
64011 
64012   # How much memory do we have on this build system?
64013 
64014 # Check whether --with-memory-size was given.
64015 if test "${with_memory_size+set}" = set; then :
64016   withval=$with_memory_size;
64017 fi
64018 
64019   if test "x$with_memory_size" = x; then
64020     # The memory size was not specified, try to probe it.
64021 
64022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64023 $as_echo_n "checking for memory size... " >&6; }
64024   # Default to 1024 MB
64025   MEMORY_SIZE=1024
64026   FOUND_MEM=no
64027 
64028   if test -f /proc/meminfo; then
64029     # Looks like a Linux (or cygwin) system
64030     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64031     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64032     FOUND_MEM=yes
64033   elif test -x /usr/sbin/prtconf; then
64034     # Looks like a Solaris or AIX system
64035     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64036     FOUND_MEM=yes
64037   elif test -x /usr/sbin/sysctl; then
64038     # Looks like a MacOSX system
64039     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64040     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64041     FOUND_MEM=yes
64042   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64043     # Windows, but without cygwin
64044     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64045     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64046     FOUND_MEM=yes
64047   fi
64048 
64049   if test "x$FOUND_MEM" = xyes; then
64050     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64051 $as_echo "$MEMORY_SIZE MB" >&6; }
64052   else
64053     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64054 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64055     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64056 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64057   fi
64058 
64059   else
64060     MEMORY_SIZE=$with_memory_size
64061   fi
64062 
64063 
64064 
64065   # Provide a decent default number of parallel jobs for make depending on
64066   # number of cores, amount of memory and machine architecture.
64067 
64068 # Check whether --with-jobs was given.
64069 if test "${with_jobs+set}" = set; then :
64070   withval=$with_jobs;
64071 fi
64072 
64073   if test "x$with_jobs" = x; then
64074     # Number of jobs was not specified, calculate.
64075     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64076 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64077     # Approximate memory in GB.
64078     memory_gb=`expr $MEMORY_SIZE / 1024`
64079     # Pick the lowest of memory in gb and number of cores.
64080     if test "$memory_gb" -lt "$NUM_CORES"; then
64081       JOBS="$memory_gb"
64082     else
64083       JOBS="$NUM_CORES"
64084     fi
64085     if test "$JOBS" -eq "0"; then
64086       JOBS=1
64087     fi
64088     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64089 $as_echo "$JOBS" >&6; }
64090   else
64091     JOBS=$with_jobs
64092   fi
64093 
64094 
64095 
64096   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64097 
64098 # Check whether --with-test-jobs was given.
64099 if test "${with_test_jobs+set}" = set; then :
64100   withval=$with_test_jobs;
64101 fi
64102 
64103   if test "x$with_test_jobs" = x; then
64104       TEST_JOBS=0
64105   else
64106       TEST_JOBS=$with_test_jobs
64107   fi
64108 
64109 
64110 
64111 # Setup arguments for the boot jdk (after cores and memory have been setup)
64112 
64113   ##############################################################################
64114   #
64115   # Specify jvm options for anything that is run with the Boot JDK.
64116   # Not all JVM:s accept the same arguments on the command line.
64117   #
64118 
64119 # Check whether --with-boot-jdk-jvmargs was given.
64120 if test "${with_boot_jdk_jvmargs+set}" = set; then :
64121   withval=$with_boot_jdk_jvmargs;
64122 fi
64123 
64124 
64125   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64126 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
64127 
64128   # Disable special log output when a debug build is used as Boot JDK...
64129 
64130   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64131   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64132   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64133   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64134   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64135   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64136     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64137     JVM_ARG_OK=true
64138   else
64139     $ECHO "Arg failed:" >&5
64140     $ECHO "$OUTPUT" >&5
64141     JVM_ARG_OK=false
64142   fi
64143 
64144 
64145   # Apply user provided options.
64146 
64147   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64148   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64149   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64150   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64151   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64152   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64153     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64154     JVM_ARG_OK=true
64155   else
64156     $ECHO "Arg failed:" >&5
64157     $ECHO "$OUTPUT" >&5
64158     JVM_ARG_OK=false
64159   fi
64160 
64161 
64162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64163 $as_echo "$boot_jdk_jvmargs" >&6; }
64164 
64165   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64166   JAVA_FLAGS=$boot_jdk_jvmargs
64167 
64168 
64169 
64170   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64171 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64172 
64173   # Starting amount of heap memory.
64174 
64175   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64176   $ECHO "Command: $JAVA -Xms64M -version" >&5
64177   OUTPUT=`$JAVA -Xms64M -version 2>&1`
64178   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64179   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64180   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64181     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64182     JVM_ARG_OK=true
64183   else
64184     $ECHO "Arg failed:" >&5
64185     $ECHO "$OUTPUT" >&5
64186     JVM_ARG_OK=false
64187   fi
64188 
64189 
64190   # Maximum amount of heap memory.
64191   # Maximum stack size.
64192   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64193   if test "x$BOOT_JDK_BITS" = "x32"; then
64194     if test "$JVM_MAX_HEAP" -gt "1100"; then
64195       JVM_MAX_HEAP=1100
64196     elif test "$JVM_MAX_HEAP" -lt "512"; then
64197       JVM_MAX_HEAP=512
64198     fi
64199     STACK_SIZE=768
64200   else
64201     # Running a 64 bit JVM allows for and requires a bigger heap
64202     if test "$JVM_MAX_HEAP" -gt "1600"; then
64203       JVM_MAX_HEAP=1600
64204     elif test "$JVM_MAX_HEAP" -lt "512"; then
64205       JVM_MAX_HEAP=512
64206     fi
64207     STACK_SIZE=1536
64208   fi
64209 
64210   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64211   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64212   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64213   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64214   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64215   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64216     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64217     JVM_ARG_OK=true
64218   else
64219     $ECHO "Arg failed:" >&5
64220     $ECHO "$OUTPUT" >&5
64221     JVM_ARG_OK=false
64222   fi
64223 
64224 
64225   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64226   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64227   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64228   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64229   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64230   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64231     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64232     JVM_ARG_OK=true
64233   else
64234     $ECHO "Arg failed:" >&5
64235     $ECHO "$OUTPUT" >&5
64236     JVM_ARG_OK=false
64237   fi
64238 
64239 
64240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64241 $as_echo "$boot_jdk_jvmargs_big" >&6; }
64242 
64243   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64244 
64245 
64246   # By default, the main javac compilations use big
64247   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64248 
64249 
64250   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64251 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64252 
64253   # Use serial gc for small short lived tools if possible
64254 
64255   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64256   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64257   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64258   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64259   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64260   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64261     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64262     JVM_ARG_OK=true
64263   else
64264     $ECHO "Arg failed:" >&5
64265     $ECHO "$OUTPUT" >&5
64266     JVM_ARG_OK=false
64267   fi
64268 
64269 
64270   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64271   $ECHO "Command: $JAVA -Xms32M -version" >&5
64272   OUTPUT=`$JAVA -Xms32M -version 2>&1`
64273   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64274   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64275   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64276     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64277     JVM_ARG_OK=true
64278   else
64279     $ECHO "Arg failed:" >&5
64280     $ECHO "$OUTPUT" >&5
64281     JVM_ARG_OK=false
64282   fi
64283 
64284 
64285   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64286   $ECHO "Command: $JAVA -Xmx512M -version" >&5
64287   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64288   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64289   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64290   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64291     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64292     JVM_ARG_OK=true
64293   else
64294     $ECHO "Arg failed:" >&5
64295     $ECHO "$OUTPUT" >&5
64296     JVM_ARG_OK=false
64297   fi
64298 
64299 
64300   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64301   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64302   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64303   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64304   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64305   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64306     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64307     JVM_ARG_OK=true
64308   else
64309     $ECHO "Arg failed:" >&5
64310     $ECHO "$OUTPUT" >&5
64311     JVM_ARG_OK=false
64312   fi
64313 
64314 
64315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64316 $as_echo "$boot_jdk_jvmargs_small" >&6; }
64317 
64318   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64319 
64320 
64321   JAVA_TOOL_FLAGS_SMALL=""
64322   for f in $JAVA_FLAGS_SMALL; do
64323     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64324   done
64325 
64326 
64327 
64328 # Setup smart javac (after cores and memory have been setup)
64329 
64330 
64331 # Check whether --with-sjavac-server-java was given.
64332 if test "${with_sjavac_server_java+set}" = set; then :
64333   withval=$with_sjavac_server_java;
64334 fi
64335 
64336 
64337   if test "x$with_sjavac_server_java" != x; then
64338     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64339     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64340     if test "x$FOUND_VERSION" = x; then
64341       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64342     fi
64343   else
64344     SJAVAC_SERVER_JAVA="$JAVA"
64345   fi
64346 
64347 
64348   if test "$MEMORY_SIZE" -gt "3000"; then
64349 
64350   $ECHO "Check if jvm arg is ok: -d64" >&5
64351   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64352   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64353   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64354   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64355   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64356     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64357     JVM_ARG_OK=true
64358   else
64359     $ECHO "Arg failed:" >&5
64360     $ECHO "$OUTPUT" >&5
64361     JVM_ARG_OK=false
64362   fi
64363 
64364     if test "$JVM_ARG_OK" = true; then
64365       JVM_64BIT=true
64366       JVM_ARG_OK=false
64367     fi
64368   fi
64369 
64370   MX_VALUE=`expr $MEMORY_SIZE / 2`
64371   if test "$JVM_64BIT" = true; then
64372     # Set ms lower than mx since more than one instance of the server might
64373     # get launched at the same time before they figure out which instance won.
64374     MS_VALUE=512
64375     if test "$MX_VALUE" -gt "2048"; then
64376       MX_VALUE=2048
64377     fi
64378   else
64379     MS_VALUE=256
64380     if test "$MX_VALUE" -gt "1500"; then
64381       MX_VALUE=1500
64382     fi
64383   fi
64384   if test "$MX_VALUE" -lt "512"; then
64385     MX_VALUE=512
64386   fi
64387 
64388   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64389   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64390   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64391   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64392   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64393   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64394     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64395     JVM_ARG_OK=true
64396   else
64397     $ECHO "Arg failed:" >&5
64398     $ECHO "$OUTPUT" >&5
64399     JVM_ARG_OK=false
64400   fi
64401 
64402 
64403 
64404   # Check whether --enable-sjavac was given.
64405 if test "${enable_sjavac+set}" = set; then :
64406   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64407 else
64408   ENABLE_SJAVAC="no"
64409 fi
64410 
64411   if test "x$JVM_ARG_OK" = "xfalse"; then
64412     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64413 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64414     ENABLE_SJAVAC="no"
64415   fi
64416   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64417 $as_echo_n "checking whether to use sjavac... " >&6; }
64418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64419 $as_echo "$ENABLE_SJAVAC" >&6; }
64420 
64421 
64422   # Check whether --enable-javac-server was given.
64423 if test "${enable_javac_server+set}" = set; then :
64424   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64425 else
64426   ENABLE_JAVAC_SERVER="yes"
64427 fi
64428 
64429   if test "x$JVM_ARG_OK" = "xfalse"; then
64430     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64431 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64432     ENABLE_JAVAC_SERVER="no"
64433   fi
64434   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64435 $as_echo_n "checking whether to use javac server... " >&6; }
64436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64437 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64438 
64439 
64440   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64441     # When using a server javac, the small client instances do not need much
64442     # resources.
64443     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64444   fi
64445 
64446 
64447 # Setup use of icecc if requested
64448 
64449   # Check whether --enable-icecc was given.
64450 if test "${enable_icecc+set}" = set; then :
64451   enableval=$enable_icecc;
64452 fi
64453 
64454 
64455   if test "x${enable_icecc}" = "xyes"; then
64456 
64457 
64458 
64459   # Publish this variable in the help.
64460 
64461 
64462   if [ -z "${ICECC_CMD+x}" ]; then
64463     # The variable is not set by user, try to locate tool using the code snippet
64464     for ac_prog in icecc
64465 do
64466   # Extract the first word of "$ac_prog", so it can be a program name with args.
64467 set dummy $ac_prog; ac_word=$2
64468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64469 $as_echo_n "checking for $ac_word... " >&6; }
64470 if ${ac_cv_path_ICECC_CMD+:} false; then :
64471   $as_echo_n "(cached) " >&6
64472 else
64473   case $ICECC_CMD in
64474   [\\/]* | ?:[\\/]*)
64475   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64476   ;;
64477   *)
64478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64479 for as_dir in $PATH
64480 do
64481   IFS=$as_save_IFS
64482   test -z "$as_dir" && as_dir=.
64483     for ac_exec_ext in '' $ac_executable_extensions; do
64484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64485     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64487     break 2
64488   fi
64489 done
64490   done
64491 IFS=$as_save_IFS
64492 
64493   ;;
64494 esac
64495 fi
64496 ICECC_CMD=$ac_cv_path_ICECC_CMD
64497 if test -n "$ICECC_CMD"; then
64498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64499 $as_echo "$ICECC_CMD" >&6; }
64500 else
64501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64502 $as_echo "no" >&6; }
64503 fi
64504 
64505 
64506   test -n "$ICECC_CMD" && break
64507 done
64508 
64509   else
64510     # The variable is set, but is it from the command line or the environment?
64511 
64512     # Try to remove the string !ICECC_CMD! from our list.
64513     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64514     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64515       # If it failed, the variable was not from the command line. Ignore it,
64516       # but warn the user (except for BASH, which is always set by the calling BASH).
64517       if test "xICECC_CMD" != xBASH; then
64518         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64519 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64520       fi
64521       # Try to locate tool using the code snippet
64522       for ac_prog in icecc
64523 do
64524   # Extract the first word of "$ac_prog", so it can be a program name with args.
64525 set dummy $ac_prog; ac_word=$2
64526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64527 $as_echo_n "checking for $ac_word... " >&6; }
64528 if ${ac_cv_path_ICECC_CMD+:} false; then :
64529   $as_echo_n "(cached) " >&6
64530 else
64531   case $ICECC_CMD in
64532   [\\/]* | ?:[\\/]*)
64533   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64534   ;;
64535   *)
64536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64537 for as_dir in $PATH
64538 do
64539   IFS=$as_save_IFS
64540   test -z "$as_dir" && as_dir=.
64541     for ac_exec_ext in '' $ac_executable_extensions; do
64542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64543     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64545     break 2
64546   fi
64547 done
64548   done
64549 IFS=$as_save_IFS
64550 
64551   ;;
64552 esac
64553 fi
64554 ICECC_CMD=$ac_cv_path_ICECC_CMD
64555 if test -n "$ICECC_CMD"; then
64556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64557 $as_echo "$ICECC_CMD" >&6; }
64558 else
64559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64560 $as_echo "no" >&6; }
64561 fi
64562 
64563 
64564   test -n "$ICECC_CMD" && break
64565 done
64566 
64567     else
64568       # If it succeeded, then it was overridden by the user. We will use it
64569       # for the tool.
64570 
64571       # First remove it from the list of overridden variables, so we can test
64572       # for unknown variables in the end.
64573       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64574 
64575       # Check if we try to supply an empty value
64576       if test "x$ICECC_CMD" = x; then
64577         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64578 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64579         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64580 $as_echo_n "checking for ICECC_CMD... " >&6; }
64581         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64582 $as_echo "disabled" >&6; }
64583       else
64584         # Check if the provided tool contains a complete path.
64585         tool_specified="$ICECC_CMD"
64586         tool_basename="${tool_specified##*/}"
64587         if test "x$tool_basename" = "x$tool_specified"; then
64588           # A command without a complete path is provided, search $PATH.
64589           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64590 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64591           # Extract the first word of "$tool_basename", so it can be a program name with args.
64592 set dummy $tool_basename; ac_word=$2
64593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64594 $as_echo_n "checking for $ac_word... " >&6; }
64595 if ${ac_cv_path_ICECC_CMD+:} false; then :
64596   $as_echo_n "(cached) " >&6
64597 else
64598   case $ICECC_CMD in
64599   [\\/]* | ?:[\\/]*)
64600   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64601   ;;
64602   *)
64603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64604 for as_dir in $PATH
64605 do
64606   IFS=$as_save_IFS
64607   test -z "$as_dir" && as_dir=.
64608     for ac_exec_ext in '' $ac_executable_extensions; do
64609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64610     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64612     break 2
64613   fi
64614 done
64615   done
64616 IFS=$as_save_IFS
64617 
64618   ;;
64619 esac
64620 fi
64621 ICECC_CMD=$ac_cv_path_ICECC_CMD
64622 if test -n "$ICECC_CMD"; then
64623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64624 $as_echo "$ICECC_CMD" >&6; }
64625 else
64626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64627 $as_echo "no" >&6; }
64628 fi
64629 
64630 
64631           if test "x$ICECC_CMD" = x; then
64632             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64633           fi
64634         else
64635           # Otherwise we believe it is a complete path. Use it as it is.
64636           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64637 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64638           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64639 $as_echo_n "checking for ICECC_CMD... " >&6; }
64640           if test ! -x "$tool_specified"; then
64641             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64642 $as_echo "not found" >&6; }
64643             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64644           fi
64645           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64646 $as_echo "$tool_specified" >&6; }
64647         fi
64648       fi
64649     fi
64650 
64651   fi
64652 
64653 
64654 
64655   if test "x$ICECC_CMD" = x; then
64656     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64657   fi
64658 
64659 
64660     old_path="$PATH"
64661 
64662     # Look for icecc-create-env in some known places
64663     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64664 
64665 
64666 
64667   # Publish this variable in the help.
64668 
64669 
64670   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64671     # The variable is not set by user, try to locate tool using the code snippet
64672     for ac_prog in icecc-create-env
64673 do
64674   # Extract the first word of "$ac_prog", so it can be a program name with args.
64675 set dummy $ac_prog; ac_word=$2
64676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64677 $as_echo_n "checking for $ac_word... " >&6; }
64678 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64679   $as_echo_n "(cached) " >&6
64680 else
64681   case $ICECC_CREATE_ENV in
64682   [\\/]* | ?:[\\/]*)
64683   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64684   ;;
64685   *)
64686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64687 for as_dir in $PATH
64688 do
64689   IFS=$as_save_IFS
64690   test -z "$as_dir" && as_dir=.
64691     for ac_exec_ext in '' $ac_executable_extensions; do
64692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64693     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64695     break 2
64696   fi
64697 done
64698   done
64699 IFS=$as_save_IFS
64700 
64701   ;;
64702 esac
64703 fi
64704 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64705 if test -n "$ICECC_CREATE_ENV"; then
64706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64707 $as_echo "$ICECC_CREATE_ENV" >&6; }
64708 else
64709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64710 $as_echo "no" >&6; }
64711 fi
64712 
64713 
64714   test -n "$ICECC_CREATE_ENV" && break
64715 done
64716 
64717   else
64718     # The variable is set, but is it from the command line or the environment?
64719 
64720     # Try to remove the string !ICECC_CREATE_ENV! from our list.
64721     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64722     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64723       # If it failed, the variable was not from the command line. Ignore it,
64724       # but warn the user (except for BASH, which is always set by the calling BASH).
64725       if test "xICECC_CREATE_ENV" != xBASH; then
64726         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64727 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64728       fi
64729       # Try to locate tool using the code snippet
64730       for ac_prog in icecc-create-env
64731 do
64732   # Extract the first word of "$ac_prog", so it can be a program name with args.
64733 set dummy $ac_prog; ac_word=$2
64734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64735 $as_echo_n "checking for $ac_word... " >&6; }
64736 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64737   $as_echo_n "(cached) " >&6
64738 else
64739   case $ICECC_CREATE_ENV in
64740   [\\/]* | ?:[\\/]*)
64741   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64742   ;;
64743   *)
64744   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64745 for as_dir in $PATH
64746 do
64747   IFS=$as_save_IFS
64748   test -z "$as_dir" && as_dir=.
64749     for ac_exec_ext in '' $ac_executable_extensions; do
64750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64751     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64753     break 2
64754   fi
64755 done
64756   done
64757 IFS=$as_save_IFS
64758 
64759   ;;
64760 esac
64761 fi
64762 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64763 if test -n "$ICECC_CREATE_ENV"; then
64764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64765 $as_echo "$ICECC_CREATE_ENV" >&6; }
64766 else
64767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64768 $as_echo "no" >&6; }
64769 fi
64770 
64771 
64772   test -n "$ICECC_CREATE_ENV" && break
64773 done
64774 
64775     else
64776       # If it succeeded, then it was overridden by the user. We will use it
64777       # for the tool.
64778 
64779       # First remove it from the list of overridden variables, so we can test
64780       # for unknown variables in the end.
64781       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64782 
64783       # Check if we try to supply an empty value
64784       if test "x$ICECC_CREATE_ENV" = x; then
64785         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64786 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64787         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64788 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64789         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64790 $as_echo "disabled" >&6; }
64791       else
64792         # Check if the provided tool contains a complete path.
64793         tool_specified="$ICECC_CREATE_ENV"
64794         tool_basename="${tool_specified##*/}"
64795         if test "x$tool_basename" = "x$tool_specified"; then
64796           # A command without a complete path is provided, search $PATH.
64797           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64798 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64799           # Extract the first word of "$tool_basename", so it can be a program name with args.
64800 set dummy $tool_basename; ac_word=$2
64801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64802 $as_echo_n "checking for $ac_word... " >&6; }
64803 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64804   $as_echo_n "(cached) " >&6
64805 else
64806   case $ICECC_CREATE_ENV in
64807   [\\/]* | ?:[\\/]*)
64808   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64809   ;;
64810   *)
64811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64812 for as_dir in $PATH
64813 do
64814   IFS=$as_save_IFS
64815   test -z "$as_dir" && as_dir=.
64816     for ac_exec_ext in '' $ac_executable_extensions; do
64817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64818     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64820     break 2
64821   fi
64822 done
64823   done
64824 IFS=$as_save_IFS
64825 
64826   ;;
64827 esac
64828 fi
64829 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64830 if test -n "$ICECC_CREATE_ENV"; then
64831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64832 $as_echo "$ICECC_CREATE_ENV" >&6; }
64833 else
64834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64835 $as_echo "no" >&6; }
64836 fi
64837 
64838 
64839           if test "x$ICECC_CREATE_ENV" = x; then
64840             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64841           fi
64842         else
64843           # Otherwise we believe it is a complete path. Use it as it is.
64844           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64845 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64846           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64847 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64848           if test ! -x "$tool_specified"; then
64849             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64850 $as_echo "not found" >&6; }
64851             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64852           fi
64853           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64854 $as_echo "$tool_specified" >&6; }
64855         fi
64856       fi
64857     fi
64858 
64859   fi
64860 
64861 
64862 
64863   if test "x$ICECC_CREATE_ENV" = x; then
64864     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64865   fi
64866 
64867 
64868     # Use icecc-create-env to create a minimal compilation environment that can
64869     # be sent to the other hosts in the icecream cluster.
64870     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64871     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64872     # Older versions of icecc does not have the --gcc parameter
64873     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64874       icecc_gcc_arg="--gcc"
64875     fi
64876     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64877 
64878   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64879       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64880           ${icecc_create_env_log} 2>&1 )
64881   if test "$?" != "0"; then
64882     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64883 $as_echo "$as_me: icecc-create-env output:" >&6;}
64884     cat \
64885           ${icecc_create_env_log}
64886     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64887   fi
64888 
64889     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64890       # For clang, the icecc compilerwrapper is needed. It usually resides next
64891       # to icecc-create-env.
64892 
64893 
64894 
64895   # Publish this variable in the help.
64896 
64897 
64898   if [ -z "${ICECC_WRAPPER+x}" ]; then
64899     # The variable is not set by user, try to locate tool using the code snippet
64900     for ac_prog in compilerwrapper
64901 do
64902   # Extract the first word of "$ac_prog", so it can be a program name with args.
64903 set dummy $ac_prog; ac_word=$2
64904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64905 $as_echo_n "checking for $ac_word... " >&6; }
64906 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64907   $as_echo_n "(cached) " >&6
64908 else
64909   case $ICECC_WRAPPER in
64910   [\\/]* | ?:[\\/]*)
64911   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64912   ;;
64913   *)
64914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64915 for as_dir in $PATH
64916 do
64917   IFS=$as_save_IFS
64918   test -z "$as_dir" && as_dir=.
64919     for ac_exec_ext in '' $ac_executable_extensions; do
64920   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64921     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64922     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64923     break 2
64924   fi
64925 done
64926   done
64927 IFS=$as_save_IFS
64928 
64929   ;;
64930 esac
64931 fi
64932 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64933 if test -n "$ICECC_WRAPPER"; then
64934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64935 $as_echo "$ICECC_WRAPPER" >&6; }
64936 else
64937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64938 $as_echo "no" >&6; }
64939 fi
64940 
64941 
64942   test -n "$ICECC_WRAPPER" && break
64943 done
64944 
64945   else
64946     # The variable is set, but is it from the command line or the environment?
64947 
64948     # Try to remove the string !ICECC_WRAPPER! from our list.
64949     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64950     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64951       # If it failed, the variable was not from the command line. Ignore it,
64952       # but warn the user (except for BASH, which is always set by the calling BASH).
64953       if test "xICECC_WRAPPER" != xBASH; then
64954         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64955 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64956       fi
64957       # Try to locate tool using the code snippet
64958       for ac_prog in compilerwrapper
64959 do
64960   # Extract the first word of "$ac_prog", so it can be a program name with args.
64961 set dummy $ac_prog; ac_word=$2
64962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64963 $as_echo_n "checking for $ac_word... " >&6; }
64964 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64965   $as_echo_n "(cached) " >&6
64966 else
64967   case $ICECC_WRAPPER in
64968   [\\/]* | ?:[\\/]*)
64969   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64970   ;;
64971   *)
64972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64973 for as_dir in $PATH
64974 do
64975   IFS=$as_save_IFS
64976   test -z "$as_dir" && as_dir=.
64977     for ac_exec_ext in '' $ac_executable_extensions; do
64978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64979     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64981     break 2
64982   fi
64983 done
64984   done
64985 IFS=$as_save_IFS
64986 
64987   ;;
64988 esac
64989 fi
64990 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64991 if test -n "$ICECC_WRAPPER"; then
64992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64993 $as_echo "$ICECC_WRAPPER" >&6; }
64994 else
64995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64996 $as_echo "no" >&6; }
64997 fi
64998 
64999 
65000   test -n "$ICECC_WRAPPER" && break
65001 done
65002 
65003     else
65004       # If it succeeded, then it was overridden by the user. We will use it
65005       # for the tool.
65006 
65007       # First remove it from the list of overridden variables, so we can test
65008       # for unknown variables in the end.
65009       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65010 
65011       # Check if we try to supply an empty value
65012       if test "x$ICECC_WRAPPER" = x; then
65013         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65014 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65015         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65016 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65017         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65018 $as_echo "disabled" >&6; }
65019       else
65020         # Check if the provided tool contains a complete path.
65021         tool_specified="$ICECC_WRAPPER"
65022         tool_basename="${tool_specified##*/}"
65023         if test "x$tool_basename" = "x$tool_specified"; then
65024           # A command without a complete path is provided, search $PATH.
65025           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65026 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65027           # Extract the first word of "$tool_basename", so it can be a program name with args.
65028 set dummy $tool_basename; ac_word=$2
65029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65030 $as_echo_n "checking for $ac_word... " >&6; }
65031 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65032   $as_echo_n "(cached) " >&6
65033 else
65034   case $ICECC_WRAPPER in
65035   [\\/]* | ?:[\\/]*)
65036   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65037   ;;
65038   *)
65039   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65040 for as_dir in $PATH
65041 do
65042   IFS=$as_save_IFS
65043   test -z "$as_dir" && as_dir=.
65044     for ac_exec_ext in '' $ac_executable_extensions; do
65045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65046     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65048     break 2
65049   fi
65050 done
65051   done
65052 IFS=$as_save_IFS
65053 
65054   ;;
65055 esac
65056 fi
65057 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65058 if test -n "$ICECC_WRAPPER"; then
65059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65060 $as_echo "$ICECC_WRAPPER" >&6; }
65061 else
65062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65063 $as_echo "no" >&6; }
65064 fi
65065 
65066 
65067           if test "x$ICECC_WRAPPER" = x; then
65068             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65069           fi
65070         else
65071           # Otherwise we believe it is a complete path. Use it as it is.
65072           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65073 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65074           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65075 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65076           if test ! -x "$tool_specified"; then
65077             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65078 $as_echo "not found" >&6; }
65079             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65080           fi
65081           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65082 $as_echo "$tool_specified" >&6; }
65083         fi
65084       fi
65085     fi
65086 
65087   fi
65088 
65089 
65090 
65091   if test "x$ICECC_WRAPPER" = x; then
65092     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65093   fi
65094 
65095 
65096 
65097   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65098       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65099   if test "$?" != "0"; then
65100     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65101 $as_echo "$as_me: icecc-create-env output:" >&6;}
65102     cat ${icecc_create_env_log}
65103     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65104   fi
65105 
65106     else
65107       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65108     fi
65109     PATH="$old_path"
65110     # The bundle with the compiler gets a name based on checksums. Parse log file
65111     # to find it.
65112     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65113     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65114     if test ! -f ${ICECC_ENV_BUNDLE}; then
65115       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65116     fi
65117     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65118 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65119     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65120 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65121     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65122 
65123     if test "x${COMPILE_TYPE}" = "xcross"; then
65124       # If cross compiling, create a separate env package for the build compiler
65125       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65126       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65127       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65128 
65129   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65130       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65131             ${icecc_create_env_log_build} 2>&1 )
65132   if test "$?" != "0"; then
65133     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65134 $as_echo "$as_me: icecc-create-env output:" >&6;}
65135     cat \
65136             ${icecc_create_env_log_build}
65137     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65138   fi
65139 
65140       elif test "x${BUILD_CC##*/}" = "xclang"; then
65141 
65142   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65143       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65144   if test "$?" != "0"; then
65145     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65146 $as_echo "$as_me: icecc-create-env output:" >&6;}
65147     cat ${icecc_create_env_log_build}
65148     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65149   fi
65150 
65151       else
65152         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65153       fi
65154       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65155       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65156       if test ! -f ${ICECC_ENV_BUNDLE}; then
65157         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65158       fi
65159       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65160 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65161       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65162 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65163       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65164           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65165     else
65166       BUILD_ICECC="${ICECC}"
65167     fi
65168 
65169 
65170   fi
65171 
65172 
65173 # Can the C/C++ compiler use precompiled headers?
65174 
65175 
65176   ###############################################################################
65177   #
65178   # Can the C/C++ compiler use precompiled headers?
65179   #
65180   # Check whether --enable-precompiled-headers was given.
65181 if test "${enable_precompiled_headers+set}" = set; then :
65182   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65183 else
65184   ENABLE_PRECOMPH=yes
65185 fi
65186 
65187 
65188   USE_PRECOMPILED_HEADER=1
65189   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65190 $as_echo_n "checking If precompiled header is enabled... " >&6; }
65191   if test "x$ENABLE_PRECOMPH" = xno; then
65192     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65193 $as_echo "no, forced" >&6; }
65194     USE_PRECOMPILED_HEADER=0
65195   elif test "x$ICECC" != "x"; then
65196     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65197 $as_echo "no, does not work effectively with icecc" >&6; }
65198     USE_PRECOMPILED_HEADER=0
65199   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65200     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65201 $as_echo "no, does not work with Solaris Studio" >&6; }
65202     USE_PRECOMPILED_HEADER=0
65203   else
65204     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65205 $as_echo "yes" >&6; }
65206   fi
65207 
65208   if test "x$ENABLE_PRECOMPH" = xyes; then
65209     # Check that the compiler actually supports precomp headers.
65210     if test "x$TOOLCHAIN_TYPE" = xgcc; then
65211       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65212 $as_echo_n "checking that precompiled headers work... " >&6; }
65213       echo "int alfa();" > conftest.h
65214       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65215       if test ! -f conftest.hpp.gch; then
65216         USE_PRECOMPILED_HEADER=0
65217         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65218 $as_echo "no" >&6; }
65219       else
65220         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65221 $as_echo "yes" >&6; }
65222       fi
65223       rm -f conftest.h conftest.hpp.gch
65224     fi
65225   fi
65226 
65227 
65228 
65229 
65230 # Setup use of ccache, if available
65231 
65232   # Check whether --enable-ccache was given.
65233 if test "${enable_ccache+set}" = set; then :
65234   enableval=$enable_ccache;
65235 fi
65236 
65237 
65238   CCACHE=
65239   CCACHE_STATUS=
65240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65241 $as_echo_n "checking is ccache enabled... " >&6; }
65242   if test "x$enable_ccache" = xyes; then
65243     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65244       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65245 $as_echo "yes" >&6; }
65246       OLD_PATH="$PATH"
65247       if test "x$TOOLCHAIN_PATH" != x; then
65248         PATH=$TOOLCHAIN_PATH:$PATH
65249       fi
65250 
65251 
65252 
65253   # Publish this variable in the help.
65254 
65255 
65256   if [ -z "${CCACHE+x}" ]; then
65257     # The variable is not set by user, try to locate tool using the code snippet
65258     for ac_prog in ccache
65259 do
65260   # Extract the first word of "$ac_prog", so it can be a program name with args.
65261 set dummy $ac_prog; ac_word=$2
65262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65263 $as_echo_n "checking for $ac_word... " >&6; }
65264 if ${ac_cv_path_CCACHE+:} false; then :
65265   $as_echo_n "(cached) " >&6
65266 else
65267   case $CCACHE in
65268   [\\/]* | ?:[\\/]*)
65269   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65270   ;;
65271   *)
65272   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65273 for as_dir in $PATH
65274 do
65275   IFS=$as_save_IFS
65276   test -z "$as_dir" && as_dir=.
65277     for ac_exec_ext in '' $ac_executable_extensions; do
65278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65279     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65281     break 2
65282   fi
65283 done
65284   done
65285 IFS=$as_save_IFS
65286 
65287   ;;
65288 esac
65289 fi
65290 CCACHE=$ac_cv_path_CCACHE
65291 if test -n "$CCACHE"; then
65292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65293 $as_echo "$CCACHE" >&6; }
65294 else
65295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65296 $as_echo "no" >&6; }
65297 fi
65298 
65299 
65300   test -n "$CCACHE" && break
65301 done
65302 
65303   else
65304     # The variable is set, but is it from the command line or the environment?
65305 
65306     # Try to remove the string !CCACHE! from our list.
65307     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65308     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65309       # If it failed, the variable was not from the command line. Ignore it,
65310       # but warn the user (except for BASH, which is always set by the calling BASH).
65311       if test "xCCACHE" != xBASH; then
65312         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65313 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65314       fi
65315       # Try to locate tool using the code snippet
65316       for ac_prog in ccache
65317 do
65318   # Extract the first word of "$ac_prog", so it can be a program name with args.
65319 set dummy $ac_prog; ac_word=$2
65320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65321 $as_echo_n "checking for $ac_word... " >&6; }
65322 if ${ac_cv_path_CCACHE+:} false; then :
65323   $as_echo_n "(cached) " >&6
65324 else
65325   case $CCACHE in
65326   [\\/]* | ?:[\\/]*)
65327   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65328   ;;
65329   *)
65330   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65331 for as_dir in $PATH
65332 do
65333   IFS=$as_save_IFS
65334   test -z "$as_dir" && as_dir=.
65335     for ac_exec_ext in '' $ac_executable_extensions; do
65336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65337     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65339     break 2
65340   fi
65341 done
65342   done
65343 IFS=$as_save_IFS
65344 
65345   ;;
65346 esac
65347 fi
65348 CCACHE=$ac_cv_path_CCACHE
65349 if test -n "$CCACHE"; then
65350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65351 $as_echo "$CCACHE" >&6; }
65352 else
65353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65354 $as_echo "no" >&6; }
65355 fi
65356 
65357 
65358   test -n "$CCACHE" && break
65359 done
65360 
65361     else
65362       # If it succeeded, then it was overridden by the user. We will use it
65363       # for the tool.
65364 
65365       # First remove it from the list of overridden variables, so we can test
65366       # for unknown variables in the end.
65367       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65368 
65369       # Check if we try to supply an empty value
65370       if test "x$CCACHE" = x; then
65371         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65372 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65373         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65374 $as_echo_n "checking for CCACHE... " >&6; }
65375         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65376 $as_echo "disabled" >&6; }
65377       else
65378         # Check if the provided tool contains a complete path.
65379         tool_specified="$CCACHE"
65380         tool_basename="${tool_specified##*/}"
65381         if test "x$tool_basename" = "x$tool_specified"; then
65382           # A command without a complete path is provided, search $PATH.
65383           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65384 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65385           # Extract the first word of "$tool_basename", so it can be a program name with args.
65386 set dummy $tool_basename; ac_word=$2
65387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65388 $as_echo_n "checking for $ac_word... " >&6; }
65389 if ${ac_cv_path_CCACHE+:} false; then :
65390   $as_echo_n "(cached) " >&6
65391 else
65392   case $CCACHE in
65393   [\\/]* | ?:[\\/]*)
65394   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65395   ;;
65396   *)
65397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65398 for as_dir in $PATH
65399 do
65400   IFS=$as_save_IFS
65401   test -z "$as_dir" && as_dir=.
65402     for ac_exec_ext in '' $ac_executable_extensions; do
65403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65404     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65406     break 2
65407   fi
65408 done
65409   done
65410 IFS=$as_save_IFS
65411 
65412   ;;
65413 esac
65414 fi
65415 CCACHE=$ac_cv_path_CCACHE
65416 if test -n "$CCACHE"; then
65417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65418 $as_echo "$CCACHE" >&6; }
65419 else
65420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65421 $as_echo "no" >&6; }
65422 fi
65423 
65424 
65425           if test "x$CCACHE" = x; then
65426             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65427           fi
65428         else
65429           # Otherwise we believe it is a complete path. Use it as it is.
65430           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65431 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65432           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65433 $as_echo_n "checking for CCACHE... " >&6; }
65434           if test ! -x "$tool_specified"; then
65435             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65436 $as_echo "not found" >&6; }
65437             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65438           fi
65439           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65440 $as_echo "$tool_specified" >&6; }
65441         fi
65442       fi
65443     fi
65444 
65445   fi
65446 
65447 
65448 
65449   if test "x$CCACHE" = x; then
65450     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65451   fi
65452 
65453 
65454       PATH="$OLD_PATH"
65455       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65456       CCACHE_STATUS="Active ($CCACHE_VERSION)"
65457     else
65458       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65459 $as_echo "no" >&6; }
65460       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65461 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65462     fi
65463   elif test "x$enable_ccache" = xno; then
65464     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65465 $as_echo "no, explicitly disabled" >&6; }
65466     CCACHE_STATUS="Disabled"
65467   elif test "x$enable_ccache" = x; then
65468     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65469 $as_echo "no" >&6; }
65470   else
65471     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65472 $as_echo "unknown" >&6; }
65473     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65474   fi
65475 
65476 
65477 
65478 # Check whether --with-ccache-dir was given.
65479 if test "${with_ccache_dir+set}" = set; then :
65480   withval=$with_ccache_dir;
65481 fi
65482 
65483 
65484   if test "x$with_ccache_dir" != x; then
65485     # When using a non home ccache directory, assume the use is to share ccache files
65486     # with other users. Thus change the umask.
65487     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65488     if test "x$CCACHE" = x; then
65489       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65490 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65491     fi
65492   fi
65493 
65494   if test "x$CCACHE" != x; then
65495 
65496   if test "x$CCACHE" != x; then
65497     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65498       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65499           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65500       if test "x$HAS_BAD_CCACHE" != "x"; then
65501         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65502       fi
65503       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65504 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65505       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65506       PUSHED_FLAGS="$CXXFLAGS"
65507       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65508       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65509 /* end confdefs.h.  */
65510 
65511 int
65512 main ()
65513 {
65514 
65515   ;
65516   return 0;
65517 }
65518 _ACEOF
65519 if ac_fn_cxx_try_compile "$LINENO"; then :
65520   CC_KNOWS_CCACHE_TRICK=yes
65521 else
65522   CC_KNOWS_CCACHE_TRICK=no
65523 fi
65524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65525       CXXFLAGS="$PUSHED_FLAGS"
65526       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65527         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65528 $as_echo "yes" >&6; }
65529         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65530 
65531         CCACHE_SLOPPINESS=pch_defines,time_macros
65532       else
65533         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65534 $as_echo "no" >&6; }
65535         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65536       fi
65537     fi
65538 
65539     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65540         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65541 
65542     if test "x$SET_CCACHE_DIR" != x; then
65543       mkdir -p $CCACHE_DIR > /dev/null 2>&1
65544       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65545     fi
65546   fi
65547 
65548   fi
65549 
65550 
65551 ###############################################################################
65552 #
65553 # And now the finish...
65554 #
65555 ###############################################################################
65556 
65557 # Check for some common pitfalls
65558 
65559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65560     file_to_test="$SRC_ROOT/LICENSE"
65561     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65562       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
65563     fi
65564   fi
65565 
65566 
65567   # Did user specify any unknown variables?
65568 
65569   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65570     # Replace the separating ! with spaces before presenting for end user.
65571     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65572     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65573 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65574   fi
65575 
65576 
65577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65578 $as_echo_n "checking if build directory is on local disk... " >&6; }
65579 
65580   # df -l lists only local disks; if the given directory is not found then
65581   # a non-zero exit code is given
65582   if test "x$DF" = x; then
65583     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65584       # msys does not have df; use Windows "net use" instead.
65585       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65586       if test "x$IS_NETWORK_DISK" = x; then
65587         OUTPUT_DIR_IS_LOCAL="yes"
65588       else
65589         OUTPUT_DIR_IS_LOCAL="no"
65590       fi
65591     else
65592       # No df here, say it's local
65593       OUTPUT_DIR_IS_LOCAL="yes"
65594     fi
65595   else
65596     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65597       OUTPUT_DIR_IS_LOCAL="yes"
65598     else
65599       OUTPUT_DIR_IS_LOCAL="no"
65600     fi
65601   fi
65602 
65603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65604 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65605 
65606 
65607 
65608   # Check if the user has any old-style ALT_ variables set.
65609   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65610 
65611   # Before generating output files, test if they exist. If they do, this is a reconfigure.
65612   # Since we can't properly handle the dependencies for this, warn the user about the situation
65613   if test -e $OUTPUT_ROOT/spec.gmk; then
65614     IS_RECONFIGURE=yes
65615   else
65616     IS_RECONFIGURE=no
65617   fi
65618 
65619 
65620 # At the end, call the custom hook. (Dummy macro if no custom sources available)
65621 
65622 
65623 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65624 
65625   # Keep feature lists sorted and free of duplicates
65626   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65627   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65628   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65629   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65630   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65631   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65632   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65633 
65634   # Validate features
65635   for variant in $JVM_VARIANTS; do
65636     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65637 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65638     features_var_name=JVM_FEATURES_$variant
65639     JVM_FEATURES_TO_TEST=${!features_var_name}
65640     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65641 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65642     INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
65643     if test "x$INVALID_FEATURES" != x; then
65644       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65645     fi
65646   done
65647 
65648 
65649 # We're messing a bit with internal autoconf variables to put the config.status
65650 # in the output directory instead of the current directory.
65651 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65652 
65653 # Create the actual output files. Now the main work of configure is done.
65654 cat >confcache <<\_ACEOF
65655 # This file is a shell script that caches the results of configure
65656 # tests run on this system so they can be shared between configure
65657 # scripts and configure runs, see configure's option --config-cache.
65658 # It is not useful on other systems.  If it contains results you don't
65659 # want to keep, you may remove or edit it.
65660 #
65661 # config.status only pays attention to the cache file if you give it
65662 # the --recheck option to rerun configure.
65663 #
65664 # `ac_cv_env_foo' variables (set or unset) will be overridden when
65665 # loading this file, other *unset* `ac_cv_foo' will be assigned the
65666 # following values.
65667 
65668 _ACEOF
65669 
65670 # The following way of writing the cache mishandles newlines in values,
65671 # but we know of no workaround that is simple, portable, and efficient.
65672 # So, we kill variables containing newlines.
65673 # Ultrix sh set writes to stderr and can't be redirected directly,
65674 # and sets the high bit in the cache file unless we assign to the vars.
65675 (
65676   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65677     eval ac_val=\$$ac_var
65678     case $ac_val in #(
65679     *${as_nl}*)
65680       case $ac_var in #(
65681       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65682 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65683       esac
65684       case $ac_var in #(
65685       _ | IFS | as_nl) ;; #(
65686       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65687       *) { eval $ac_var=; unset $ac_var;} ;;
65688       esac ;;
65689     esac
65690   done
65691 
65692   (set) 2>&1 |
65693     case $as_nl`(ac_space=' '; set) 2>&1` in #(
65694     *${as_nl}ac_space=\ *)
65695       # `set' does not quote correctly, so add quotes: double-quote
65696       # substitution turns \\\\ into \\, and sed turns \\ into \.
65697       sed -n \
65698         "s/'/'\\\\''/g;
65699           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65700       ;; #(
65701     *)
65702       # `set' quotes correctly as required by POSIX, so do not add quotes.
65703       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65704       ;;
65705     esac |
65706     sort
65707 ) |
65708   sed '
65709      /^ac_cv_env_/b end
65710      t clear
65711      :clear
65712      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65713      t end
65714      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65715      :end' >>confcache
65716 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65717   if test -w "$cache_file"; then
65718     if test "x$cache_file" != "x/dev/null"; then
65719       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65720 $as_echo "$as_me: updating cache $cache_file" >&6;}
65721       if test ! -f "$cache_file" || test -h "$cache_file"; then
65722         cat confcache >"$cache_file"
65723       else
65724         case $cache_file in #(
65725         */* | ?:*)
65726           mv -f confcache "$cache_file"$$ &&
65727           mv -f "$cache_file"$$ "$cache_file" ;; #(
65728         *)
65729           mv -f confcache "$cache_file" ;;
65730         esac
65731       fi
65732     fi
65733   else
65734     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65735 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65736   fi
65737 fi
65738 rm -f confcache
65739 
65740 test "x$prefix" = xNONE && prefix=$ac_default_prefix
65741 # Let make expand exec_prefix.
65742 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65743 
65744 # Transform confdefs.h into DEFS.
65745 # Protect against shell expansion while executing Makefile rules.
65746 # Protect against Makefile macro expansion.
65747 #
65748 # If the first sed substitution is executed (which looks for macros that
65749 # take arguments), then branch to the quote section.  Otherwise,
65750 # look for a macro that doesn't take arguments.
65751 ac_script='
65752 :mline
65753 /\\$/{
65754  N
65755  s,\\\n,,
65756  b mline
65757 }
65758 t clear
65759 :clear
65760 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
65761 t quote
65762 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
65763 t quote
65764 b any
65765 :quote
65766 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65767 s/\[/\\&/g
65768 s/\]/\\&/g
65769 s/\$/$$/g
65770 H
65771 :any
65772 ${
65773         g
65774         s/^\n//
65775         s/\n/ /g
65776         p
65777 }
65778 '
65779 DEFS=`sed -n "$ac_script" confdefs.h`
65780 
65781 
65782 ac_libobjs=
65783 ac_ltlibobjs=
65784 U=
65785 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65786   # 1. Remove the extension, and $U if already installed.
65787   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65788   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65789   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65790   #    will be set to the directory where LIBOBJS objects are built.
65791   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65792   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65793 done
65794 LIBOBJS=$ac_libobjs
65795 
65796 LTLIBOBJS=$ac_ltlibobjs
65797 
65798 
65799 
65800 : "${CONFIG_STATUS=./config.status}"
65801 ac_write_fail=0
65802 ac_clean_files_save=$ac_clean_files
65803 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65804 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65805 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65806 as_write_fail=0
65807 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65808 #! $SHELL
65809 # Generated by $as_me.
65810 # Run this file to recreate the current configuration.
65811 # Compiler output produced by configure, useful for debugging
65812 # configure, is in config.log if it exists.
65813 
65814 debug=false
65815 ac_cs_recheck=false
65816 ac_cs_silent=false
65817 
65818 SHELL=\${CONFIG_SHELL-$SHELL}
65819 export SHELL
65820 _ASEOF
65821 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65822 ## -------------------- ##
65823 ## M4sh Initialization. ##
65824 ## -------------------- ##
65825 
65826 # Be more Bourne compatible
65827 DUALCASE=1; export DUALCASE # for MKS sh
65828 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65829   emulate sh
65830   NULLCMD=:
65831   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65832   # is contrary to our usage.  Disable this feature.
65833   alias -g '${1+"$@"}'='"$@"'
65834   setopt NO_GLOB_SUBST
65835 else
65836   case `(set -o) 2>/dev/null` in #(
65837   *posix*) :
65838     set -o posix ;; #(
65839   *) :
65840      ;;
65841 esac
65842 fi
65843 
65844 
65845 as_nl='
65846 '
65847 export as_nl
65848 # Printing a long string crashes Solaris 7 /usr/bin/printf.
65849 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65850 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65851 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65852 # Prefer a ksh shell builtin over an external printf program on Solaris,
65853 # but without wasting forks for bash or zsh.
65854 if test -z "$BASH_VERSION$ZSH_VERSION" \
65855     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65856   as_echo='print -r --'
65857   as_echo_n='print -rn --'
65858 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65859   as_echo='printf %s\n'
65860   as_echo_n='printf %s'
65861 else
65862   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65863     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65864     as_echo_n='/usr/ucb/echo -n'
65865   else
65866     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65867     as_echo_n_body='eval
65868       arg=$1;
65869       case $arg in #(
65870       *"$as_nl"*)
65871         expr "X$arg" : "X\\(.*\\)$as_nl";
65872         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65873       esac;
65874       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65875     '
65876     export as_echo_n_body
65877     as_echo_n='sh -c $as_echo_n_body as_echo'
65878   fi
65879   export as_echo_body
65880   as_echo='sh -c $as_echo_body as_echo'
65881 fi
65882 
65883 # The user is always right.
65884 if test "${PATH_SEPARATOR+set}" != set; then
65885   PATH_SEPARATOR=:
65886   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65887     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65888       PATH_SEPARATOR=';'
65889   }
65890 fi
65891 
65892 
65893 # IFS
65894 # We need space, tab and new line, in precisely that order.  Quoting is
65895 # there to prevent editors from complaining about space-tab.
65896 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
65897 # splitting by setting IFS to empty value.)
65898 IFS=" ""        $as_nl"
65899 
65900 # Find who we are.  Look in the path if we contain no directory separator.
65901 as_myself=
65902 case $0 in #((
65903   *[\\/]* ) as_myself=$0 ;;
65904   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65905 for as_dir in $PATH
65906 do
65907   IFS=$as_save_IFS
65908   test -z "$as_dir" && as_dir=.
65909     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65910   done
65911 IFS=$as_save_IFS
65912 
65913      ;;
65914 esac
65915 # We did not find ourselves, most probably we were run as `sh COMMAND'
65916 # in which case we are not to be found in the path.
65917 if test "x$as_myself" = x; then
65918   as_myself=$0
65919 fi
65920 if test ! -f "$as_myself"; then
65921   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65922   exit 1
65923 fi
65924 
65925 # Unset variables that we do not need and which cause bugs (e.g. in
65926 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65927 # suppresses any "Segmentation fault" message there.  '((' could
65928 # trigger a bug in pdksh 5.2.14.
65929 for as_var in BASH_ENV ENV MAIL MAILPATH
65930 do eval test x\${$as_var+set} = xset \
65931   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65932 done
65933 PS1='$ '
65934 PS2='> '
65935 PS4='+ '
65936 
65937 # NLS nuisances.
65938 LC_ALL=C
65939 export LC_ALL
65940 LANGUAGE=C
65941 export LANGUAGE
65942 
65943 # CDPATH.
65944 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65945 
65946 
65947 # as_fn_error STATUS ERROR [LINENO LOG_FD]
65948 # ----------------------------------------
65949 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65950 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65951 # script with STATUS, using 1 if that was 0.
65952 as_fn_error ()
65953 {
65954   as_status=$1; test $as_status -eq 0 && as_status=1
65955   if test "$4"; then
65956     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65957     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65958   fi
65959   $as_echo "$as_me: error: $2" >&2
65960   as_fn_exit $as_status
65961 } # as_fn_error
65962 
65963 
65964 # as_fn_set_status STATUS
65965 # -----------------------
65966 # Set $? to STATUS, without forking.
65967 as_fn_set_status ()
65968 {
65969   return $1
65970 } # as_fn_set_status
65971 
65972 # as_fn_exit STATUS
65973 # -----------------
65974 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65975 as_fn_exit ()
65976 {
65977   set +e
65978   as_fn_set_status $1
65979   exit $1
65980 } # as_fn_exit
65981 
65982 # as_fn_unset VAR
65983 # ---------------
65984 # Portably unset VAR.
65985 as_fn_unset ()
65986 {
65987   { eval $1=; unset $1;}
65988 }
65989 as_unset=as_fn_unset
65990 # as_fn_append VAR VALUE
65991 # ----------------------
65992 # Append the text in VALUE to the end of the definition contained in VAR. Take
65993 # advantage of any shell optimizations that allow amortized linear growth over
65994 # repeated appends, instead of the typical quadratic growth present in naive
65995 # implementations.
65996 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65997   eval 'as_fn_append ()
65998   {
65999     eval $1+=\$2
66000   }'
66001 else
66002   as_fn_append ()
66003   {
66004     eval $1=\$$1\$2
66005   }
66006 fi # as_fn_append
66007 
66008 # as_fn_arith ARG...
66009 # ------------------
66010 # Perform arithmetic evaluation on the ARGs, and store the result in the
66011 # global $as_val. Take advantage of shells that can avoid forks. The arguments
66012 # must be portable across $(()) and expr.
66013 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66014   eval 'as_fn_arith ()
66015   {
66016     as_val=$(( $* ))
66017   }'
66018 else
66019   as_fn_arith ()
66020   {
66021     as_val=`expr "$@" || test $? -eq 1`
66022   }
66023 fi # as_fn_arith
66024 
66025 
66026 if expr a : '\(a\)' >/dev/null 2>&1 &&
66027    test "X`expr 00001 : '.*\(...\)'`" = X001; then
66028   as_expr=expr
66029 else
66030   as_expr=false
66031 fi
66032 
66033 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66034   as_basename=basename
66035 else
66036   as_basename=false
66037 fi
66038 
66039 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66040   as_dirname=dirname
66041 else
66042   as_dirname=false
66043 fi
66044 
66045 as_me=`$as_basename -- "$0" ||
66046 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66047          X"$0" : 'X\(//\)$' \| \
66048          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66049 $as_echo X/"$0" |
66050     sed '/^.*\/\([^/][^/]*\)\/*$/{
66051             s//\1/
66052             q
66053           }
66054           /^X\/\(\/\/\)$/{
66055             s//\1/
66056             q
66057           }
66058           /^X\/\(\/\).*/{
66059             s//\1/
66060             q
66061           }
66062           s/.*/./; q'`
66063 
66064 # Avoid depending upon Character Ranges.
66065 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66066 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66067 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66068 as_cr_digits='0123456789'
66069 as_cr_alnum=$as_cr_Letters$as_cr_digits
66070 
66071 ECHO_C= ECHO_N= ECHO_T=
66072 case `echo -n x` in #(((((
66073 -n*)
66074   case `echo 'xy\c'` in
66075   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
66076   xy)  ECHO_C='\c';;
66077   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66078        ECHO_T=' ';;
66079   esac;;
66080 *)
66081   ECHO_N='-n';;
66082 esac
66083 
66084 rm -f conf$$ conf$$.exe conf$$.file
66085 if test -d conf$$.dir; then
66086   rm -f conf$$.dir/conf$$.file
66087 else
66088   rm -f conf$$.dir
66089   mkdir conf$$.dir 2>/dev/null
66090 fi
66091 if (echo >conf$$.file) 2>/dev/null; then
66092   if ln -s conf$$.file conf$$ 2>/dev/null; then
66093     as_ln_s='ln -s'
66094     # ... but there are two gotchas:
66095     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66096     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66097     # In both cases, we have to default to `cp -pR'.
66098     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66099       as_ln_s='cp -pR'
66100   elif ln conf$$.file conf$$ 2>/dev/null; then
66101     as_ln_s=ln
66102   else
66103     as_ln_s='cp -pR'
66104   fi
66105 else
66106   as_ln_s='cp -pR'
66107 fi
66108 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66109 rmdir conf$$.dir 2>/dev/null
66110 
66111 
66112 # as_fn_mkdir_p
66113 # -------------
66114 # Create "$as_dir" as a directory, including parents if necessary.
66115 as_fn_mkdir_p ()
66116 {
66117 
66118   case $as_dir in #(
66119   -*) as_dir=./$as_dir;;
66120   esac
66121   test -d "$as_dir" || eval $as_mkdir_p || {
66122     as_dirs=
66123     while :; do
66124       case $as_dir in #(
66125       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66126       *) as_qdir=$as_dir;;
66127       esac
66128       as_dirs="'$as_qdir' $as_dirs"
66129       as_dir=`$as_dirname -- "$as_dir" ||
66130 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66131          X"$as_dir" : 'X\(//\)[^/]' \| \
66132          X"$as_dir" : 'X\(//\)$' \| \
66133          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66134 $as_echo X"$as_dir" |
66135     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66136             s//\1/
66137             q
66138           }
66139           /^X\(\/\/\)[^/].*/{
66140             s//\1/
66141             q
66142           }
66143           /^X\(\/\/\)$/{
66144             s//\1/
66145             q
66146           }
66147           /^X\(\/\).*/{
66148             s//\1/
66149             q
66150           }
66151           s/.*/./; q'`
66152       test -d "$as_dir" && break
66153     done
66154     test -z "$as_dirs" || eval "mkdir $as_dirs"
66155   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66156 
66157 
66158 } # as_fn_mkdir_p
66159 if mkdir -p . 2>/dev/null; then
66160   as_mkdir_p='mkdir -p "$as_dir"'
66161 else
66162   test -d ./-p && rmdir ./-p
66163   as_mkdir_p=false
66164 fi
66165 
66166 
66167 # as_fn_executable_p FILE
66168 # -----------------------
66169 # Test if FILE is an executable regular file.
66170 as_fn_executable_p ()
66171 {
66172   test -f "$1" && test -x "$1"
66173 } # as_fn_executable_p
66174 as_test_x='test -x'
66175 as_executable_p=as_fn_executable_p
66176 
66177 # Sed expression to map a string onto a valid CPP name.
66178 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66179 
66180 # Sed expression to map a string onto a valid variable name.
66181 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66182 
66183 
66184 exec 6>&1
66185 ## ----------------------------------- ##
66186 ## Main body of $CONFIG_STATUS script. ##
66187 ## ----------------------------------- ##
66188 _ASEOF
66189 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66190 
66191 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66192 # Save the log message, to keep $0 and so on meaningful, and to
66193 # report actual input values of CONFIG_FILES etc. instead of their
66194 # values after options handling.
66195 ac_log="
66196 This file was extended by OpenJDK $as_me jdk9, which was
66197 generated by GNU Autoconf 2.69.  Invocation command line was
66198 
66199   CONFIG_FILES    = $CONFIG_FILES
66200   CONFIG_HEADERS  = $CONFIG_HEADERS
66201   CONFIG_LINKS    = $CONFIG_LINKS
66202   CONFIG_COMMANDS = $CONFIG_COMMANDS
66203   $ $0 $@
66204 
66205 on `(hostname || uname -n) 2>/dev/null | sed 1q`
66206 "
66207 
66208 _ACEOF
66209 
66210 case $ac_config_files in *"
66211 "*) set x $ac_config_files; shift; ac_config_files=$*;;
66212 esac
66213 
66214 
66215 
66216 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66217 # Files that config.status was made for.
66218 config_files="$ac_config_files"
66219 
66220 _ACEOF
66221 
66222 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66223 ac_cs_usage="\
66224 \`$as_me' instantiates files and other configuration actions
66225 from templates according to the current configuration.  Unless the files
66226 and actions are specified as TAGs, all are instantiated by default.
66227 
66228 Usage: $0 [OPTION]... [TAG]...
66229 
66230   -h, --help       print this help, then exit
66231   -V, --version    print version number and configuration settings, then exit
66232       --config     print configuration, then exit
66233   -q, --quiet, --silent
66234                    do not print progress messages
66235   -d, --debug      don't remove temporary files
66236       --recheck    update $as_me by reconfiguring in the same conditions
66237       --file=FILE[:TEMPLATE]
66238                    instantiate the configuration file FILE
66239 
66240 Configuration files:
66241 $config_files
66242 
66243 Report bugs to <build-dev@openjdk.java.net>.
66244 OpenJDK home page: <http://openjdk.java.net>."
66245 
66246 _ACEOF
66247 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66248 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66249 ac_cs_version="\\
66250 OpenJDK config.status jdk9
66251 configured by $0, generated by GNU Autoconf 2.69,
66252   with options \\"\$ac_cs_config\\"
66253 
66254 Copyright (C) 2012 Free Software Foundation, Inc.
66255 This config.status script is free software; the Free Software Foundation
66256 gives unlimited permission to copy, distribute and modify it."
66257 
66258 ac_pwd='$ac_pwd'
66259 srcdir='$srcdir'
66260 AWK='$AWK'
66261 test -n "\$AWK" || AWK=awk
66262 _ACEOF
66263 
66264 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66265 # The default lists apply if the user does not specify any file.
66266 ac_need_defaults=:
66267 while test $# != 0
66268 do
66269   case $1 in
66270   --*=?*)
66271     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66272     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66273     ac_shift=:
66274     ;;
66275   --*=)
66276     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66277     ac_optarg=
66278     ac_shift=:
66279     ;;
66280   *)
66281     ac_option=$1
66282     ac_optarg=$2
66283     ac_shift=shift
66284     ;;
66285   esac
66286 
66287   case $ac_option in
66288   # Handling of the options.
66289   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66290     ac_cs_recheck=: ;;
66291   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66292     $as_echo "$ac_cs_version"; exit ;;
66293   --config | --confi | --conf | --con | --co | --c )
66294     $as_echo "$ac_cs_config"; exit ;;
66295   --debug | --debu | --deb | --de | --d | -d )
66296     debug=: ;;
66297   --file | --fil | --fi | --f )
66298     $ac_shift
66299     case $ac_optarg in
66300     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66301     '') as_fn_error $? "missing file argument" ;;
66302     esac
66303     as_fn_append CONFIG_FILES " '$ac_optarg'"
66304     ac_need_defaults=false;;
66305   --he | --h |  --help | --hel | -h )
66306     $as_echo "$ac_cs_usage"; exit ;;
66307   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66308   | -silent | --silent | --silen | --sile | --sil | --si | --s)
66309     ac_cs_silent=: ;;
66310 
66311   # This is an error.
66312   -*) as_fn_error $? "unrecognized option: \`$1'
66313 Try \`$0 --help' for more information." ;;
66314 
66315   *) as_fn_append ac_config_targets " $1"
66316      ac_need_defaults=false ;;
66317 
66318   esac
66319   shift
66320 done
66321 
66322 ac_configure_extra_args=
66323 
66324 if $ac_cs_silent; then
66325   exec 6>/dev/null
66326   ac_configure_extra_args="$ac_configure_extra_args --silent"
66327 fi
66328 
66329 _ACEOF
66330 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66331 if \$ac_cs_recheck; then
66332   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66333   shift
66334   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66335   CONFIG_SHELL='$SHELL'
66336   export CONFIG_SHELL
66337   exec "\$@"
66338 fi
66339 
66340 _ACEOF
66341 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66342 exec 5>>config.log
66343 {
66344   echo
66345   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66346 ## Running $as_me. ##
66347 _ASBOX
66348   $as_echo "$ac_log"
66349 } >&5
66350 
66351 _ACEOF
66352 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66353 _ACEOF
66354 
66355 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66356 
66357 # Handling of arguments.
66358 for ac_config_target in $ac_config_targets
66359 do
66360   case $ac_config_target in
66361     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66362     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
66363     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66364     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66365     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66366     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66367 
66368   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66369   esac
66370 done
66371 
66372 
66373 # If the user did not use the arguments to specify the items to instantiate,
66374 # then the envvar interface is used.  Set only those that are not.
66375 # We use the long form for the default assignment because of an extremely
66376 # bizarre bug on SunOS 4.1.3.
66377 if $ac_need_defaults; then
66378   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66379 fi
66380 
66381 # Have a temporary directory for convenience.  Make it in the build tree
66382 # simply because there is no reason against having it here, and in addition,
66383 # creating and moving files from /tmp can sometimes cause problems.
66384 # Hook for its removal unless debugging.
66385 # Note that there is a small window in which the directory will not be cleaned:
66386 # after its creation but before its name has been assigned to `$tmp'.
66387 $debug ||
66388 {
66389   tmp= ac_tmp=
66390   trap 'exit_status=$?
66391   : "${ac_tmp:=$tmp}"
66392   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66393 ' 0
66394   trap 'as_fn_exit 1' 1 2 13 15
66395 }
66396 # Create a (secure) tmp directory for tmp files.
66397 
66398 {
66399   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66400   test -d "$tmp"
66401 }  ||
66402 {
66403   tmp=./conf$$-$RANDOM
66404   (umask 077 && mkdir "$tmp")
66405 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66406 ac_tmp=$tmp
66407 
66408 # Set up the scripts for CONFIG_FILES section.
66409 # No need to generate them if there are no CONFIG_FILES.
66410 # This happens for instance with `./config.status config.h'.
66411 if test -n "$CONFIG_FILES"; then
66412 
66413 
66414 ac_cr=`echo X | tr X '\015'`
66415 # On cygwin, bash can eat \r inside `` if the user requested igncr.
66416 # But we know of no other shell where ac_cr would be empty at this
66417 # point, so we can use a bashism as a fallback.
66418 if test "x$ac_cr" = x; then
66419   eval ac_cr=\$\'\\r\'
66420 fi
66421 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66422 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66423   ac_cs_awk_cr='\\r'
66424 else
66425   ac_cs_awk_cr=$ac_cr
66426 fi
66427 
66428 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66429 _ACEOF
66430 
66431 
66432 {
66433   echo "cat >conf$$subs.awk <<_ACEOF" &&
66434   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66435   echo "_ACEOF"
66436 } >conf$$subs.sh ||
66437   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66438 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66439 ac_delim='%!_!# '
66440 for ac_last_try in false false false false false :; do
66441   . ./conf$$subs.sh ||
66442     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66443 
66444   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66445   if test $ac_delim_n = $ac_delim_num; then
66446     break
66447   elif $ac_last_try; then
66448     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66449   else
66450     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66451   fi
66452 done
66453 rm -f conf$$subs.sh
66454 
66455 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66456 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66457 _ACEOF
66458 sed -n '
66459 h
66460 s/^/S["/; s/!.*/"]=/
66461 p
66462 g
66463 s/^[^!]*!//
66464 :repl
66465 t repl
66466 s/'"$ac_delim"'$//
66467 t delim
66468 :nl
66469 h
66470 s/\(.\{148\}\)..*/\1/
66471 t more1
66472 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66473 p
66474 n
66475 b repl
66476 :more1
66477 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66478 p
66479 g
66480 s/.\{148\}//
66481 t nl
66482 :delim
66483 h
66484 s/\(.\{148\}\)..*/\1/
66485 t more2
66486 s/["\\]/\\&/g; s/^/"/; s/$/"/
66487 p
66488 b
66489 :more2
66490 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66491 p
66492 g
66493 s/.\{148\}//
66494 t delim
66495 ' <conf$$subs.awk | sed '
66496 /^[^""]/{
66497   N
66498   s/\n//
66499 }
66500 ' >>$CONFIG_STATUS || ac_write_fail=1
66501 rm -f conf$$subs.awk
66502 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66503 _ACAWK
66504 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66505   for (key in S) S_is_set[key] = 1
66506   FS = ""
66507 
66508 }
66509 {
66510   line = $ 0
66511   nfields = split(line, field, "@")
66512   substed = 0
66513   len = length(field[1])
66514   for (i = 2; i < nfields; i++) {
66515     key = field[i]
66516     keylen = length(key)
66517     if (S_is_set[key]) {
66518       value = S[key]
66519       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66520       len += length(value) + length(field[++i])
66521       substed = 1
66522     } else
66523       len += 1 + keylen
66524   }
66525 
66526   print line
66527 }
66528 
66529 _ACAWK
66530 _ACEOF
66531 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66532 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66533   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66534 else
66535   cat
66536 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66537   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66538 _ACEOF
66539 
66540 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66541 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66542 # trailing colons and then remove the whole line if VPATH becomes empty
66543 # (actually we leave an empty line to preserve line numbers).
66544 if test "x$srcdir" = x.; then
66545   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
66546 h
66547 s///
66548 s/^/:/
66549 s/[      ]*$/:/
66550 s/:\$(srcdir):/:/g
66551 s/:\${srcdir}:/:/g
66552 s/:@srcdir@:/:/g
66553 s/^:*//
66554 s/:*$//
66555 x
66556 s/\(=[   ]*\).*/\1/
66557 G
66558 s/\n//
66559 s/^[^=]*=[       ]*$//
66560 }'
66561 fi
66562 
66563 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66564 fi # test -n "$CONFIG_FILES"
66565 
66566 
66567 eval set X "  :F $CONFIG_FILES      "
66568 shift
66569 for ac_tag
66570 do
66571   case $ac_tag in
66572   :[FHLC]) ac_mode=$ac_tag; continue;;
66573   esac
66574   case $ac_mode$ac_tag in
66575   :[FHL]*:*);;
66576   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66577   :[FH]-) ac_tag=-:-;;
66578   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66579   esac
66580   ac_save_IFS=$IFS
66581   IFS=:
66582   set x $ac_tag
66583   IFS=$ac_save_IFS
66584   shift
66585   ac_file=$1
66586   shift
66587 
66588   case $ac_mode in
66589   :L) ac_source=$1;;
66590   :[FH])
66591     ac_file_inputs=
66592     for ac_f
66593     do
66594       case $ac_f in
66595       -) ac_f="$ac_tmp/stdin";;
66596       *) # Look for the file first in the build tree, then in the source tree
66597          # (if the path is not absolute).  The absolute path cannot be DOS-style,
66598          # because $ac_f cannot contain `:'.
66599          test -f "$ac_f" ||
66600            case $ac_f in
66601            [\\/$]*) false;;
66602            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66603            esac ||
66604            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66605       esac
66606       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66607       as_fn_append ac_file_inputs " '$ac_f'"
66608     done
66609 
66610     # Let's still pretend it is `configure' which instantiates (i.e., don't
66611     # use $as_me), people would be surprised to read:
66612     #    /* config.h.  Generated by config.status.  */
66613     configure_input='Generated from '`
66614           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66615         `' by configure.'
66616     if test x"$ac_file" != x-; then
66617       configure_input="$ac_file.  $configure_input"
66618       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66619 $as_echo "$as_me: creating $ac_file" >&6;}
66620     fi
66621     # Neutralize special characters interpreted by sed in replacement strings.
66622     case $configure_input in #(
66623     *\&* | *\|* | *\\* )
66624        ac_sed_conf_input=`$as_echo "$configure_input" |
66625        sed 's/[\\\\&|]/\\\\&/g'`;; #(
66626     *) ac_sed_conf_input=$configure_input;;
66627     esac
66628 
66629     case $ac_tag in
66630     *:-:* | *:-) cat >"$ac_tmp/stdin" \
66631       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66632     esac
66633     ;;
66634   esac
66635 
66636   ac_dir=`$as_dirname -- "$ac_file" ||
66637 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66638          X"$ac_file" : 'X\(//\)[^/]' \| \
66639          X"$ac_file" : 'X\(//\)$' \| \
66640          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66641 $as_echo X"$ac_file" |
66642     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66643             s//\1/
66644             q
66645           }
66646           /^X\(\/\/\)[^/].*/{
66647             s//\1/
66648             q
66649           }
66650           /^X\(\/\/\)$/{
66651             s//\1/
66652             q
66653           }
66654           /^X\(\/\).*/{
66655             s//\1/
66656             q
66657           }
66658           s/.*/./; q'`
66659   as_dir="$ac_dir"; as_fn_mkdir_p
66660   ac_builddir=.
66661 
66662 case "$ac_dir" in
66663 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66664 *)
66665   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66666   # A ".." for each directory in $ac_dir_suffix.
66667   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66668   case $ac_top_builddir_sub in
66669   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66670   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66671   esac ;;
66672 esac
66673 ac_abs_top_builddir=$ac_pwd
66674 ac_abs_builddir=$ac_pwd$ac_dir_suffix
66675 # for backward compatibility:
66676 ac_top_builddir=$ac_top_build_prefix
66677 
66678 case $srcdir in
66679   .)  # We are building in place.
66680     ac_srcdir=.
66681     ac_top_srcdir=$ac_top_builddir_sub
66682     ac_abs_top_srcdir=$ac_pwd ;;
66683   [\\/]* | ?:[\\/]* )  # Absolute name.
66684     ac_srcdir=$srcdir$ac_dir_suffix;
66685     ac_top_srcdir=$srcdir
66686     ac_abs_top_srcdir=$srcdir ;;
66687   *) # Relative name.
66688     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66689     ac_top_srcdir=$ac_top_build_prefix$srcdir
66690     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66691 esac
66692 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66693 
66694 
66695   case $ac_mode in
66696   :F)
66697   #
66698   # CONFIG_FILE
66699   #
66700 
66701 _ACEOF
66702 
66703 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66704 # If the template does not know about datarootdir, expand it.
66705 # FIXME: This hack should be removed a few years after 2.60.
66706 ac_datarootdir_hack=; ac_datarootdir_seen=
66707 ac_sed_dataroot='
66708 /datarootdir/ {
66709   p
66710   q
66711 }
66712 /@datadir@/p
66713 /@docdir@/p
66714 /@infodir@/p
66715 /@localedir@/p
66716 /@mandir@/p'
66717 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66718 *datarootdir*) ac_datarootdir_seen=yes;;
66719 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66720   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66721 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66722 _ACEOF
66723 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66724   ac_datarootdir_hack='
66725   s&@datadir@&$datadir&g
66726   s&@docdir@&$docdir&g
66727   s&@infodir@&$infodir&g
66728   s&@localedir@&$localedir&g
66729   s&@mandir@&$mandir&g
66730   s&\\\${datarootdir}&$datarootdir&g' ;;
66731 esac
66732 _ACEOF
66733 
66734 # Neutralize VPATH when `$srcdir' = `.'.
66735 # Shell code in configure.ac might set extrasub.
66736 # FIXME: do we really want to maintain this feature?
66737 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66738 ac_sed_extra="$ac_vpsub
66739 $extrasub
66740 _ACEOF
66741 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66742 :t
66743 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66744 s|@configure_input@|$ac_sed_conf_input|;t t
66745 s&@top_builddir@&$ac_top_builddir_sub&;t t
66746 s&@top_build_prefix@&$ac_top_build_prefix&;t t
66747 s&@srcdir@&$ac_srcdir&;t t
66748 s&@abs_srcdir@&$ac_abs_srcdir&;t t
66749 s&@top_srcdir@&$ac_top_srcdir&;t t
66750 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66751 s&@builddir@&$ac_builddir&;t t
66752 s&@abs_builddir@&$ac_abs_builddir&;t t
66753 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66754 $ac_datarootdir_hack
66755 "
66756 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66757   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66758 
66759 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66760   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66761   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
66762       "$ac_tmp/out"`; test -z "$ac_out"; } &&
66763   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66764 which seems to be undefined.  Please make sure it is defined" >&5
66765 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66766 which seems to be undefined.  Please make sure it is defined" >&2;}
66767 
66768   rm -f "$ac_tmp/stdin"
66769   case $ac_file in
66770   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66771   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66772   esac \
66773   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66774  ;;
66775 
66776 
66777 
66778   esac
66779 
66780 done # for ac_tag
66781 
66782 
66783 as_fn_exit 0
66784 _ACEOF
66785 ac_clean_files=$ac_clean_files_save
66786 
66787 test $ac_write_fail = 0 ||
66788   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66789 
66790 
66791 # configure is writing to config.log, and then calls config.status.
66792 # config.status does its own redirection, appending to config.log.
66793 # Unfortunately, on DOS this fails, as config.log is still kept open
66794 # by configure, so config.status won't be able to write to it; its
66795 # output is simply discarded.  So we exec the FD to /dev/null,
66796 # effectively closing config.log, so it can be properly (re)opened and
66797 # appended to by config.status.  When coming back to configure, we
66798 # need to make the FD available again.
66799 if test "$no_create" != yes; then
66800   ac_cs_success=:
66801   ac_config_status_args=
66802   test "$silent" = yes &&
66803     ac_config_status_args="$ac_config_status_args --quiet"
66804   exec 5>/dev/null
66805   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66806   exec 5>>config.log
66807   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66808   # would make configure fail if this is the last instruction.
66809   $ac_cs_success || as_fn_exit 1
66810 fi
66811 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66812   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66813 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66814 fi
66815 
66816 
66817 # After AC_OUTPUT, we need to do final work
66818 
66819 
66820   # Try to move config.log (generated by autoconf) to the configure-support directory.
66821   if test -e ./config.log; then
66822     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66823   fi
66824 
66825   # Rotate our log file (configure.log)
66826   if test -e "$OUTPUT_ROOT/configure.log.old"; then
66827     $RM -f "$OUTPUT_ROOT/configure.log.old"
66828   fi
66829   if test -e "$OUTPUT_ROOT/configure.log"; then
66830     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66831   fi
66832 
66833   # Move configure.log from current directory to the build output root
66834   if test -e ./configure.log; then
66835     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66836   fi
66837 
66838   # Make the compare script executable
66839   $CHMOD +x $OUTPUT_ROOT/compare.sh
66840 
66841 
66842 # Finally output some useful information to the user
66843 
66844   # Finally output some useful information to the user
66845 
66846   printf "\n"
66847   printf "====================================================\n"
66848   if test "x$no_create" != "xyes"; then
66849     if test "x$IS_RECONFIGURE" != "xyes"; then
66850       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66851     else
66852       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66853     fi
66854   else
66855     if test "x$IS_RECONFIGURE" != "xyes"; then
66856       printf "A configuration has been successfully checked but not created\n"
66857     else
66858       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66859     fi
66860   fi
66861   if test "x$CONFIGURE_COMMAND_LINE" != x; then
66862     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66863   else
66864     printf "using default settings.\n"
66865   fi
66866 
66867   printf "\n"
66868   printf "Configuration summary:\n"
66869   printf "* Debug level:    $DEBUG_LEVEL\n"
66870   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66871   printf "* JDK variant:    $JDK_VARIANT\n"
66872   printf "* JVM variants:   $JVM_VARIANTS\n"
66873   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66874   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66875 
66876   printf "\n"
66877   printf "Tools summary:\n"
66878   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66879     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66880   fi
66881   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66882   if test "x$TOOLCHAIN_VERSION" != "x"; then
66883     print_version=" $TOOLCHAIN_VERSION"
66884   fi
66885   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66886   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66887   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66888 
66889   printf "\n"
66890   printf "Build performance summary:\n"
66891   printf "* Cores to use:   $JOBS\n"
66892   printf "* Memory limit:   $MEMORY_SIZE MB\n"
66893   if test "x$CCACHE_STATUS" != "x"; then
66894     printf "* ccache status:  $CCACHE_STATUS\n"
66895   fi
66896   printf "\n"
66897 
66898   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66899     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66900     printf "will result in longer build times.\n"
66901     printf "\n"
66902   fi
66903 
66904   if test "x$FOUND_ALT_VARIABLES" != "x"; then
66905     printf "WARNING: You have old-style ALT_ environment variables set.\n"
66906     printf "These are not respected, and will be ignored. It is recommended\n"
66907     printf "that you clean your environment. The following variables are set:\n"
66908     printf "$FOUND_ALT_VARIABLES\n"
66909     printf "\n"
66910   fi
66911 
66912   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66913     printf "WARNING: Your build output directory is not on a local disk.\n"
66914     printf "This will severely degrade build performance!\n"
66915     printf "It is recommended that you create an output directory on a local disk,\n"
66916     printf "and run the configure script again from that directory.\n"
66917     printf "\n"
66918   fi
66919 
66920   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66921     printf "WARNING: The result of this configuration has overridden an older\n"
66922     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66923     printf "proper build. Failure to do so might result in strange build problems.\n"
66924     printf "\n"
66925   fi
66926 
66927   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66928     printf "WARNING: The result of this configuration was not saved.\n"
66929     printf "You should run without '--no-create | -n' to create the configuration.\n"
66930     printf "\n"
66931   fi
66932 
66933 
66934 
66935   # Locate config.log.
66936   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66937     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66938   elif test -e "./config.log"; then
66939     CONFIG_LOG_PATH="."
66940   fi
66941 
66942   if test -e "$CONFIG_LOG_PATH/config.log"; then
66943     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66944     if test $? -eq 0; then
66945       printf "The following warnings were produced. Repeated here for convenience:\n"
66946       # We must quote sed expression (using []) to stop m4 from eating the [].
66947       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66948       printf "\n"
66949     fi
66950   fi
66951